Révision 239
tmp/org.txm.chartsengine.jfreechart.rcp/plugin.xml (revision 239) | ||
---|---|---|
49 | 49 |
<extension |
50 | 50 |
point="org.eclipse.core.expressions.propertyTesters"> |
51 | 51 |
<propertyTester |
52 |
class="org.txm.chartsengine.jfreechart.rcp.testers.IsJFCComposite" |
|
52 |
class="org.txm.chartsengine.jfreechart.rcp.testers.__IsJFCComposite"
|
|
53 | 53 |
id="org.txm.chartsengine.jfreechart.rcp.testers.IsJFCComposite" |
54 | 54 |
namespace="org.txm.chartsengine.jfreechart.rcp.testers" |
55 | 55 |
properties="IsJFCComposite" |
tmp/org.txm.chartsengine.jfreechart.rcp/src/org/txm/chartsengine/jfreechart/rcp/testers/IsJFCComposite.java (revision 239) | ||
---|---|---|
1 |
package org.txm.chartsengine.jfreechart.rcp.testers; |
|
2 |
|
|
3 |
import org.eclipse.core.expressions.PropertyTester; |
|
4 |
|
|
5 |
|
|
6 |
/** |
|
7 |
* |
|
8 |
* Tests if an editor composite is a JFCComposite. |
|
9 |
* @author sjacquot |
|
10 |
* |
|
11 |
*/ |
|
12 |
//FIXME: the test does not work... |
|
13 |
public class IsJFCComposite extends PropertyTester { |
|
14 |
|
|
15 |
public static final String PROPERTY_NAMESPACE = "org.txm.chartsengine.jfreechart.rcp.testers"; //$NON-NLS-1$ |
|
16 |
public static final String PROPERTY_EXPERT_ENABLED = "IsJFCComposite"; |
|
17 |
|
|
18 |
@Override |
|
19 |
public boolean test(Object receiver, String property, Object[] args, |
|
20 |
Object expectedValue) { |
|
21 |
|
|
22 |
//FIXME: Debug |
|
23 |
// System.out.println("IsJFCComposite.test() recevier = " + receiver.getClass().getSimpleName()); |
|
24 |
// System.out.println("IsJFCComposite.test() property = " + property); |
|
25 |
// System.out.println("IsJFCComposite.test() args = " + args); |
|
26 |
// System.out.println("IsJFCComposite.test() expectedValue = " + expectedValue); |
|
27 |
|
|
28 |
// ChartEditorPart editor = SWTChartsComponentsProvider.getActiveChartEditor(null); |
|
29 |
// return (editor != null && editor.getComposite() instanceof JFCComposite); |
|
30 |
return true; |
|
31 |
} |
|
32 |
} |
tmp/org.txm.chartsengine.jfreechart.rcp/src/org/txm/chartsengine/jfreechart/rcp/testers/__IsJFCComposite.java (revision 239) | ||
---|---|---|
1 |
package org.txm.chartsengine.jfreechart.rcp.testers; |
|
2 |
|
|
3 |
import org.eclipse.core.expressions.PropertyTester; |
|
4 |
|
|
5 |
|
|
6 |
/** |
|
7 |
* |
|
8 |
* Tests if an editor composite is a JFCComposite. |
|
9 |
* @author sjacquot |
|
10 |
* |
|
11 |
*/ |
|
12 |
//FIXME: the test does not work... |
|
13 |
public class __IsJFCComposite extends PropertyTester { |
|
14 |
|
|
15 |
public static final String PROPERTY_NAMESPACE = "org.txm.chartsengine.jfreechart.rcp.testers"; //$NON-NLS-1$ |
|
16 |
public static final String PROPERTY_EXPERT_ENABLED = "IsJFCComposite"; |
|
17 |
|
|
18 |
@Override |
|
19 |
public boolean test(Object receiver, String property, Object[] args, |
|
20 |
Object expectedValue) { |
|
21 |
|
|
22 |
//FIXME: Debug |
|
23 |
// System.out.println("IsJFCComposite.test() recevier = " + receiver.getClass().getSimpleName()); |
|
24 |
// System.out.println("IsJFCComposite.test() property = " + property); |
|
25 |
// System.out.println("IsJFCComposite.test() args = " + args); |
|
26 |
// System.out.println("IsJFCComposite.test() expectedValue = " + expectedValue); |
|
27 |
|
|
28 |
// ChartEditorPart editor = SWTChartsComponentsProvider.getActiveChartEditor(null); |
|
29 |
// return (editor != null && editor.getComposite() instanceof JFCComposite); |
|
30 |
return true; |
|
31 |
} |
|
32 |
} |
|
0 | 33 |
tmp/org.txm.cah.rcp/src/org/txm/cah/rcp/editors/CAHChartEditor.java (revision 239) | ||
---|---|---|
13 | 13 |
import org.eclipse.swt.widgets.Spinner; |
14 | 14 |
import org.eclipse.swt.widgets.ToolItem; |
15 | 15 |
import org.txm.cah.core.functions.CAH; |
16 |
import org.txm.cah.core.messages.CAHCoreMessages; |
|
16 | 17 |
import org.txm.cah.core.preferences.CAHPreferences; |
17 |
import org.txm.cah.rcp.messages.CAUIPMessages; |
|
18 |
import org.txm.core.results.ITXMResult; |
|
18 |
import org.txm.cah.rcp.messages.CAHUIMessages; |
|
19 | 19 |
import org.txm.chartsengine.rcp.editors.ChartEditorPart; |
20 | 20 |
import org.txm.chartsengine.rcp.messages.SWTComponentsProviderMessages; |
21 | 21 |
import org.txm.core.preferences.TXMPreferences; |
22 |
import org.txm.core.results.ITXMResult; |
|
22 | 23 |
import org.txm.rcpapplication.IImageKeys; |
23 | 24 |
import org.txm.rcpapplication.JobsTimer; |
24 | 25 |
import org.txm.rcpapplication.commands.editor.CustomizableEditor; |
25 | 26 |
import org.txm.rcpapplication.utils.JobHandler; |
26 | 27 |
import org.txm.rcpapplication.views.QueriesView; |
27 |
import org.txm.rcpapplication.views.RVariablesView; |
|
28 | 28 |
import org.txm.rcpapplication.views.corpora.CorporaView; |
29 | 29 |
import org.txm.searchengine.cqp.corpus.Corpus; |
30 |
import org.txm.statsengine.r.rcp.views.RVariablesView; |
|
30 | 31 |
import org.txm.utils.logger.Log; |
31 | 32 |
|
32 | 33 |
/** |
... | ... | |
59 | 60 |
// Number of clusters |
60 | 61 |
ToolItem itemSeparator = new ToolItem(this.toolBar, SWT.SEPARATOR); |
61 | 62 |
CLabel clustersLabel = new CLabel(this.toolBar, SWT.CENTER); |
62 |
clustersLabel.setText(SWTComponentsProviderMessages.SWTChartsComponentProvider_CAH_TOOLBAR_BUTTON_NUMBER_OF_CLUSTERS);
|
|
63 |
clustersLabel.setText(CAHUIMessages.CHART_TOOLBAR_BUTTON_NUMBER_OF_CLUSTERS);
|
|
63 | 64 |
clustersLabel.pack(); |
64 | 65 |
itemSeparator.setWidth(clustersLabel.getBounds().width); |
65 | 66 |
itemSeparator.setControl(clustersLabel); |
... | ... | |
76 | 77 |
|
77 | 78 |
// Columns |
78 | 79 |
final ToolItem computeColumns = new ToolItem(this.toolBar, SWT.RADIO); |
79 |
computeColumns.setToolTipText(CAUIPMessages.ComputeClassification_5);
|
|
80 |
computeColumns.setToolTipText(CAHUIMessages.COMPUTE_COLUMNS);
|
|
80 | 81 |
computeColumns.setImage(IImageKeys.getImage(CAHChartEditor.class, "icons/compute_columns.png")); //$NON-NLS-1$ |
81 | 82 |
// FIXME: keep this for offering an option "large icons" with text in buttons ? |
82 | 83 |
//computeColumns.setText(CAUIPMessages.ComputeClassification_5); |
... | ... | |
84 | 85 |
|
85 | 86 |
// Rows |
86 | 87 |
final ToolItem computeRows = new ToolItem(this.toolBar, SWT.RADIO); |
87 |
computeRows.setToolTipText(CAUIPMessages.ComputeClassification_6);
|
|
88 |
computeRows.setToolTipText(CAHUIMessages.COMPUTE_ROWS);
|
|
88 | 89 |
computeRows.setImage(IImageKeys.getImage(CAHChartEditor.class, "icons/compute_rows.png")); //$NON-NLS-1$ |
89 | 90 |
// FIXME: keep this for offering an option "large icons" with text in buttons ? |
90 | 91 |
//computeRows.setText(CAUIPMessages.ComputeClassification_6); |
... | ... | |
174 | 175 |
*/ |
175 | 176 |
public void compute(final boolean update) { |
176 | 177 |
|
177 |
JobHandler jobhandler = new JobHandler(CAUIPMessages.CAHEditor_0) {
|
|
178 |
JobHandler jobhandler = new JobHandler(CAHCoreMessages.LOG_COMPUTE_CAH) {
|
|
178 | 179 |
@Override |
179 | 180 |
protected IStatus run(IProgressMonitor monitor) { |
180 | 181 |
this.runInit(monitor); |
... | ... | |
188 | 189 |
|
189 | 190 |
getResultData().getCA().addResult(getResultData()); |
190 | 191 |
|
191 |
// Store result |
|
192 |
// if(chartEditor == null) { |
|
193 |
//// if (cah.getPartition() != null) { |
|
194 |
//// cah.getPartition().storeResult(cah); |
|
195 |
//// } |
|
196 |
//// else if (cah.getCorpus() != null) { |
|
197 |
//// cah.getCorpus().storeResult(cah); |
|
198 |
//// } |
|
199 |
|
|
200 | 192 |
// Refresh views |
201 | 193 |
this.syncExec(new Runnable() { |
202 | 194 |
@Override |
tmp/org.txm.cah.rcp/src/org/txm/cah/rcp/commands/ComputeCAH.java (revision 239) | ||
---|---|---|
27 | 27 |
// |
28 | 28 |
package org.txm.cah.rcp.commands; |
29 | 29 |
|
30 |
import org.eclipse.core.commands.AbstractHandler; |
|
31 | 30 |
import org.eclipse.core.commands.ExecutionEvent; |
32 | 31 |
import org.eclipse.core.commands.ExecutionException; |
33 |
import org.eclipse.core.runtime.IProgressMonitor; |
|
34 |
import org.eclipse.core.runtime.IStatus; |
|
35 |
import org.eclipse.core.runtime.Status; |
|
36 | 32 |
import org.eclipse.jface.dialogs.Dialog; |
37 | 33 |
import org.eclipse.jface.viewers.IStructuredSelection; |
38 | 34 |
import org.eclipse.jface.window.Window; |
... | ... | |
45 | 41 |
import org.eclipse.swt.widgets.Label; |
46 | 42 |
import org.eclipse.swt.widgets.Shell; |
47 | 43 |
import org.eclipse.swt.widgets.Spinner; |
48 |
import org.eclipse.ui.IWorkbenchPage; |
|
49 |
import org.eclipse.ui.IWorkbenchWindow; |
|
50 |
import org.eclipse.ui.PartInitException; |
|
51 |
import org.eclipse.ui.PlatformUI; |
|
52 | 44 |
import org.eclipse.ui.handlers.HandlerUtil; |
53 |
import org.txm.Toolbox; |
|
54 | 45 |
import org.txm.ca.core.functions.CA; |
55 | 46 |
import org.txm.ca.core.preferences.CAPreferences; |
56 | 47 |
import org.txm.cah.core.functions.CAH; |
48 |
import org.txm.cah.core.messages.CAHCoreMessages; |
|
57 | 49 |
import org.txm.cah.core.preferences.CAHPreferences; |
58 |
import org.txm.cah.rcp.messages.CAUIPMessages;
|
|
50 |
import org.txm.cah.rcp.messages.CAHUIMessages;
|
|
59 | 51 |
import org.txm.chartsengine.rcp.SWTChartsComponentsProvider; |
60 |
import org.txm.chartsengine.rcp.editors.ChartEditorInput; |
|
61 |
import org.txm.chartsengine.rcp.editors.ChartEditorPart; |
|
62 | 52 |
import org.txm.core.preferences.TXMPreferences; |
63 |
import org.txm.lexicaltable.functions.LexicalTableFactory; |
|
64 |
import org.txm.rcpapplication.JobsTimer; |
|
53 |
import org.txm.lexicaltable.core.functions.LexicalTableFactory; |
|
54 |
import org.txm.lexicaltable.core.statsengine.data.LexicalTable; |
|
55 |
import org.txm.lexicaltable.rcp.editors.LexicalTableDialog; |
|
56 |
import org.txm.rcp.handlers.BaseAbstractHandler; |
|
65 | 57 |
import org.txm.rcpapplication.TxmPreferences; |
66 |
import org.txm.rcpapplication.actions.LexicalTableDialog; |
|
67 |
import org.txm.rcpapplication.utils.JobHandler; |
|
68 |
import org.txm.rcpapplication.views.QueriesView; |
|
69 |
import org.txm.rcpapplication.views.RVariablesView; |
|
70 | 58 |
import org.txm.rcpapplication.views.corpora.CorporaView; |
71 | 59 |
import org.txm.searchengine.cqp.corpus.Partition; |
72 | 60 |
import org.txm.searchengine.cqp.corpus.Property; |
73 |
import org.txm.stat.StatException; |
|
74 |
import org.txm.stat.data.LexicalTable; |
|
75 |
import org.txm.stat.engine.r.RWorkspaceException; |
|
61 |
import org.txm.statsengine.core.StatException; |
|
76 | 62 |
import org.txm.utils.logger.Log; |
77 | 63 |
|
78 | 64 |
/** |
... | ... | |
81 | 67 |
* @author mdecorde |
82 | 68 |
* @author sjacquot |
83 | 69 |
*/ |
84 |
public class ComputeCAH extends AbstractHandler { |
|
70 |
public class ComputeCAH extends BaseAbstractHandler {
|
|
85 | 71 |
|
86 | 72 |
|
87 | 73 |
// adds a double click listener to the Corpus View |
... | ... | |
97 | 83 |
public Object execute(ExecutionEvent event) throws ExecutionException { |
98 | 84 |
|
99 | 85 |
|
100 |
if (!Toolbox.isStatEngineInitialized()) { |
|
101 |
System.out.println(CAUIPMessages.ComputeCAH_4); |
|
86 |
if(!this.checkStatsEngine()) { |
|
102 | 87 |
return null; |
103 | 88 |
} |
104 | 89 |
|
90 |
|
|
105 | 91 |
CAH cah = null; |
106 | 92 |
CA ca = null; |
107 | 93 |
LexicalTable lexicaltable = null; |
... | ... | |
135 | 121 |
//System.out.println("Compute CAH with Partition : "+((Partition)selection.getFirstElement()).getName()); |
136 | 122 |
partition = (Partition)selection.getFirstElement(); |
137 | 123 |
try { |
138 |
String title = CAUIPMessages.bind(CAUIPMessages.ComputeCAH_0, partition.getName());
|
|
124 |
String title = CAHUIMessages.bind(CAHUIMessages.ComputeCAH_0, partition.getName());
|
|
139 | 125 |
int vmax = TXMPreferences.getInt(CAPreferences.PREFERENCES_NODE, CAPreferences.V_MAX); |
140 | 126 |
int fmin = TXMPreferences.getInt(CAPreferences.PREFERENCES_NODE, CAPreferences.F_MIN); |
141 | 127 |
Shell shell = Display.getCurrent().getActiveShell(); |
... | ... | |
187 | 173 |
return null; |
188 | 174 |
} |
189 | 175 |
|
190 |
/** |
|
191 |
* Computes the CAH. Also creates the chart. Opens a chart editor if <code>chartEditor</code> is null otherwise refreshes the existing chart editor. |
|
192 |
* @param newResult |
|
193 |
* @throws RWorkspaceException |
|
194 |
*/ |
|
195 |
public static void compute(final CAH cah, final ChartEditorPart chartEditor) { |
|
196 | 176 |
|
197 |
// JobHandler jobhandler = new JobHandler(CAUIPMessages.CAHEditor_0) { |
|
198 |
// @Override |
|
199 |
// protected IStatus run(IProgressMonitor monitor) { |
|
200 |
// this.runInit(monitor); |
|
201 |
// try { |
|
202 |
// |
|
203 |
// this.acquireSemaphore(); |
|
204 |
// cah.stepCompute(); |
|
205 |
// this.releaseSemaphore(); |
|
206 |
// |
|
207 |
// // Store result |
|
208 |
// if(chartEditor == null) { |
|
209 |
//// if (cah.getPartition() != null) { |
|
210 |
//// cah.getPartition().storeResult(cah); |
|
211 |
//// } |
|
212 |
//// else if (cah.getCorpus() != null) { |
|
213 |
//// cah.getCorpus().storeResult(cah); |
|
214 |
//// } |
|
215 |
// cah.getCA().storeResult(cah); |
|
216 |
// } |
|
217 |
// |
|
218 |
// // Refresh views |
|
219 |
// this.syncExec(new Runnable() { |
|
220 |
// @Override |
|
221 |
// public void run() { |
|
222 |
// |
|
223 |
// // Create a new chart editor |
|
224 |
// if(chartEditor == null) { |
|
225 |
// SWTChartsComponentsProvider.getCurrent().openEditor(cah.getName(), cah, CAHPreferences.PREFERENCES_NODE); |
|
226 |
// } |
|
227 |
// // Refresh the existing chart editor |
|
228 |
//// else { |
|
229 |
//// // Create and load the new chart |
|
230 |
//// chartEditor.updateChart(); |
|
231 |
//// chartEditor.loadChart(); |
|
232 |
//// chartEditor.forceFocus(); |
|
233 |
//// } |
|
234 |
// |
|
235 |
// |
|
236 |
// // Refresh UI |
|
237 |
// CorporaView.refresh(); |
|
238 |
// CorporaView.expand(cah.getParent()); |
|
239 |
// QueriesView.refresh(); |
|
240 |
// RVariablesView.refresh(); |
|
241 |
// } |
|
242 |
// }); |
|
243 |
// |
|
244 |
// |
|
245 |
// } |
|
246 |
// catch (ThreadDeath td) { |
|
247 |
// return Status.CANCEL_STATUS; |
|
248 |
// } |
|
249 |
// catch (Exception e) { |
|
250 |
// System.out.println(e.getLocalizedMessage()); |
|
251 |
// org.txm.rcpapplication.utils.Logger.printStackTrace(e); |
|
252 |
// Log.severe("Error while computing CAH: "+e.getLocalizedMessage()); |
|
253 |
// } |
|
254 |
// finally { |
|
255 |
// monitor.done(); |
|
256 |
// JobsTimer.stopAndPrint(); |
|
257 |
// } |
|
258 |
// return Status.OK_STATUS; |
|
259 |
// } |
|
260 |
// }; |
|
261 |
// jobhandler.startJob(); |
|
262 | 177 |
|
263 |
} |
|
264 | 178 |
|
265 |
|
|
266 |
|
|
267 |
|
|
268 |
|
|
269 | 179 |
/** |
270 | 180 |
* The Class CAHParamDialog. |
271 | 181 |
*/ |
... | ... | |
289 | 199 |
*/ |
290 | 200 |
public CAHParamDialog(Shell parentShell) { |
291 | 201 |
super(parentShell); |
292 |
this.title = CAUIPMessages.CAHEditorTitle;
|
|
202 |
this.title = CAHCoreMessages.RESULT_TYPE;
|
|
293 | 203 |
} |
294 | 204 |
|
295 | 205 |
/* (non-Javadoc) |
... | ... | |
302 | 212 |
if (title != null) |
303 | 213 |
newShell.setText(title); |
304 | 214 |
else |
305 |
newShell.setText(CAUIPMessages.CAHEditorTitle);
|
|
215 |
newShell.setText(CAHCoreMessages.RESULT_TYPE);
|
|
306 | 216 |
} |
307 | 217 |
|
308 | 218 |
/** The composite. */ |
... | ... | |
331 | 241 |
|
332 | 242 |
// N CLUSTERS |
333 | 243 |
Label label = new Label(composite, SWT.NONE); |
334 |
label.setText(CAUIPMessages.CAHPreferencePage_2);
|
|
244 |
label.setText(CAHUIMessages.CAHPreferencePage_2);
|
|
335 | 245 |
|
336 | 246 |
nclusterSpinner = new Spinner(composite, SWT.BORDER); |
337 | 247 |
nclusterSpinner.setMinimum(2); |
... | ... | |
341 | 251 |
|
342 | 252 |
// ROWS OR COLS |
343 | 253 |
docolumnsButton = new Button(composite, SWT.RADIO); |
344 |
docolumnsButton.setText(CAUIPMessages.ComputeClassification_5);
|
|
254 |
docolumnsButton.setText(CAHUIMessages.COMPUTE_COLUMNS);
|
|
345 | 255 |
docolumnsButton.setSelection(true); |
346 | 256 |
|
347 | 257 |
Button dorowsButton = new Button(composite, SWT.RADIO); |
348 |
dorowsButton.setText(CAUIPMessages.ComputeClassification_6);
|
|
258 |
dorowsButton.setText(CAHUIMessages.COMPUTE_ROWS);
|
|
349 | 259 |
|
350 | 260 |
/* |
351 | 261 |
// METHODS |
tmp/org.txm.cah.rcp/src/org/txm/cah/rcp/preferences/CAHPreferencePage.java (revision 239) | ||
---|---|---|
33 | 33 |
import org.eclipse.swt.widgets.Composite; |
34 | 34 |
import org.eclipse.ui.IWorkbench; |
35 | 35 |
import org.txm.cah.core.functions.CAH; |
36 |
import org.txm.cah.core.messages.CAHCoreMessages; |
|
36 | 37 |
import org.txm.cah.core.preferences.CAHPreferences; |
37 | 38 |
import org.txm.cah.rcp.adapters.CAHAdapterFactory; |
38 |
import org.txm.cah.rcp.messages.CAUIPMessages;
|
|
39 |
import org.txm.cah.rcp.messages.CAHUIMessages;
|
|
39 | 40 |
import org.txm.chartsengine.rcp.SWTChartsComponentsProvider; |
40 | 41 |
import org.txm.rcp.preferences.TXMPreferencePage; |
41 | 42 |
import org.txm.rcp.preferences.TXMPreferenceStore; |
... | ... | |
54 | 55 |
public void createFieldEditors() { |
55 | 56 |
|
56 | 57 |
|
57 |
IntegerFieldEditor nClusters = new IntegerFieldEditor(CAHPreferences.N_CLUSTERS, CAUIPMessages.CAHPreferencePage_2, getFieldEditorParent());
|
|
58 |
IntegerFieldEditor nClusters = new IntegerFieldEditor(CAHPreferences.N_CLUSTERS, CAHUIMessages.CAHPreferencePage_2, getFieldEditorParent());
|
|
58 | 59 |
addField(nClusters); |
59 | 60 |
|
60 | 61 |
String list[] = CAH.getMethods(); |
... | ... | |
62 | 63 |
for(int i = 0 ; i < list.length ; i++) |
63 | 64 |
methods[i][0] = methods[i][1] = list[i]; |
64 | 65 |
|
65 |
ComboFieldEditor method = new ComboFieldEditor(CAHPreferences.METHOD, CAUIPMessages.CAHPreferencePage_3, methods, getFieldEditorParent());
|
|
66 |
ComboFieldEditor method = new ComboFieldEditor(CAHPreferences.METHOD, CAHUIMessages.CAHPreferencePage_3, methods, getFieldEditorParent());
|
|
66 | 67 |
addField(method); |
67 | 68 |
|
68 | 69 |
list = CAH.getMetrics(); |
... | ... | |
70 | 71 |
for(int i = 0 ; i < list.length ; i++) |
71 | 72 |
metrics[i][0] = metrics[i][1] = list[i]; |
72 | 73 |
|
73 |
ComboFieldEditor metric = new ComboFieldEditor(CAHPreferences.METRIC, CAUIPMessages.CAHPreferencePage_4, metrics, getFieldEditorParent());
|
|
74 |
ComboFieldEditor metric = new ComboFieldEditor(CAHPreferences.METRIC, CAHUIMessages.CAHPreferencePage_4, metrics, getFieldEditorParent());
|
|
74 | 75 |
addField(metric); |
75 | 76 |
|
76 | 77 |
|
... | ... | |
78 | 79 |
Composite chartsTab = SWTChartsComponentsProvider.createChartsRenderingPreferencesTabFolderComposite(getFieldEditorParent()); |
79 | 80 |
|
80 | 81 |
String[][] labelAndValues = {{"2D", "true"}, {"3D", "false"}}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ |
81 |
RadioGroupFieldEditor default2D3Ddisplay = new RadioGroupFieldEditor(CAHPreferences.DISPLAY_2D, CAUIPMessages.CAHPreferencePage_0, 2, labelAndValues, chartsTab);
|
|
82 |
RadioGroupFieldEditor default2D3Ddisplay = new RadioGroupFieldEditor(CAHPreferences.DISPLAY_2D, CAHUIMessages.CAHPreferencePage_0, 2, labelAndValues, chartsTab);
|
|
82 | 83 |
addField(default2D3Ddisplay); |
83 | 84 |
|
84 | 85 |
|
... | ... | |
90 | 91 |
public void init(IWorkbench workbench) { |
91 | 92 |
this.setPreferenceStore(new TXMPreferenceStore(CAHPreferences.PREFERENCES_NODE)); |
92 | 93 |
//setDescription("CAH"); |
93 |
this.setTitle(CAUIPMessages.CAHPreferencePage_2);
|
|
94 |
this.setTitle(CAHCoreMessages.RESULT_TYPE);
|
|
94 | 95 |
this.setImageDescriptor(CAHAdapterFactory.ICON); |
95 | 96 |
} |
96 | 97 |
|
tmp/org.txm.cah.rcp/src/org/txm/cah/rcp/messages/messages_ru_utf8.properties (revision 239) | ||
---|---|---|
1 |
CAHEditor_0=N/A_Computing CAH |
|
2 |
CAHPreferencePage_0=Показывать графики в 2D |
|
3 |
CAHPreferencePage_1=Классификация |
|
4 |
CAHPreferencePage_2=Число кластеров |
|
5 |
CAHPreferencePage_3=Метод |
|
6 |
CAHPreferencePage_4=Метрика |
|
7 |
ComputeCAH_0=Расчет Классификации {0} |
|
8 |
ComputeCAH_1=Показать график |
|
9 |
ComputeCAH_2=** Не удается записать данные во временный файл |
|
10 |
ComputeCAH_3=Расчет классификации с |
|
11 |
ComputeClassification_5=Колонки |
|
12 |
ComputeClassification_6=Строчки |
tmp/org.txm.cah.rcp/src/org/txm/cah/rcp/messages/CAUIPMessages.java (revision 239) | ||
---|---|---|
1 |
package org.txm.cah.rcp.messages; |
|
2 |
|
|
3 |
import org.eclipse.osgi.util.NLS; |
|
4 |
import org.txm.core.messages.TXMCoreMessages; |
|
5 |
|
|
6 |
public class CAUIPMessages extends NLS { |
|
7 |
|
|
8 |
// FIXME: use the same properties file than the bundle |
|
9 |
//private static final String BUNDLE_NAME = "l10n.bundle"; //$NON-NLS-1$ |
|
10 |
private static final String BUNDLE_NAME = "org.txm.cah.rcp.messages.messages"; //$NON-NLS-1$ |
|
11 |
|
|
12 |
|
|
13 |
public static String CAHPreferencePage_0; |
|
14 |
public static String CAHPreferencePage_2; |
|
15 |
public static String CAHPreferencePage_3; |
|
16 |
public static String CAHPreferencePage_4; |
|
17 |
|
|
18 |
public static String CAHEditor_0; |
|
19 |
|
|
20 |
public static String CAHEditor_PART_NAME_PREFIX; |
|
21 |
|
|
22 |
|
|
23 |
public static String ComputeCAH_0; |
|
24 |
public static String ComputeCAH_1; |
|
25 |
public static String ComputeCAH_2; |
|
26 |
public static String ComputeCAH_3; |
|
27 |
public static String ComputeCAH_4; |
|
28 |
public static String ComputeCAH_5; |
|
29 |
public static String ComputeCAH_6; |
|
30 |
|
|
31 |
public static String ComputeClassification_5; |
|
32 |
public static String ComputeClassification_6; |
|
33 |
|
|
34 |
public static String CAHEditorTitle; |
|
35 |
|
|
36 |
static { |
|
37 |
// initializes resource bundle |
|
38 |
TXMCoreMessages.initializeMessages(BUNDLE_NAME, CAUIPMessages.class); |
|
39 |
} |
|
40 |
|
|
41 |
private CAUIPMessages() { |
|
42 |
} |
|
43 |
} |
tmp/org.txm.cah.rcp/src/org/txm/cah/rcp/messages/messages_ru.properties (revision 239) | ||
---|---|---|
1 |
|
|
2 |
CAHPreferencePage_0 = Показывать графики в 2D |
|
3 |
CAHPreferencePage_2 = Число кластеров |
|
4 |
CAHPreferencePage_3 = Метод |
|
5 |
CAHPreferencePage_4 = Метрика |
|
6 |
|
|
7 |
COMPUTE_COLUMNS = Колонки |
|
8 |
COMPUTE_ROWS = Строчки |
|
9 |
|
|
10 |
ComputeCAH_0 = Расчет Классификации {0} |
|
11 |
ComputeCAH_1 = Показать график |
|
12 |
ComputeCAH_2 = ** Не удается записать данные во временный файл |
|
13 |
ComputeCAH_3 = Расчет классификации с |
|
0 | 14 |
tmp/org.txm.cah.rcp/src/org/txm/cah/rcp/messages/messages_fr.properties (revision 239) | ||
---|---|---|
1 |
CAHEditor_0=Calcul de la CAH |
|
2 |
CAHEditor_PART_NAME_PREFIX=Classification \: {0} |
|
3 |
CAHPreferencePage_0=Afficher les graphiques en 2D |
|
4 |
CAHPreferencePage_1=Classification |
|
5 |
CAHPreferencePage_2=Nombre de clusters |
|
6 |
CAHPreferencePage_3=Méthode |
|
7 |
CAHPreferencePage_4=Métrique |
|
8 |
ComputeCAH_0=Calcul de la Classification avec {0} |
|
9 |
ComputeCAH_1=Afficher le graphique |
|
10 |
ComputeCAH_2=** Impossible d'écrire dans le fichier temporaire |
|
11 |
ComputeCAH_3=Calcul de la classification avec |
|
12 |
ComputeCAH_5=Ouverture de la fenêtre de Classification |
|
13 |
ComputeCAH_6=Erreur lors de l'ouverture de l'éditeur de Classification \: {0} |
|
14 |
ComputeClassification_5=Classer les colonnes |
|
15 |
ComputeClassification_6=Classer les lignes |
|
1 |
|
|
2 |
CAHPreferencePage_0 = Afficher les graphiques en 2D |
|
3 |
|
|
4 |
CAHPreferencePage_2 = Nombre de clusters |
|
5 |
|
|
6 |
CAHPreferencePage_3 = Méthode |
|
7 |
|
|
8 |
CAHPreferencePage_4 = Métrique |
|
9 |
|
|
10 |
CHART_TOOLBAR_BUTTON_NUMBER_OF_CLUSTERS = Nombre de clusters : |
|
11 |
|
|
12 |
COMPUTE_COLUMNS = Classer les colonnes |
|
13 |
|
|
14 |
COMPUTE_ROWS = Classer les lignes |
|
15 |
|
|
16 |
ComputeCAH_0 = Calcul de la Classification avec {0} |
|
17 |
|
|
18 |
ComputeCAH_1 = Afficher le graphique |
|
19 |
|
|
20 |
ComputeCAH_2 = ** Impossible d'écrire dans le fichier temporaire |
|
21 |
|
|
22 |
ComputeCAH_3 = Calcul de la classification avec |
|
23 |
|
|
24 |
ComputeCAH_5 = Ouverture de la fenêtre de Classification |
|
25 |
|
|
26 |
ComputeCAH_6 = Erreur lors de l'ouverture de l'éditeur de Classification : {0} |
tmp/org.txm.cah.rcp/src/org/txm/cah/rcp/messages/CAHUIMessages.java (revision 239) | ||
---|---|---|
1 |
package org.txm.cah.rcp.messages; |
|
2 |
|
|
3 |
import org.eclipse.osgi.util.NLS; |
|
4 |
import org.txm.core.messages.TXMCoreMessages; |
|
5 |
|
|
6 |
public class CAHUIMessages extends NLS { |
|
7 |
|
|
8 |
private static final String BUNDLE_NAME = "org.txm.cah.rcp.messages.messages"; //$NON-NLS-1$ |
|
9 |
|
|
10 |
|
|
11 |
public static String CAHPreferencePage_0; |
|
12 |
public static String CAHPreferencePage_2; |
|
13 |
public static String CAHPreferencePage_3; |
|
14 |
public static String CAHPreferencePage_4; |
|
15 |
|
|
16 |
public static String ComputeCAH_0; |
|
17 |
|
|
18 |
//FIXME: these keys/values are not used, remove or use them? |
|
19 |
public static String ComputeCAH_1; |
|
20 |
public static String ComputeCAH_2; |
|
21 |
public static String ComputeCAH_3; |
|
22 |
public static String ComputeCAH_5; |
|
23 |
public static String ComputeCAH_6; |
|
24 |
// end of fixme |
|
25 |
|
|
26 |
public static String COMPUTE_COLUMNS; |
|
27 |
public static String COMPUTE_ROWS; |
|
28 |
|
|
29 |
public static String CHART_TOOLBAR_BUTTON_NUMBER_OF_CLUSTERS; |
|
30 |
|
|
31 |
static { |
|
32 |
// initializes resource bundle |
|
33 |
TXMCoreMessages.initializeMessages(BUNDLE_NAME, CAHUIMessages.class); |
|
34 |
} |
|
35 |
|
|
36 |
private CAHUIMessages() { |
|
37 |
//no instantiation |
|
38 |
} |
|
39 |
} |
|
0 | 40 |
tmp/org.txm.cah.rcp/src/org/txm/cah/rcp/messages/messages.properties (revision 239) | ||
---|---|---|
1 |
CAHEditor_PART_NAME_PREFIX=Classification\: {0} |
|
2 |
CAHEditorTitle=Classification |
|
3 |
CAHPreferencePage_0=Display chart in |
|
4 |
CAHPreferencePage_1=Classification |
|
5 |
CAHPreferencePage_2=Number of clusters |
|
6 |
CAHPreferencePage_3=Method |
|
7 |
CAHPreferencePage_4=Metric |
|
8 |
ComputeCAH_0=Compute Classification with {0} |
|
9 |
ComputeCAH_1=Show chart |
|
10 |
ComputeCAH_2=Error\: temporary file created cannot be written\: |
|
11 |
ComputeCAH_3=Computing CAH with |
|
12 |
ComputeCAH_4=Statistics Engine is not ready. Canceling command. |
|
13 |
ComputeCAH_5=Opening the Classification result |
|
14 |
ComputeCAH_6=Error while computing Classification\: {0} |
|
15 |
ComputeClassification_5=Compute columns |
|
16 |
ComputeClassification_6=Compute rows |
|
1 |
|
|
2 |
CAHPreferencePage_0 = Display chart in |
|
3 |
|
|
4 |
CAHPreferencePage_2 = Number of clusters |
|
5 |
|
|
6 |
CAHPreferencePage_3 = Method |
|
7 |
|
|
8 |
CAHPreferencePage_4 = Metric |
|
9 |
|
|
10 |
CHART_TOOLBAR_BUTTON_NUMBER_OF_CLUSTERS = Number of clusters: |
|
11 |
|
|
12 |
COMPUTE_COLUMNS = Compute columns |
|
13 |
|
|
14 |
COMPUTE_ROWS = Compute rows |
|
15 |
|
|
16 |
ComputeCAH_0 = Compute Classification with {0} |
|
17 |
|
|
18 |
ComputeCAH_1 = Show chart |
|
19 |
|
|
20 |
ComputeCAH_2 = Error: temporary file created cannot be written: |
|
21 |
|
|
22 |
ComputeCAH_3 = Computing CAH with |
|
23 |
|
|
24 |
ComputeCAH_5 = Opening the Classification result |
|
25 |
|
|
26 |
ComputeCAH_6 = Error while computing Classification: {0} |
tmp/org.txm.cah.rcp/OSGI-INF/l10n/bundle.properties (revision 239) | ||
---|---|---|
1 |
command.name=Classification |
|
2 |
command.tooltip=Classification |
|
3 |
editor.name=Classification |
|
4 |
page.name=Classification |
|
1 |
|
|
2 |
command.name = Classification |
|
3 |
|
|
4 |
command.tooltip = Compute classification |
|
5 |
|
|
6 |
editor.name = Classification |
|
7 |
|
|
8 |
page.name = Classification |
tmp/org.txm.cah.rcp/OSGI-INF/l10n/bundle_ru.properties (revision 239) | ||
---|---|---|
1 |
|
|
2 |
command.name = Классификация |
|
3 |
command.tooltip = Классификация |
|
4 |
|
|
5 |
page.name = Классификация |
tmp/org.txm.cah.rcp/.settings/org.eclipse.core.resources.prefs (revision 239) | ||
---|---|---|
1 | 1 |
eclipse.preferences.version=1 |
2 |
encoding//src/org/txm/cah/rcp/messages/messages_ru_utf8.properties=UTF-8 |
|
2 |
encoding//src/org/txm/cah/rcp/messages/messages_ru.properties=UTF-8 |
tmp/org.txm.cah.rcp/META-INF/MANIFEST.MF (revision 239) | ||
---|---|---|
16 | 16 |
org.eclipse.ui;bundle-version="3.106.1", |
17 | 17 |
org.eclipse.core.runtime;bundle-version="3.10.0", |
18 | 18 |
org.txm.ca.core, |
19 |
org.txm.lexicaltable.core;bundle-version="1.0.0" |
|
19 |
org.txm.lexicaltable.core;bundle-version="1.0.0", |
|
20 |
org.txm.lexicaltable.rcp;bundle-version="1.0.0" |
tmp/org.txm.cah.core/src/org/txm/cah/core/messages/messages_ru.properties (revision 239) | ||
---|---|---|
1 |
CAH_0=Error while exporting CAH result : |
|
1 |
|
|
2 |
RESULT_TYPE = Классификация |
tmp/org.txm.cah.core/src/org/txm/cah/core/messages/messages_fr.properties (revision 239) | ||
---|---|---|
1 |
CAH_0=Erreur durant l'export du résultat CAH : |
|
1 |
|
|
2 |
ERROR_EXPORT_TXT = Erreur durant l'export du résultat CAH : |
|
3 |
|
|
4 |
LOG_COMPUTE_CAH = Calcul de la CAH |
|
5 |
|
|
6 |
RESULT_TYPE = Classification |
tmp/org.txm.cah.core/src/org/txm/cah/core/messages/CAHCoreMessages.java (revision 239) | ||
---|---|---|
7 | 7 |
|
8 | 8 |
private static final String BUNDLE_NAME = "org.txm.cah.core.messages.messages"; //$NON-NLS-1$ |
9 | 9 |
|
10 |
public static String CAH_0; |
|
11 |
|
|
12 |
public static String CAHEditor_PART_NAME_PREFIX; |
|
13 |
public static String CAHEditorTitle; |
|
14 | 10 |
|
11 |
public static String RESULT_TYPE; |
|
12 |
|
|
13 |
public static String ERROR_EXPORT_TXT; |
|
14 |
public static String LOG_COMPUTE_CAH; |
|
15 |
|
|
16 |
|
|
17 |
|
|
15 | 18 |
static { |
16 | 19 |
// initialize resource bundle |
17 | 20 |
TXMCoreMessages.initializeMessages(BUNDLE_NAME, CAHCoreMessages.class); |
tmp/org.txm.cah.core/src/org/txm/cah/core/messages/messages.properties (revision 239) | ||
---|---|---|
1 |
CAH_0=Error while exporting CAH result : |
|
1 |
|
|
2 |
ERROR_EXPORT_TXT = Error while exporting CAH result: |
|
3 |
|
|
4 |
LOG_COMPUTE_CAH = Computing CAH |
|
5 |
|
|
6 |
RESULT_TYPE = Classification |
tmp/org.txm.cah.core/src/org/txm/cah/core/functions/CAH.java (revision 239) | ||
---|---|---|
35 | 35 |
import org.txm.cah.core.messages.CAHCoreMessages; |
36 | 36 |
import org.txm.core.results.ITXMResult; |
37 | 37 |
import org.txm.functions.Function; |
38 |
import org.txm.lexicaltable.core.statsengine.data.LexicalTable; |
|
38 | 39 |
import org.txm.searchengine.cqp.corpus.Corpus; |
39 | 40 |
import org.txm.searchengine.cqp.corpus.Partition; |
40 |
import org.txm.stat.data.LexicalTable; |
|
41 |
import org.txm.stat.engine.r.RWorkspace; |
|
42 |
import org.txm.stat.engine.r.RWorkspaceException; |
|
41 |
import org.txm.statsengine.r.core.RWorkspace; |
|
42 |
import org.txm.statsengine.r.core.RWorkspaceException; |
|
43 | 43 |
import org.txm.utils.logger.Log; |
44 | 44 |
|
45 | 45 |
/** |
... | ... | |
75 | 75 |
/** The source. */ |
76 | 76 |
Object source; |
77 | 77 |
|
78 |
/** The name. */ |
|
79 |
String name; |
|
80 |
|
|
81 | 78 |
/** |
82 | 79 |
* The coordinates of the clusters. |
83 | 80 |
*/ |
... | ... | |
140 | 137 |
this.partition = ca.getPartition(); |
141 | 138 |
this.corpus = ca.getCorpus(); |
142 | 139 |
this.target = ca.getSymbol(); |
143 |
this.name = ca.getName(); |
|
144 | 140 |
} |
145 | 141 |
|
146 | 142 |
/** |
... | ... | |
153 | 149 |
* @param NCluster the n cluster |
154 | 150 |
* @param displayMode the display mode |
155 | 151 |
*/ |
152 |
//FIXME: not used? |
|
156 | 153 |
public CAH(LexicalTable table, boolean col, String method, String metric, int NCluster) { |
157 | 154 |
super(table); |
158 | 155 |
this.columns = col; |
... | ... | |
164 | 161 |
this.partition = table.getPartition(); |
165 | 162 |
this.corpus = table.getCorpus(); |
166 | 163 |
this.target = table.getSymbol(); |
167 |
this.name = table.getName(); |
|
168 | 164 |
this.table = table; |
169 | 165 |
} |
170 | 166 |
|
... | ... | |
275 | 271 |
* @param encoding |
276 | 272 |
* @return |
277 | 273 |
*/ |
274 |
//FIXME: extract to future exporter extension |
|
275 |
@Deprecated |
|
278 | 276 |
public boolean toTxt(File outfile, String encoding) { |
279 | 277 |
boolean ret = true; |
280 | 278 |
acquireSemaphore(); |
... | ... | |
286 | 284 |
rw.eval("sink()"); //$NON-NLS-1$ |
287 | 285 |
} catch (RWorkspaceException e) { |
288 | 286 |
// TODO Auto-generated catch block |
289 |
System.out.println(CAHCoreMessages.CAH_0+e);
|
|
287 |
System.out.println(CAHCoreMessages.ERROR_EXPORT_TXT + e);
|
|
290 | 288 |
org.txm.utils.logger.Log.printStackTrace(e); |
291 | 289 |
ret = false; |
292 | 290 |
} finally { |
... | ... | |
295 | 293 |
return true; |
296 | 294 |
} |
297 | 295 |
|
296 |
//FIXME: extract to future exporter extension |
|
297 |
@Deprecated |
|
298 | 298 |
public boolean toTxt(File outfile, String encoding, String colsep, String txtsep) { |
299 | 299 |
return toTxt(outfile, encoding); |
300 | 300 |
} |
301 | 301 |
|
302 | 302 |
/** |
303 |
* Gets the name. |
|
304 |
* |
|
305 |
* @return the name |
|
306 |
*/ |
|
307 |
public String getName() { |
|
308 |
return name; |
|
309 |
} |
|
310 |
|
|
311 |
/** |
|
312 | 303 |
* Gets the source. |
313 | 304 |
* |
314 | 305 |
* @return the source |
... | ... | |
643 | 634 |
return table; |
644 | 635 |
} |
645 | 636 |
|
637 |
|
|
646 | 638 |
@Override |
639 |
public String getName() { |
|
640 |
return this.parent.getName(); |
|
641 |
} |
|
642 |
|
|
643 |
|
|
644 |
@Override |
|
647 | 645 |
public String getSimpleName() { |
648 |
// TODO Auto-generated method stub |
|
649 |
return null; |
|
646 |
return this.getName(); |
|
650 | 647 |
} |
651 | 648 |
|
652 | 649 |
@Override |
tmp/org.txm.chartsengine.r.core/src/org/txm/chartsengine/r/core/RChartsEngine.java (revision 239) | ||
---|---|---|
6 | 6 |
import org.txm.chartsengine.core.ChartsEngine; |
7 | 7 |
import org.txm.chartsengine.r.core.preferences.RChartsEnginePreferences; |
8 | 8 |
import org.txm.core.preferences.TXMPreferences; |
9 |
import org.txm.stat.StatException; |
|
10 | 9 |
import org.txm.stat.engine.r.RDevice; |
11 |
import org.txm.stat.engine.r.RWorkspace; |
|
12 |
import org.txm.stat.engine.r.RWorkspaceException; |
|
13 | 10 |
import org.txm.stat.engine.r.RWorkspaceRenderer; |
11 |
import org.txm.statsengine.core.StatException; |
|
12 |
import org.txm.statsengine.r.core.RWorkspace; |
|
13 |
import org.txm.statsengine.r.core.RWorkspaceException; |
|
14 | 14 |
import org.txm.utils.logger.Log; |
15 | 15 |
|
16 | 16 |
|
... | ... | |
82 | 82 |
*/ |
83 | 83 |
public void plot(File file, String expression) { |
84 | 84 |
try { |
85 |
RWorkspaceRenderer rw = RWorkspaceRenderer.getInstance(); |
|
86 |
rw.plot(file, expression, this.rDevice); |
|
85 |
RWorkspaceRenderer.getInstance().plot(file, expression, this.rDevice); |
|
87 | 86 |
} |
88 | 87 |
catch(RWorkspaceException e) { |
89 | 88 |
// TODO Auto-generated catch block |
tmp/org.txm.chartsengine.r.core/src/org/txm/stat/engine/r/RWorkspaceRenderer.java (revision 239) | ||
---|---|---|
35 | 35 |
import org.apache.commons.lang.StringEscapeUtils; |
36 | 36 |
import org.rosuda.REngine.REXP; |
37 | 37 |
import org.rosuda.REngine.REXPMismatchException; |
38 |
import org.txm.Messages; |
|
39 | 38 |
import org.txm.chartsengine.core.ChartsEngine; |
40 |
import org.txm.chartsengine.core.preferences.ChartsEnginePreferences; |
|
41 |
import org.txm.core.preferences.TXMPreferences; |
|
42 |
import org.txm.stat.StatException; |
|
39 |
import org.txm.core.messages.TXMCoreMessages; |
|
40 |
import org.txm.statsengine.core.StatException; |
|
41 |
import org.txm.statsengine.r.core.RWorkspace; |
|
42 |
import org.txm.statsengine.r.core.RWorkspaceException; |
|
43 |
import org.txm.statsengine.r.core.messages.RCoreMessages; |
|
43 | 44 |
import org.txm.utils.OSDetector; |
44 | 45 |
import org.txm.utils.logger.Log; |
45 | 46 |
|
... | ... | |
107 | 108 |
return; |
108 | 109 |
} |
109 | 110 |
if (!file.canWrite()) { |
110 |
System.out.println(Messages.LS_0+file+" cannot be written "); //$NON-NLS-1$ |
|
111 |
System.out.println(TXMCoreMessages.LS_0+file+" cannot be written "); //$NON-NLS-1$
|
|
111 | 112 |
} |
112 | 113 |
String devicename = device.getName(); |
113 | 114 |
|
114 | 115 |
String name; |
115 |
Log.info(Messages.RWorkspace_3 + file.getAbsolutePath()); |
|
116 |
Log.info(RCoreMessages.RWorkspace_3 + file.getAbsolutePath());
|
|
116 | 117 |
if (OSDetector.isFamilyWindows()) { //$NON-NLS-1$ //$NON-NLS-2$ |
117 | 118 |
try { |
118 | 119 |
name = StringEscapeUtils.escapeJava(file.getCanonicalPath()); |
tmp/org.txm.chartsengine.r.core/META-INF/MANIFEST.MF (revision 239) | ||
---|---|---|
3 | 3 |
Bundle-Name: R Charts Engine Core |
4 | 4 |
Bundle-SymbolicName: org.txm.chartsengine.r.core;singleton:=true |
5 | 5 |
Bundle-Version: 1.0.0.qualifier |
6 |
Require-Bundle: org.txm.r;bundle-version="1.0.0",
|
|
6 |
Require-Bundle: org.txm.statsengine.r.core;bundle-version="1.0.0",
|
|
7 | 7 |
org.eclipse.core.runtime, |
8 | 8 |
org.txm.chartsengine.core;bundle-version="1.0.0";visibility:=reexport, |
9 | 9 |
org.txm.core, |
tmp/org.txm.chartsengine.jfreechart.core/src/org/txm/chartsengine/jfreechart/core/themes/highcharts/defaulttheme/renderers/ItemSelectionCategoryBarRenderer.java (revision 239) | ||
---|---|---|
149 | 149 |
Number value = catDataset.getValue(row, column); |
150 | 150 |
|
151 | 151 |
return CustomHTMLToolTip.getDefaultHTMLBody(renderer, hex) + "<p>" + catDataset.getColumnKey(column) + "</p><p><span style=\"color: " + hex + ";\">" + catDataset.getRowKey(row) + "</span>" |
152 |
+ ChartsEngineCoreMessages.ChartsEngine_LABEL_VALUE_SEPARATORS + " <b>" + valuesNumberFormat.format(value) + "</b></p></body><html>";
|
|
152 |
+ ChartsEngineCoreMessages.CHARTS_LABEL_VALUE_SEPARATORS + " <b>" + valuesNumberFormat.format(value) + "</b></p></body><html>";
|
|
153 | 153 |
} |
154 | 154 |
}); |
155 | 155 |
} |
tmp/org.txm.chartsengine.jfreechart.core/src/org/txm/chartsengine/jfreechart/core/themes/highcharts/defaulttheme/renderers/ItemSelectionXYBarRenderer.java (revision 239) | ||
---|---|---|
84 | 84 |
} |
85 | 85 |
|
86 | 86 |
return CustomHTMLToolTip.getDefaultHTMLBody(renderer, hex) + "<p>" + label + "</p><p><span style=\"color: " + hex + ";\">" + xyDataset.getSeriesKey(series) + "</span>" |
87 |
+ ChartsEngineCoreMessages.ChartsEngine_LABEL_VALUE_SEPARATORS + " <b>" + RendererUtils.valuesNumberFormat.format(value) + "</b></p></body><html>";
|
|
87 |
+ ChartsEngineCoreMessages.CHARTS_LABEL_VALUE_SEPARATORS + " <b>" + RendererUtils.valuesNumberFormat.format(value) + "</b></p></body><html>";
|
|
88 | 88 |
} |
89 | 89 |
return ""; |
90 | 90 |
} |
tmp/org.txm.chartsengine.jfreechart.core/src/org/txm/chartsengine/jfreechart/core/themes/highcharts/defaulttheme/renderers/ItemSelectionCategoryLineAndShapeRenderer.java (revision 239) | ||
---|---|---|
86 | 86 |
|
87 | 87 |
DefaultCategoryDataset catDataset = (DefaultCategoryDataset) dataset; |
88 | 88 |
return CustomHTMLToolTip.getDefaultHTMLBody(renderer, hex) + "<p>" + catDataset.getColumnKey(column) + "</p><p><span style=\"color: " + hex + ";\">" + catDataset.getRowKey(row) |
89 |
+ ChartsEngineCoreMessages.ChartsEngine_LABEL_VALUE_SEPARATORS + " </span><b>" + catDataset.getValue(row, column) + "</b></p></body><html>";
|
|
89 |
+ ChartsEngineCoreMessages.CHARTS_LABEL_VALUE_SEPARATORS + " </span><b>" + catDataset.getValue(row, column) + "</b></p></body><html>";
|
|
90 | 90 |
} |
91 | 91 |
}); |
92 | 92 |
} |
tmp/org.txm.chartsengine.jfreechart.core/src/org/txm/chartsengine/jfreechart/core/themes/highcharts/defaulttheme/renderers/ItemSelectionCategoryStepRenderer.java (revision 239) | ||
---|---|---|
94 | 94 |
DefaultCategoryDataset catDataset = (DefaultCategoryDataset) dataset; |
95 | 95 |
Number value = catDataset.getValue(row, column); |
96 | 96 |
|
97 |
return CustomHTMLToolTip.getDefaultHTMLBody(renderer, hex) + "<p>" + catDataset.getColumnKey(column) + "</p><p><span style=\"color: " + hex + ";\">" + catDataset.getRowKey(row) + ChartsEngineCoreMessages.ChartsEngine_LABEL_VALUE_SEPARATORS
|
|
97 |
return CustomHTMLToolTip.getDefaultHTMLBody(renderer, hex) + "<p>" + catDataset.getColumnKey(column) + "</p><p><span style=\"color: " + hex + ";\">" + catDataset.getRowKey(row) + ChartsEngineCoreMessages.CHARTS_LABEL_VALUE_SEPARATORS
|
|
98 | 98 |
+ " </span><b>" + valuesNumberFormat.format(value) + "</b></p></body><html>"; |
99 | 99 |
} |
100 | 100 |
}); |
tmp/org.txm.chartsengine.jfreechart.core/src/org/txm/chartsengine/jfreechart/core/themes/highcharts/defaulttheme/renderers/ItemSelectionXYCardinalSplineRenderer.java (revision 239) | ||
---|---|---|
98 | 98 |
|
99 | 99 |
XYSeriesCollection xyDataset = (XYSeriesCollection) dataset; |
100 | 100 |
return CustomHTMLToolTip.getDefaultHTMLBody(renderer, hex) + "<p><span style=\"color: " + hex + ";\">" + xyDataset.getSeriesKey(series) + "</span></p><p><b>" + RendererUtils.valuesNumberFormat.format(xyDataset.getSeries(series).getY(item)) |
101 |
+ ChartsEngineCoreMessages.ChartsEngine_LABEL_VALUE_SEPARATORS + " </b><b>" + RendererUtils.valuesNumberFormat.format(xyDataset.getSeries(series).getX(item)) + "</b></p></body><html>";
|
|
101 |
+ ChartsEngineCoreMessages.CHARTS_LABEL_VALUE_SEPARATORS + " </b><b>" + RendererUtils.valuesNumberFormat.format(xyDataset.getSeries(series).getX(item)) + "</b></p></body><html>";
|
|
102 | 102 |
} |
103 | 103 |
}); |
104 | 104 |
|
tmp/org.txm.chartsengine.jfreechart.core/src/org/txm/chartsengine/jfreechart/core/themes/highcharts/defaulttheme/renderers/ItemSelectionXYSplineRenderer.java (revision 239) | ||
---|---|---|
116 | 116 |
|
117 | 117 |
XYSeriesCollection xyDataset = (XYSeriesCollection) dataset; |
118 | 118 |
return CustomHTMLToolTip.getDefaultHTMLBody(renderer, hex) + "<p><span style=\"color: " + hex + ";\">" + xyDataset.getSeriesKey(series) + "</span></p><p><b>" + xyDataset.getSeries(series).getY(item) |
119 |
+ ChartsEngineCoreMessages.ChartsEngine_LABEL_VALUE_SEPARATORS + " </b><b>" + xyDataset.getSeries(series).getX(item) + "</b></p></body><html>";
|
|
119 |
+ ChartsEngineCoreMessages.CHARTS_LABEL_VALUE_SEPARATORS + " </b><b>" + xyDataset.getSeries(series).getX(item) + "</b></p></body><html>";
|
|
120 | 120 |
} |
121 | 121 |
}); |
122 | 122 |
|
tmp/org.txm.chartsengine.jfreechart.core/src/org/txm/chartsengine/jfreechart/core/themes/highcharts/defaulttheme/renderers/ItemSelectionXYLineAndShapeRenderer.java (revision 239) | ||
---|---|---|
111 | 111 |
|
112 | 112 |
|
113 | 113 |
return CustomHTMLToolTip.getDefaultHTMLBody(renderer, hex) + "<p><span style=\"color: " + hex + ";\">" + label + "</span></p><p>" + xyDataset.getSeriesKey(series) |
114 |
+ ChartsEngineCoreMessages.ChartsEngine_LABEL_VALUE_SEPARATORS + " <b>" + valuesNumberFormat.format(xyDataset.getSeries(series).getY(item)) + "</b></p></body><html>";
|
|
114 |
+ ChartsEngineCoreMessages.CHARTS_LABEL_VALUE_SEPARATORS + " <b>" + valuesNumberFormat.format(xyDataset.getSeries(series).getY(item)) + "</b></p></body><html>";
|
|
115 | 115 |
} |
116 | 116 |
}); |
117 | 117 |
} |
tmp/org.txm.chartsengine.jfreechart.core/src/org/txm/chartsengine/jfreechart/core/themes/highcharts/defaulttheme/renderers/ItemSelectionXYStepRenderer.java (revision 239) | ||
---|---|---|
112 | 112 |
XYSeriesCollection xyDataset = (XYSeriesCollection) dataset; |
113 | 113 |
|
114 | 114 |
return CustomHTMLToolTip.getDefaultHTMLBody(renderer, hex) + "<p><span style=\"color: " + hex + ";\">" + xyDataset.getSeriesKey(series) |
115 |
+ "</span></p><p><b>" + RendererUtils.valuesNumberFormat.format(xyDataset.getSeries(series).getY(item)) + ChartsEngineCoreMessages.ChartsEngine_LABEL_VALUE_SEPARATORS
|
|
115 |
+ "</span></p><p><b>" + RendererUtils.valuesNumberFormat.format(xyDataset.getSeries(series).getY(item)) + ChartsEngineCoreMessages.CHARTS_LABEL_VALUE_SEPARATORS
|
|
116 | 116 |
+ " </b><b>" + RendererUtils.valuesNumberFormat.format(xyDataset.getSeries(series).getX(item)) + "</b></p></body><html>"; |
117 | 117 |
} |
118 | 118 |
}); |
tmp/org.txm.chartsengine.core/src/org/txm/chartsengine/core/ChartCreator.java (revision 239) | ||
---|---|---|
17 | 17 |
public abstract class ChartCreator { |
18 | 18 |
|
19 | 19 |
|
20 |
public final static String extensionPointId = "org.txm.chartsengine.chartcreator"; //$NON-NLS-1$ |
|
21 |
|
|
22 |
|
|
20 | 23 |
/** |
21 | 24 |
* Basic commands constants for chart updating. |
22 | 25 |
*/ |
tmp/org.txm.chartsengine.core/src/org/txm/chartsengine/core/messages/messages_fr.properties (revision 239) | ||
---|---|---|
1 |
ChartsEngine_CANT_CREATE_TMP_FILE_CHART=Impossible de créer le fichier temporaire du graphique |
|
2 |
ChartsEngine_CANT_WRITE_IN_FILE=Impossible d'écrire dans le fichier |
|
3 |
ChartsEngine_LABEL_VALUE_SEPARATORS=\u0020 |
|
1 |
|
|
2 |
CHARTS_LABEL_VALUE_SEPARATORS = \ |
|
3 |
|
|
4 |
ERROR_CANT_CREATE_TMP_FILE_CHART = Impossible de créer le fichier temporaire du graphique |
|
5 |
ERROR_CANT_WRITE_IN_FILE = Impossible d'écrire dans le fichier |
tmp/org.txm.chartsengine.core/src/org/txm/chartsengine/core/messages/ChartsEngineCoreMessages.java (revision 239) | ||
---|---|---|
9 | 9 |
|
10 | 10 |
private static final String BUNDLE_NAME = "org.txm.chartsengine.core.messages.messages"; //$NON-NLS-1$ |
11 | 11 |
|
12 |
public static String ChartsEngine_CANT_CREATE_TMP_FILE_CHART;
|
|
13 |
public static String ChartsEngine_CANT_WRITE_IN_FILE;
|
|
12 |
public static String ERROR_CANT_CREATE_TMP_FILE_CHART;
|
|
13 |
public static String ERROR_CANT_WRITE_IN_FILE;
|
|
14 | 14 |
|
15 |
public static String ChartsEngine_LABEL_VALUE_SEPARATORS;
|
|
15 |
public static String CHARTS_LABEL_VALUE_SEPARATORS;
|
|
16 | 16 |
|
17 | 17 |
|
18 | 18 |
static { |
tmp/org.txm.chartsengine.core/src/org/txm/chartsengine/core/messages/messages.properties (revision 239) | ||
---|---|---|
1 |
ChartsEngine_CANT_CREATE_TMP_FILE_CHART=Can't create temporary chart file |
|
2 |
ChartsEngine_CANT_WRITE_IN_FILE=Can't write in file |
|
3 |
ChartsEngine_LABEL_VALUE_SEPARATORS=\u0020 |
|
1 |
|
|
2 |
CHARTS_LABEL_VALUE_SEPARATORS = \ |
|
3 |
|
|
4 |
ERROR_CANT_CREATE_TMP_FILE_CHART = Can't create temporary chart file |
|
5 |
ERROR_CANT_WRITE_IN_FILE = Can't write in file |
tmp/org.txm.chartsengine.core/src/org/txm/chartsengine/core/ChartsEngine.java (revision 239) | ||
---|---|---|
14 | 14 |
import org.txm.chartsengine.core.preferences.ChartsEnginePreferences; |
15 | 15 |
import org.txm.chartsengine.core.results.IChartResult; |
16 | 16 |
import org.txm.core.preferences.TXMPreferences; |
17 |
import org.txm.core.results.ITXMResult; |
|
18 | 17 |
import org.txm.utils.logger.Log; |
19 | 18 |
|
20 | 19 |
|
... | ... | |
38 | 37 |
} |
39 | 38 |
|
40 | 39 |
|
40 |
public final static String extensionPointId = "org.txm.chartsengine.chartsengine"; //$NON-NLS-1$ |
|
41 | 41 |
|
42 |
|
|
42 | 43 |
/** |
43 | 44 |
* Chart type constants. |
44 | 45 |
*/ |
... | ... | |
206 | 207 |
ChartsEngine.chartsEngines = new ArrayList<ChartsEngine>(); |
207 | 208 |
ChartsEngine.currentChartsEngineIndex = 0; |
208 | 209 |
|
209 |
String extensionPointId = "org.txm.chartsengine.chartsengine"; //$NON-NLS-1$ |
|
210 |
IConfigurationElement[] contributions = Platform.getExtensionRegistry().getConfigurationElementsFor(extensionPointId); |
|
210 |
IConfigurationElement[] contributions = Platform.getExtensionRegistry().getConfigurationElementsFor(ChartsEngine.extensionPointId); |
|
211 | 211 |
|
212 | 212 |
for(int i = 0; i < contributions.length; i++) { |
213 | 213 |
try { |
... | ... | |
289 | 289 |
* @param chartsEngineName |
290 | 290 |
*/ |
291 | 291 |
protected void registerChartCreatorExtensions(Class chartsEngineClass) { |
292 |
String extensionPointId = "org.txm.chartsengine.chartcreator"; //$NON-NLS-1$ |
|
293 |
IConfigurationElement[] contributions = Platform.getExtensionRegistry().getConfigurationElementsFor(extensionPointId); |
|
292 |
IConfigurationElement[] contributions = Platform.getExtensionRegistry().getConfigurationElementsFor(ChartCreator.extensionPointId); |
|
294 | 293 |
|
295 | 294 |
for(int i = 0; i < contributions.length; i++) { |
296 | 295 |
|
... | ... | |
357 | 356 |
file = File.createTempFile(prefix, "." + this.outputFormat, resultsDir); |
358 | 357 |
} |
359 | 358 |
catch (IOException e) { |
360 |
Log.severe(ChartsEngineCoreMessages.ChartsEngine_CANT_CREATE_TMP_FILE_CHART + e);
|
|
359 |
Log.severe(ChartsEngineCoreMessages.ERROR_CANT_CREATE_TMP_FILE_CHART + e);
|
|
361 | 360 |
} |
362 | 361 |
|
363 | 362 |
// TODO : old code, useful ? and/or return null instead of the file if canWrite() return false ? |
364 | 363 |
if(!file.canWrite()) { |
365 |
Log.severe(ChartsEngineCoreMessages.ChartsEngine_CANT_WRITE_IN_FILE + file);
|
|
364 |
Log.severe(ChartsEngineCoreMessages.ERROR_CANT_WRITE_IN_FILE + file);
|
|
366 | 365 |
} |
367 | 366 |
return file; |
368 | 367 |
} |
Formats disponibles : Unified diff