Révision 3400
TXM/trunk/org.txm.ahc.rcp/src/org/txm/ahc/rcp/handlers/ComputeAHC.java (revision 3400) | ||
---|---|---|
99 | 99 |
|
100 | 100 |
// FIXME: SJ: problem here because we need the LT to be computed to make this check |
101 | 101 |
if (lexicalTable.hasBeenComputedOnce() && lexicalTable.getNColumns() < 4) { |
102 |
MessageDialog.openError(window.getShell(), "Error", AHCCoreMessages.error_canNotComputeAHCOnLexicalTableWithLessThan4Columns);
|
|
102 |
MessageDialog.openError(window.getShell(), AHCCoreMessages.Error, AHCCoreMessages.error_canNotComputeAHCOnLexicalTableWithLessThan4Columns);
|
|
103 | 103 |
return null; |
104 | 104 |
} |
105 | 105 |
// FIXME: SJ: problem here because we need the LT has been computed to make this check |
106 | 106 |
if (lexicalTable.hasBeenComputedOnce() && lexicalTable.getNRows() < 4) { |
107 |
MessageDialog.openError(window.getShell(), "Error", AHCCoreMessages.error_canNotComputeAHCWithLessThan4RowsInTheTable);
|
|
107 |
MessageDialog.openError(window.getShell(), AHCCoreMessages.Error, AHCCoreMessages.error_canNotComputeAHCWithLessThan4RowsInTheTable);
|
|
108 | 108 |
return null; |
109 | 109 |
} |
110 | 110 |
|
... | ... | |
137 | 137 |
ChartEditor.openEditor(ahc); |
138 | 138 |
} |
139 | 139 |
catch (Exception e) { |
140 |
Log.severe("Failed to build the AHC for selection " + selection + ": " + e);
|
|
140 |
Log.severe(AHCCoreMessages.failToBuildTheAHCForSelectionP1DbldotP1 + selection + ": " + e); //$NON-NLS-2$
|
|
141 | 141 |
Log.printStackTrace(e); |
142 | 142 |
return null; |
143 | 143 |
} |
TXM/trunk/org.txm.ahc.rcp/src/org/txm/ahc/rcp/adapters/AHCAdapterFactory.java (revision 3400) | ||
---|---|---|
19 | 19 |
|
20 | 20 |
|
21 | 21 |
public static final ImageDescriptor ICON = AbstractUIPlugin.imageDescriptorFromPlugin(FrameworkUtil.getBundle(AHCAdapterFactory.class).getSymbolicName(), |
22 |
"platform:/plugin/" + FrameworkUtil.getBundle(AHCAdapterFactory.class).getSymbolicName() + "/icons/cah.png"); //$NON-NLS-1$ |
|
22 |
"platform:/plugin/" + FrameworkUtil.getBundle(AHCAdapterFactory.class).getSymbolicName() + "/icons/cah.png"); //$NON-NLS-1$ //$NON-NLS-2$
|
|
23 | 23 |
|
24 | 24 |
/** |
25 | 25 |
* Gets the adapter. |
TXM/trunk/org.txm.ahc.core/src/org/txm/ahc/core/messages/messages.properties (revision 3400) | ||
---|---|---|
2 | 2 |
#TXM messages generated by the PluginMessagesManager class |
3 | 3 |
#Tue Dec 18 10:24:08 CET 2018 |
4 | 4 |
|
5 |
AHC_computedWithTheP0MethodAndTheP1Metric=\ computed with the {0} method and the {1} metric. |
|
5 | 6 |
P0classesOfP1 = {0} clusters of {1}. |
6 | 7 |
|
7 | 8 |
RESULT_TYPE = HCA |
8 | 9 |
|
9 | 10 |
columns = columns |
10 | 11 |
|
12 |
common_ok= |
|
11 | 13 |
computingAHC = Computing AHC... |
14 |
Error=Error |
|
12 | 15 |
|
13 | 16 |
error_canNotComputeAHCOnLexicalTableWithLessThan4Columns = ** Can not compute AHC on lexical table with less than 4 columns in the table |
17 |
error_canNotComputeAHCWith= |
|
14 | 18 |
error_canNotComputeAHCWithLessThan4RowsInTheTable = ** Can not compute AHC with less than 4 rows in the table |
19 |
error_error2= |
|
15 | 20 |
error_errorWhileExportingCAHToTXT = ** Error while exporting HCA result. |
21 |
failToBuildTheAHCForSelectionP1DbldotP1=Failed to build the AHC for selection |
|
16 | 22 |
|
17 | 23 |
info_ahcOfTheP0LexcialTable = AHC of the {0} lexical table... |
18 | 24 |
info_ahcOfTheP0PartitionCommaP1Property = AHC of {0} partition, {1} property... |
TXM/trunk/org.txm.ahc.core/src/org/txm/ahc/core/messages/AHCCoreMessages.java (revision 3400) | ||
---|---|---|
14 | 14 |
|
15 | 15 |
private static final String BUNDLE_NAME = "org.txm.ahc.core.messages.messages"; //$NON-NLS-1$ |
16 | 16 |
|
17 |
public static String AHC_computedWithTheP0MethodAndTheP1Metric; |
|
18 |
|
|
17 | 19 |
public static String P0classesOfP1; |
18 | 20 |
|
19 | 21 |
public static String columns; |
... | ... | |
22 | 24 |
|
23 | 25 |
public static String RESULT_TYPE; |
24 | 26 |
|
27 |
public static String error_error2; |
|
28 |
|
|
25 | 29 |
public static String error_errorWhileExportingCAHToTXT; |
26 | 30 |
|
31 |
public static String common_ok; |
|
32 |
|
|
27 | 33 |
public static String computingAHC; |
34 |
|
|
35 |
public static String Error; |
|
28 | 36 |
|
29 | 37 |
public static String info_ahcOfTheP0PartitionCommaP1Property; |
30 | 38 |
|
... | ... | |
34 | 42 |
|
35 | 43 |
public static String error_canNotComputeAHCOnLexicalTableWithLessThan4Columns; |
36 | 44 |
|
45 |
public static String error_canNotComputeAHCWith; |
|
46 |
|
|
37 | 47 |
public static String error_canNotComputeAHCWithLessThan4RowsInTheTable; |
48 |
|
|
49 |
public static String failToBuildTheAHCForSelectionP1DbldotP1; |
|
38 | 50 |
|
39 | 51 |
|
40 | 52 |
|
TXM/trunk/org.txm.ahc.core/src/org/txm/ahc/core/functions/AHC.java (revision 3400) | ||
---|---|---|
288 | 288 |
@Override |
289 | 289 |
public boolean setParameters(TXMParameters parameters) { |
290 | 290 |
// TODO Auto-generated method stub |
291 |
System.err.println("AHC.setParameters(): not yet implemented.");
|
|
291 |
System.err.println("AHC.setParameters() is not yet implemented."); //$NON-NLS-1$
|
|
292 | 292 |
return true; |
293 | 293 |
} |
294 | 294 |
|
... | ... | |
397 | 397 |
// FIXME: check this code for the CAH 3D chart implementation |
398 | 398 |
RWorkspace rw = RWorkspace.getRWorkspaceInstance(); |
399 | 399 |
for (int i = 0; i < 2; i++) { // 2 dimensions |
400 |
REXP sv = rw.extractItemFromListByName(symbol, "data.clust[," + (i + 1) + "]"); //$NON-NLS-1$ |
|
400 |
REXP sv = rw.extractItemFromListByName(symbol, "data.clust[," + (i + 1) + "]"); //$NON-NLS-1$ //$NON-NLS-2$
|
|
401 | 401 |
double[] coords = RWorkspace.toDouble(sv); |
402 | 402 |
for (int j = 0; j < coords.length; j++) { |
403 | 403 |
if (this.clusterCoords == null) { |
... | ... | |
479 | 479 |
if (this.clusterOrderedRowNames == null) { |
480 | 480 |
try { |
481 | 481 |
RWorkspace rw = RWorkspace.getRWorkspaceInstance(); |
482 |
REXP sv = rw.extractItemFromListByName(symbol, "call$t$tree$labels[c(" + symbol + "$call$t$tree$order)]"); //$NON-NLS-1$ |
|
482 |
REXP sv = rw.extractItemFromListByName(symbol, "call$t$tree$labels[c(" + symbol + "$call$t$tree$order)]"); //$NON-NLS-1$ //$NON-NLS-2$
|
|
483 | 483 |
this.clusterOrderedRowNames = sv.asStrings(); |
484 | 484 |
} |
485 | 485 |
catch (Exception e) { |
... | ... | |
671 | 671 |
|
672 | 672 |
@Override |
673 | 673 |
public String[] getExportTXTExtensions() { |
674 |
return new String[] { "*.txt" }; |
|
674 |
return new String[] { "*.txt" }; //$NON-NLS-1$
|
|
675 | 675 |
} |
676 | 676 |
|
677 | 677 |
|
... | ... | |
712 | 712 |
|
713 | 713 |
@Override |
714 | 714 |
public String getDetails() { |
715 |
return NLS.bind(this.getName() + "\ncomputed with the {0} method and the {1} metric.", method, metric);
|
|
715 |
return NLS.bind(this.getName() + AHCCoreMessages.AHC_computedWithTheP0MethodAndTheP1Metric, method, metric);
|
|
716 | 716 |
} |
717 | 717 |
|
718 | 718 |
@Override |
... | ... | |
737 | 737 |
// FIXME: SJ: this special case is possible when creating Specificities then calling the command on the invisible Lexical Table |
738 | 738 |
// need to if we need a special log message here |
739 | 739 |
else { |
740 |
return ""; |
|
740 |
return ""; //$NON-NLS-1$
|
|
741 | 741 |
} |
742 | 742 |
} |
743 | 743 |
|
TXM/trunk/org.txm.ahc.core/src/org/txm/ahc/core/chartsengine/jfreechart/JFCAHCChartCreator.java (revision 3400) | ||
---|---|---|
19 | 19 |
@Override |
20 | 20 |
public JFreeChart createChart(AHC result) { |
21 | 21 |
|
22 |
System.err.println("JFCAHCChartCreator.createChart(): not yet implemented.");
|
|
22 |
System.err.println("JFCAHCChartCreator.createChart() is not yet implemented."); //$NON-NLS-1$
|
|
23 | 23 |
|
24 | 24 |
return null; |
25 | 25 |
|
TXM/trunk/org.txm.ahc.core/src/org/txm/ahc/core/chartsengine/r/RAHCChartCreator.java (revision 3400) | ||
---|---|---|
22 | 22 |
String cmd = null; |
23 | 23 |
// 2D |
24 | 24 |
if (ahc.isRendering2D()) { |
25 |
cmd = "plot.HCPC(" + ahc.getRSymbol() + ", new.plot=FALSE, choice=\"tree\")"; |
|
25 |
cmd = "plot.HCPC(" + ahc.getRSymbol() + ", new.plot=FALSE, choice=\"tree\")"; //$NON-NLS-1$ //$NON-NLS-2$
|
|
26 | 26 |
|
27 | 27 |
// FIXME: SJ: for tests without drawing the inertia barplot. Without it, the max available clusters can exceed 16 |
28 | 28 |
// cmd = "plot.HCPC(" + cah.getSymbol() + ", new.plot=FALSE, choice=\"tree\", tree.barplot=FALSE)"; //$NON-NLS-1$ //$NON-NLS-2$ |
... | ... | |
33 | 33 |
} |
34 | 34 |
// 3D |
35 | 35 |
else { |
36 |
cmd = "plot.HCPC(" + ahc.getRSymbol() + ", new.plot=FALSE)"; |
|
36 |
cmd = "plot.HCPC(" + ahc.getRSymbol() + ", new.plot=FALSE)"; //$NON-NLS-1$ //$NON-NLS-2$
|
|
37 | 37 |
} |
38 | 38 |
|
39 | 39 |
return this.getChartsEngine().plot(file, cmd); |
Formats disponibles : Unified diff