Revision 2546
tmp/org.txm.ahc.rcp/src/org/txm/ahc/rcp/handlers/ComputeAHC.java (revision 2546) | ||
---|---|---|
41 | 41 |
import org.txm.ca.core.functions.CA; |
42 | 42 |
import org.txm.ca.core.preferences.CAPreferences; |
43 | 43 |
import org.txm.ca.rcp.editors.CAParametersDialog; |
44 |
import org.txm.ca.rcp.messages.CAUIMessages; |
|
44 | 45 |
import org.txm.chartsengine.rcp.editors.ChartEditor; |
45 | 46 |
import org.txm.core.messages.TXMCoreMessages; |
46 | 47 |
import org.txm.core.preferences.TXMPreferences; |
... | ... | |
52 | 53 |
import org.txm.searchengine.cqp.corpus.WordProperty; |
53 | 54 |
import org.txm.statsengine.core.StatException; |
54 | 55 |
import org.txm.utils.logger.Log; |
56 |
import org.txm.utils.logger.MessageBox; |
|
55 | 57 |
|
56 | 58 |
/** |
57 | 59 |
* Opens an AHC editor. |
... | ... | |
80 | 82 |
if (selection instanceof AHC) { |
81 | 83 |
ahc = (AHC) selection; |
82 | 84 |
} |
85 |
// Creating from CA |
|
83 | 86 |
else if (selection instanceof CA) { // Creating |
84 | 87 |
|
85 | 88 |
CA ca = (CA) selection; |
86 | 89 |
ahc = new AHC(ca); |
87 | 90 |
} |
88 |
else if (selection instanceof PartitionIndex) { // Creating from Partition Index |
|
91 |
// Creating from Partition Index |
|
92 |
else if (selection instanceof PartitionIndex) { |
|
89 | 93 |
|
90 | 94 |
PartitionIndex index = (PartitionIndex) selection; |
91 | 95 |
LexicalTable lexicalTable = new LexicalTable(index); |
... | ... | |
94 | 98 |
ca.setVisible(false); |
95 | 99 |
ahc = new AHC(ca); |
96 | 100 |
} |
97 |
else if (selection instanceof LexicalTable) { // Creating from Lexical Table |
|
101 |
// Creating from Lexical Table |
|
102 |
else if (selection instanceof LexicalTable) { |
|
98 | 103 |
|
99 | 104 |
LexicalTable lexicalTable = (LexicalTable) selection; |
105 |
|
|
106 |
lexicalTable = (LexicalTable) selection; |
|
107 |
Property property = lexicalTable.getProperty(); |
|
108 |
|
|
109 |
// FIXME: SJ: problem here because we need the LT has been computed to make this check |
|
110 |
if (lexicalTable.hasBeenComputedOnce() && lexicalTable.getNColumns() < 4) { |
|
111 |
// FIXME: remove this swing code that freeze the UI, need to use SWT in main thread |
|
112 |
MessageBox.error(CAUIMessages.canNotComputeCAOnLexicalTableWithLessThan4Columns); |
|
113 |
return null; |
|
114 |
} |
|
115 |
// FIXME: SJ: problem here because we need the LT has been computed to make this check |
|
116 |
if (lexicalTable.hasBeenComputedOnce() && lexicalTable.getNRows() < 4) { |
|
117 |
// FIXME: remove this swing code that freeze the UI, need to use SWT in main thread |
|
118 |
MessageBox.error(CAUIMessages.canNotComputeCAWithLessThan4RowsInTheTable); |
|
119 |
return null; |
|
120 |
} |
|
121 |
|
|
122 |
|
|
123 |
|
|
100 | 124 |
CA ca = new CA(lexicalTable); |
101 | 125 |
ca.setVisible(false); |
102 | 126 |
ahc = new AHC(ca); |
Also available in: Unified diff