Révision 1167
tmp/org.txm.ca.rcp/src/org/txm/ca/rcp/editors/CAFactorialMapChartEditor.java (revision 1167) | ||
---|---|---|
6 | 6 |
import org.eclipse.swt.events.SelectionListener; |
7 | 7 |
import org.eclipse.swt.widgets.Combo; |
8 | 8 |
import org.eclipse.swt.widgets.Label; |
9 |
import org.eclipse.swt.widgets.Spinner; |
|
9 | 10 |
import org.eclipse.swt.widgets.ToolItem; |
10 | 11 |
import org.txm.ca.core.functions.CA; |
11 | 12 |
import org.txm.ca.core.preferences.CAPreferences; |
... | ... | |
18 | 19 |
import org.txm.rcp.IImageKeys; |
19 | 20 |
import org.txm.rcp.editors.listeners.ComputeSelectionListener; |
20 | 21 |
import org.txm.rcp.swt.GLComposite; |
22 |
import org.txm.rcp.swt.widget.ThresholdsGroup; |
|
21 | 23 |
import org.txm.rcp.swt.widget.structures.PropertiesComboViewer; |
22 | 24 |
import org.txm.searchengine.cqp.clientExceptions.CqiClientException; |
23 | 25 |
import org.txm.searchengine.cqp.corpus.CQPCorpus; |
... | ... | |
71 | 73 |
protected PropertiesComboViewer unitPropertyComboViewer; |
72 | 74 |
|
73 | 75 |
|
76 |
/** |
|
77 |
* Minimum frequency filtering spinner. |
|
78 |
*/ |
|
79 |
@Parameter(key=TXMPreferences.F_MIN) |
|
80 |
protected Spinner fMinSpinner; |
|
81 |
|
|
82 |
/** |
|
83 |
* Maximum frequency filtering spinner. |
|
84 |
*/ |
|
85 |
@Parameter(key=TXMPreferences.F_MAX) |
|
86 |
protected Spinner fMaxSpinner; |
|
87 |
|
|
88 |
/** |
|
89 |
* Maximum number of lines filtering. |
|
90 |
*/ |
|
91 |
@Parameter(key=TXMPreferences.V_MAX) |
|
92 |
protected Spinner vMaxSpinner; |
|
74 | 93 |
|
75 | 94 |
|
76 | 95 |
/** |
... | ... | |
85 | 104 |
@Override |
86 | 105 |
public void __createPartControl() { |
87 | 106 |
|
107 |
// Main parameters |
|
88 | 108 |
|
89 | 109 |
try { |
90 |
// Main parameters |
|
91 | 110 |
GLComposite mainParametersArea = this.getMainParametersComposite(); |
92 | 111 |
mainParametersArea.getLayout().numColumns = 2; |
93 | 112 |
|
... | ... | |
181 | 200 |
plansCombo.select(0); |
182 | 201 |
} |
183 | 202 |
|
184 |
|
|
185 | 203 |
this.chartToolBar.addControl(plansCombo); |
186 | 204 |
|
187 |
|
|
188 |
|
|
189 | 205 |
// Listeners |
190 | 206 |
SelectionListener listener = new SelectionListener() { |
191 | 207 |
|
... | ... | |
226 | 242 |
// TODO Auto-generated method stub |
227 | 243 |
} |
228 | 244 |
}; |
245 |
plansCombo.addSelectionListener(listener); |
|
229 | 246 |
|
230 | 247 |
|
231 |
plansCombo.addSelectionListener(listener); |
|
248 |
|
|
249 |
// advanced parameters |
|
250 |
ThresholdsGroup thresholdsGroup = new ThresholdsGroup(this.getExtendedParametersComposite(), this); |
|
251 |
this.fMinSpinner = thresholdsGroup.getFMinSpinner(); |
|
252 |
this.fMaxSpinner = thresholdsGroup.getFMaxSpinner(); |
|
253 |
this.vMaxSpinner = thresholdsGroup.getVMaxSpinner(); |
|
254 |
|
|
232 | 255 |
|
233 | 256 |
} |
234 | 257 |
|
tmp/org.txm.specificities.core/src/org/txm/specificities/core/functions/Specificities.java (revision 1167) | ||
---|---|---|
179 | 179 |
|
180 | 180 |
this.frequencies = null; |
181 | 181 |
|
182 |
// delete the specificities selection chart children since they can not be valid anymore |
|
183 |
if (this.needsFullRecomputing || this.hasParameterChanged(TBXPreferences.UNIT_PROPERTY)) {
|
|
182 |
// delete the specificities selection chart children since they can not be valid anymore if the unit property has changed
|
|
183 |
if (this.hasParameterChanged(TBXPreferences.UNIT_PROPERTY)) { |
|
184 | 184 |
this.deleteChildren(SpecificitiesSelection.class); |
185 | 185 |
} |
186 | 186 |
|
tmp/org.txm.progression.core/src/org/txm/progression/core/preferences/ProgressionPreferences.java (revision 1167) | ||
---|---|---|
14 | 14 |
*/ |
15 | 15 |
public class ProgressionPreferences extends ChartsEnginePreferences { |
16 | 16 |
|
17 |
/** The Constant REPEAT_VALUES. */ |
|
17 |
/** |
|
18 |
* To repeat or not the same values of property area markers. |
|
19 |
*/ |
|
18 | 20 |
public static final String REPEAT_SAME_VALUES = "repeat_same_values"; //$NON-NLS-1$ |
19 | 21 |
|
20 |
/** The Constant REPEAT_VALUES. */ |
|
22 |
/** |
|
23 |
* REGEX used to filtering the property area markers. |
|
24 |
*/ |
|
21 | 25 |
public static final String PROPERTY_REGEX = "property_regex"; //$NON-NLS-1$ |
22 | 26 |
|
23 | 27 |
/** The Constant BANDE_MULTIPLIER. */ |
24 | 28 |
public static final String BANDE_MULTIPLIER = "bande_multiplier"; //$NON-NLS-1$ |
25 | 29 |
|
26 |
/** The Constant CUMULATIVE. */ |
|
30 |
/** |
|
31 |
* Type of chart: cumulative or density. |
|
32 |
*/ |
|
27 | 33 |
public static final String CHART_CUMULATIVE = "cumulative_chart"; //$NON-NLS-1$ |
28 | 34 |
|
29 | 35 |
|
tmp/org.txm.chartsengine.core/src/org/txm/chartsengine/core/results/ChartResult.java (revision 1167) | ||
---|---|---|
155 | 155 |
|
156 | 156 |
|
157 | 157 |
@Override |
158 |
public void setNeedsFullRecomputing(boolean needsFullRecomputing) { |
|
159 |
super.setNeedsFullRecomputing(needsFullRecomputing); |
|
160 |
//this.chart = null; |
|
161 |
} |
|
162 |
|
|
163 |
@Override |
|
164 | 158 |
public boolean compute(IProgressMonitor monitor) { |
165 | 159 |
|
166 | 160 |
try { |
... | ... | |
225 | 219 |
|
226 | 220 |
if(chartCreator != null) { |
227 | 221 |
|
222 |
// FIXME: fix #1 |
|
223 |
// FIXME: SJ: without this, this.hasParameterChanged(ChartsEnginePreferences.CHART_TYPE) returns true for results that added their computing parameters in the parameter history. |
|
224 |
// Since the stack is shared by computing and rendering parameters, this.hasParameterChanged(ChartsEnginePreferences.CHART_TYPE) returns true because the parameter doesn't exist in the last stack entry filled only with the computing parameter |
|
225 |
// may need to fix this in another way: |
|
226 |
// Solution 1: store two stacks, one for computing parameters and another for rendering parameters |
|
227 |
// Solution 2: stop to dissociate rendering parameters and computing parameters. Maybe the best way but need to check in this dissociation is very useless |
|
228 |
// clear the last commputing parameters |
|
229 |
this.clearLastComputingParameters(); |
|
228 | 230 |
|
229 | 231 |
// Creating, if needed. |
230 | 232 |
// The change of the chart type parameter can occur if: |
231 | 233 |
// - the chart has never been created |
232 | 234 |
// - the chart type has been changed, e.g. to dynamically change the type of chart or the current charts engine |
233 |
if (this.chart == null || this.hasParameterChanged(ChartsEnginePreferences.CHART_TYPE)) { |
|
235 |
if (this.chart == null || |
|
236 |
//(this.getLastParametersFromHistory().get(ChartsEnginePreferences.CHART_TYPE) != null && |
|
237 |
this.hasParameterChanged(ChartsEnginePreferences.CHART_TYPE) |
|
238 |
//) |
|
239 |
|
|
240 |
) { |
|
234 | 241 |
Log.finest("+++ ChartResult.renderChart(): creating chart."); //$NON-NLS-1$ |
235 | 242 |
|
236 | 243 |
this.chart = chartCreator.createChart(this); |
... | ... | |
243 | 250 |
// also before the call of this.updateLastParameters() to be able to check if a computing parameter has changed in the chart creators |
244 | 251 |
chartCreator.updateChart(this); |
245 | 252 |
|
253 |
// FIXME: needed by the above fix #1 |
|
254 |
// reupdate the last computing parameters |
|
255 |
this.updateLastParameters(); |
|
256 |
|
|
246 | 257 |
this.updateLastRenderingParameters(); |
247 | 258 |
|
248 | 259 |
this.needsToClearItemsSelection = false; |
... | ... | |
268 | 279 |
if (key.isEmpty()) { |
269 | 280 |
return false; |
270 | 281 |
} |
271 |
// if (this.isChartDirty()) { |
|
272 |
// return true; |
|
273 |
// } |
|
274 |
|
|
275 | 282 |
return super.hasParameterChanged(key); |
276 | 283 |
} |
277 | 284 |
|
... | ... | |
407 | 414 |
public void setChartType(String chartType) { |
408 | 415 |
this.chartType = chartType; |
409 | 416 |
// clear all last parameters to force a full recomputing |
410 |
this.clearLastComputingParameters(); |
|
411 |
this.clearLastRenderingParameters(); |
|
417 |
// this.clearLastComputingParameters();
|
|
418 |
// this.clearLastRenderingParameters();
|
|
412 | 419 |
} |
413 | 420 |
|
414 | 421 |
/** |
tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditor.java (revision 1167) | ||
---|---|---|
844 | 844 |
for (Field f : fields) { |
845 | 845 |
Parameter parameter = f.getAnnotation(Parameter.class); |
846 | 846 |
if (parameter == null |
847 |
|| parameter.key().isEmpty() || |
|
848 |
!this.getResult().hasParameterChanged(parameter.key(), this.lastComputingParameters)) { |
|
847 |
|| parameter.key().isEmpty() |
|
848 |
|
|
849 |
|
|
850 |
|
|
851 |
// FIXME: old version but doesn't not work with CA |
|
852 |
//|| !this.getResult().hasParameterChanged(parameter.key(), this.lastComputingParameters) |
|
853 |
// FIXME: new version |
|
854 |
//|| !this.getResult().hasParameterChanged(parameter.key()) |
|
855 |
|
|
856 |
|
|
857 |
) { |
|
849 | 858 |
continue; |
850 | 859 |
} |
851 | 860 |
|
... | ... | |
1039 | 1048 |
value = object; |
1040 | 1049 |
} |
1041 | 1050 |
|
1042 |
// FIXME: need to extend this list of managed Widgets |
|
1051 |
// FIXME: need to extend this list of managed Widgets if needed
|
|
1043 | 1052 |
|
1044 | 1053 |
this.getResult().setParameter(parameter.key(), value, true); // propagate to parent one time |
1045 | 1054 |
} |
tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/ThresholdsGroup.java (revision 1167) | ||
---|---|---|
1 |
/** |
|
2 |
* |
|
3 |
*/ |
|
4 |
package org.txm.rcp.swt.widget; |
|
5 |
|
|
6 |
import org.eclipse.swt.SWT; |
|
7 |
import org.eclipse.swt.layout.FormAttachment; |
|
8 |
import org.eclipse.swt.layout.FormData; |
|
9 |
import org.eclipse.swt.layout.GridData; |
|
10 |
import org.eclipse.swt.layout.GridLayout; |
|
11 |
import org.eclipse.swt.layout.RowLayout; |
|
12 |
import org.eclipse.swt.widgets.Composite; |
|
13 |
import org.eclipse.swt.widgets.Group; |
|
14 |
import org.eclipse.swt.widgets.Label; |
|
15 |
import org.eclipse.swt.widgets.Spinner; |
|
16 |
import org.txm.core.messages.TXMCoreMessages; |
|
17 |
import org.txm.rcp.editors.TXMEditor; |
|
18 |
import org.txm.rcp.editors.listeners.ComputeKeyListener; |
|
19 |
import org.txm.rcp.editors.listeners.ComputeSelectionListener; |
|
20 |
|
|
21 |
/** |
|
22 |
* Widget to manage shared thresholds : fmin, fmax and vmax. |
|
23 |
* |
|
24 |
* @author sjacquot |
|
25 |
* |
|
26 |
*/ |
|
27 |
public class ThresholdsGroup extends Group { |
|
28 |
|
|
29 |
|
|
30 |
/** |
|
31 |
* Minimum frequency filtering spinner. |
|
32 |
*/ |
|
33 |
protected Spinner fMinSpinner; |
|
34 |
|
|
35 |
/** |
|
36 |
* Maximum frequency filtering spinner. |
|
37 |
*/ |
|
38 |
protected Spinner fMaxSpinner; |
|
39 |
|
|
40 |
/** |
|
41 |
* Maximum number of lines filtering. |
|
42 |
*/ |
|
43 |
protected Spinner vMaxSpinner; |
|
44 |
|
|
45 |
|
|
46 |
/** |
|
47 |
* |
|
48 |
* @param parent |
|
49 |
* @param editor |
|
50 |
*/ |
|
51 |
public ThresholdsGroup(Composite parent, TXMEditor editor) { |
|
52 |
this(parent, SWT.NONE, editor); |
|
53 |
} |
|
54 |
|
|
55 |
|
|
56 |
/** |
|
57 |
* |
|
58 |
* @param parent |
|
59 |
* @param style |
|
60 |
* @param editor |
|
61 |
*/ |
|
62 |
public ThresholdsGroup(Composite parent, int style, TXMEditor editor) { |
|
63 |
this(parent, style, editor, true); |
|
64 |
} |
|
65 |
|
|
66 |
/** |
|
67 |
* |
|
68 |
* @param parent |
|
69 |
* @param style |
|
70 |
* @param editor |
|
71 |
*/ |
|
72 |
public ThresholdsGroup(Composite parent, int style, TXMEditor editor, boolean autoCompute) { |
|
73 |
super(parent, style); |
|
74 |
|
|
75 |
//this.setLayout(new RowLayout()); |
|
76 |
this.setText(TXMCoreMessages.common_thresholds); |
|
77 |
|
|
78 |
// Computing listeners |
|
79 |
ComputeSelectionListener computeSelectionListener = new ComputeSelectionListener(editor); |
|
80 |
ComputeKeyListener computeKeyListener = new ComputeKeyListener(editor); |
|
81 |
|
|
82 |
GridLayout gridLayout = new GridLayout(); |
|
83 |
gridLayout.numColumns = 6; |
|
84 |
gridLayout.makeColumnsEqualWidth = false; |
|
85 |
this.setLayout(gridLayout); |
|
86 |
|
|
87 |
// Fmin |
|
88 |
Label lFmin = new Label(this, SWT.NONE); |
|
89 |
lFmin.setText(TXMCoreMessages.common_fMin); |
|
90 |
lFmin.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false)); |
|
91 |
|
|
92 |
GridData fieldsGridData = new GridData(GridData.VERTICAL_ALIGN_END); |
|
93 |
fieldsGridData.minimumWidth = 100; |
|
94 |
|
|
95 |
fMinSpinner = new Spinner(this, SWT.BORDER); |
|
96 |
fMinSpinner.setMinimum(0); |
|
97 |
fMinSpinner.setMaximum(9999999); |
|
98 |
fMinSpinner.setIncrement(1); |
|
99 |
fMinSpinner.setPageIncrement(100); |
|
100 |
fMinSpinner.setLayoutData(fieldsGridData); |
|
101 |
|
|
102 |
// Fmax |
|
103 |
Label lFmax = new Label(this, SWT.NONE); |
|
104 |
lFmax.setText(TXMCoreMessages.common_fMax); |
|
105 |
lFmax.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false)); |
|
106 |
|
|
107 |
fMaxSpinner = new Spinner(this, SWT.BORDER); |
|
108 |
fMaxSpinner.setMinimum(0); |
|
109 |
fMaxSpinner.setMaximum(9999999); |
|
110 |
fMaxSpinner.setIncrement(1); |
|
111 |
fMaxSpinner.setPageIncrement(100); |
|
112 |
fMaxSpinner.setLayoutData(fieldsGridData); |
|
113 |
|
|
114 |
// Vmax |
|
115 |
Label lVmax = new Label(this, SWT.NONE); |
|
116 |
lVmax.setText(TXMCoreMessages.VMAX_1); |
|
117 |
lVmax.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false)); |
|
118 |
|
|
119 |
vMaxSpinner = new Spinner(this, SWT.BORDER); |
|
120 |
vMaxSpinner.setMinimum(0); |
|
121 |
vMaxSpinner.setMaximum(9999999); |
|
122 |
vMaxSpinner.setIncrement(1); |
|
123 |
vMaxSpinner.setPageIncrement(100); |
|
124 |
vMaxSpinner.setLayoutData(fieldsGridData); |
|
125 |
|
|
126 |
if(autoCompute) { |
|
127 |
fMinSpinner.addKeyListener(computeKeyListener); |
|
128 |
fMinSpinner.addSelectionListener(computeSelectionListener); |
|
129 |
fMaxSpinner.addKeyListener(computeKeyListener); |
|
130 |
fMaxSpinner.addSelectionListener(computeSelectionListener); |
|
131 |
vMaxSpinner.addKeyListener(computeKeyListener); |
|
132 |
vMaxSpinner.addSelectionListener(computeSelectionListener); |
|
133 |
} |
|
134 |
} |
|
135 |
|
|
136 |
/** |
|
137 |
* @return the fMinSpinner |
|
138 |
*/ |
|
139 |
public Spinner getFMinSpinner() { |
|
140 |
return fMinSpinner; |
|
141 |
} |
|
142 |
|
|
143 |
/** |
|
144 |
* @return the fMaxSpinner |
|
145 |
*/ |
|
146 |
public Spinner getFMaxSpinner() { |
|
147 |
return fMaxSpinner; |
|
148 |
} |
|
149 |
|
|
150 |
/** |
|
151 |
* @return the vMaxSpinner |
|
152 |
*/ |
|
153 |
public Spinner getVMaxSpinner() { |
|
154 |
return vMaxSpinner; |
|
155 |
} |
|
156 |
|
|
157 |
|
|
158 |
@Override |
|
159 |
protected void checkSubclass() { |
|
160 |
} |
|
161 |
|
|
162 |
} |
|
0 | 163 |
tmp/org.txm.tigersearch.rcp/src/org/txm/tigersearch/editors/TSIndexEditor.java (revision 1167) | ||
---|---|---|
592 | 592 |
filtercontrols.setLayout(gridLayout); |
593 | 593 |
|
594 | 594 |
Label tmp = new Label(filtercontrols, SWT.NONE); |
595 |
tmp.setText(IndexUIMessages.IndexEditor_9);
|
|
595 |
tmp.setText(TXMCoreMessages.common_thresholds);
|
|
596 | 596 |
tmp.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false)); |
597 | 597 |
|
598 | 598 |
Label lFmin = new Label(filtercontrols, SWT.NONE); |
tmp/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/data/VectorImpl.java (revision 1167) | ||
---|---|---|
151 | 151 |
super(symbol); |
152 | 152 |
try { |
153 | 153 |
length = rw.eval("length(" + symbol + ")").asInteger(); //$NON-NLS-1$ //$NON-NLS-2$ |
154 |
} catch (REXPMismatchException e) {
|
|
154 |
} catch (Exception e) { |
|
155 | 155 |
throw new RWorkspaceException(e); |
156 | 156 |
} |
157 | 157 |
} |
tmp/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/RWorkspace.java (revision 1167) | ||
---|---|---|
1065 | 1065 |
* @return the rEXP |
1066 | 1066 |
* @throws RWorkspaceException the r workspace exception |
1067 | 1067 |
*/ |
1068 |
public synchronized REXP eval(String exp) throws RWorkspaceException {
|
|
1068 |
public REXP eval(String exp) throws RWorkspaceException { |
|
1069 | 1069 |
REXP res = null; |
1070 | 1070 |
try { |
1071 | 1071 |
res = safeEval(exp); |
... | ... | |
1402 | 1402 |
* @throws RException the r exception |
1403 | 1403 |
* @throws REXPMismatchException the rEXP mismatch exception |
1404 | 1404 |
*/ |
1405 |
public synchronized REXP safeEval(String expr) throws RserveException, RException, REXPMismatchException {
|
|
1405 |
public REXP safeEval(String expr) throws RserveException, RException, REXPMismatchException { |
|
1406 | 1406 |
if (logging && inputLogger != null ) inputLogger.printMessage(expr); //$NON-NLS-1$ |
1407 | 1407 |
lastSafeevalExpr = expr; |
1408 | 1408 |
|
... | ... | |
1544 | 1544 |
|
1545 | 1545 |
try { |
1546 | 1546 |
safeEval(exp); |
1547 |
} catch (RserveException e) { |
|
1548 |
org.txm.utils.logger.Log.printStackTrace(e); |
|
1549 | 1547 |
} catch (Exception e) { |
1550 | 1548 |
org.txm.utils.logger.Log.printStackTrace(e); |
1551 | 1549 |
} |
tmp/org.txm.core/src/java/org/txm/core/results/TXMResult.java (revision 1167) | ||
---|---|---|
76 | 76 |
protected boolean hasBeenComputedOnce = false; |
77 | 77 |
|
78 | 78 |
/** |
79 |
* Can be used to know if an object needs a full recomputing. |
|
80 |
*/ |
|
81 |
protected boolean needsFullRecomputing = false; |
|
82 |
|
|
83 |
/** |
|
84 | 79 |
* The weight, essentially used for sorting purpose. |
85 | 80 |
*/ |
86 | 81 |
protected int weight; |
... | ... | |
105 | 100 |
* Command preferences node path. |
106 | 101 |
*/ |
107 | 102 |
protected String commandPreferencesNodePath; |
108 |
//protected IEclipsePreferences preferencesNode; |
|
103 |
//protected IEclipsePreferences preferencesNode; // TODO: directly use a preferences node rather than a node path?
|
|
109 | 104 |
|
110 | 105 |
/** |
111 | 106 |
* Parameters node path. Concatenation of the Project scope path + the result uuid |
... | ... | |
125 | 120 |
/** |
126 | 121 |
* To keep track of the parameters used for the last computing and to determine if the result is dirty. |
127 | 122 |
*/ |
128 |
//protected HashMap<String, Object> lastParameters = new HashMap<String, Object>(); |
|
129 |
|
|
130 | 123 |
// FIXME: SJ: actually only used by the chart results. Purpose here is that the chart creators need to know if a computing parameter has changed to recreate or not some entity. |
131 | 124 |
// The problem is since the result is already computing, the parameters are already updated and the method hasParameterChanged() will always return false. Using this stack fix the problem. |
132 | 125 |
// But this stack is also the start for an UNDO command on TXMResult. |
... | ... | |
211 | 204 |
try { |
212 | 205 |
this.uniqueID = parametersNodePath.substring(parametersNodePath.lastIndexOf("/") + 1); //$NON-NLS-1$ |
213 | 206 |
} |
214 |
// FIXME: essentially for the UUID "ROOT" defined in the Workspace class, see if we can do in another way |
|
207 |
// FIXME: essentially for the UUID "ROOT" defined in the Workspace class, see if we can do it in another way
|
|
215 | 208 |
catch (Exception e) { |
216 | 209 |
this.uniqueID = parametersNodePath; |
217 | 210 |
} |
... | ... | |
227 | 220 |
//this.children = Collections.synchronizedList(new ArrayList<TXMResult>()); // FIXME: SJ: can fix the conccurent excpetion if needed |
228 | 221 |
|
229 | 222 |
this.commandPreferencesNodePath = FrameworkUtil.getBundle(getClass()).getSymbolicName(); //$NON-NLS-1$ |
230 |
// if(parametersNodePath == null) { |
|
231 |
// //parametersNodeRootPath = "instance/"; //$NON-NLS-1$ |
|
232 |
// if(this.getProject() != null) { |
|
233 |
// parametersNodePath = "project/" + this.getProject().getName() + "/"; |
|
234 |
// } |
|
235 |
// } |
|
236 |
// String uuid = createUUID() + "_" + this.getClass().getSimpleName(); //$NON-NLS-1$ |
|
237 |
//this.parametersNodePath = parametersNodePath + this.uniqueID; //$NON-NLS-1$ |
|
238 | 223 |
Log.finest("TXMResult.TXMResult(): command preferences node path: " + this.commandPreferencesNodePath); |
239 | 224 |
|
240 | 225 |
|
... | ... | |
283 | 268 |
|
284 | 269 |
try { |
285 | 270 |
this.parametersHistory.add(new HashMap<String, Object>()); |
286 |
this.updateLastParameters(); |
|
271 |
//this.updateLastParameters();
|
|
287 | 272 |
} |
288 | 273 |
catch (Exception e) { |
289 | 274 |
// TODO Auto-generated catch block |
... | ... | |
291 | 276 |
} |
292 | 277 |
} |
293 | 278 |
|
279 |
/** |
|
280 |
* Sets the user name. |
|
281 |
* @param name |
|
282 |
*/ |
|
294 | 283 |
public void setUserName(String name) { |
295 |
userName = name; |
|
284 |
this.userName = name;
|
|
296 | 285 |
} |
297 | 286 |
|
298 | 287 |
|
... | ... | |
429 | 418 |
*/ |
430 | 419 |
protected void updateLastParameters(int parameterType, boolean appendToLastParameters) throws Exception { |
431 | 420 |
|
432 |
// FIXME: SJ: store in the history stack |
|
433 | 421 |
HashMap<String, Object> lastParameters; |
434 | 422 |
|
435 | 423 |
if(appendToLastParameters) { |
... | ... | |
505 | 493 |
} |
506 | 494 |
|
507 | 495 |
f.setAccessible(true); |
508 |
//this.lastParameters.remove(name); |
|
509 | 496 |
this.getLastParametersFromHistory().remove(name); |
510 | 497 |
} |
511 | 498 |
|
499 |
if(this.getLastParametersFromHistory().isEmpty()) { |
|
500 |
this.parametersHistory.remove(this.parametersHistory.size() - 1); |
|
501 |
} |
|
512 | 502 |
} |
513 | 503 |
|
514 | 504 |
|
... | ... | |
522 | 512 |
} |
523 | 513 |
|
524 | 514 |
|
525 |
// public HashMap<String, Object> getLastParameters() { |
|
526 |
// return lastParameters; |
|
527 |
// } |
|
528 |
// |
|
529 |
|
|
530 | 515 |
/** |
531 | 516 |
* Checks if a parameter value has changed since the n-2 computing. |
532 | 517 |
* This method permits to know, for example, if a parent that has already been computed was dirty before its computing, |
... | ... | |
719 | 704 |
|
720 | 705 |
f.setAccessible(true); // to be able to test the field values |
721 | 706 |
|
722 |
|
|
723 |
// FIXME: old version |
|
724 |
//Object previousValue = this.lastParameters.get(name); |
|
725 |
// FIXME: new version with stack |
|
726 | 707 |
Object previousValue = this.getLastParametersFromHistory().get(name); |
727 |
|
|
728 |
|
|
729 | 708 |
Object newValue = f.get(this); |
730 | 709 |
|
731 | 710 |
// // FIXME: debug |
... | ... | |
733 | 712 |
|
734 | 713 |
this.updateDirty(previousValue, newValue); |
735 | 714 |
if (this.dirty) { |
736 |
// FIXME: debug |
|
737 | 715 |
Log.finest("TXMResult.isDirtyFromHistory(): " + this.getClass().getSimpleName() + ": parameter " + name + " has changed."); |
738 | 716 |
return this.dirty; // no need to go further |
739 | 717 |
} |
... | ... | |
893 | 871 |
|
894 | 872 |
// internal data to save for unserialization |
895 | 873 |
this.saveParameter("class", this.getClass().getName()); //$NON-NLS-1$ |
896 |
// store the user name if exists, otherwise the simple name as lazy name (to display something at reloading otherwise the simple name can leads to error because the result is not computed until it will be reopen) |
|
897 | 874 |
|
898 | 875 |
this.saveParameter(TXMPreferences.RESULT_PARAMETERS_NODE_PATH, this.parametersNodePath); |
899 | 876 |
this.saveParameter(TXMPreferences.RESULT_UUID, this.uniqueID); |
... | ... | |
1837 | 1814 |
} |
1838 | 1815 |
} |
1839 | 1816 |
|
1840 |
//boolean d0 = this.isDirty(); |
|
1841 |
boolean d1 = this.needsFullRecomputing; // FIXME: SJ: need to try again to stop to use this parameter |
|
1842 |
boolean d2 = this.isDirtyFromHistory(); |
|
1843 |
boolean d3 = this.isDirty(); |
|
1844 |
if ( |
|
1845 |
!d1 && |
|
1846 |
|
|
1847 |
!d2 && !d3) { |
|
1817 |
boolean d1 = this.isDirtyFromHistory(); |
|
1818 |
boolean d2 = this.isDirty(); |
|
1819 |
if (!d1 && !d2) { |
|
1848 | 1820 |
// needsFullRecomputing == true && isDirtyFromHistory == true && isDirty == true |
1849 | 1821 |
Log.finest("--- TXMResult.compute(): " + this.getClass().getSimpleName() + ": result parameters have not changed since last computing, computing skipped."); |
1850 | 1822 |
skipComputing = true; |
... | ... | |
1884 | 1856 |
// clear the lazy name, no more needed since the object has been computed and getSimpleName() can now work |
1885 | 1857 |
this.lazyName = null; |
1886 | 1858 |
|
1859 |
// store last used parameters |
|
1860 |
this.updateLastParameters(); |
|
1861 |
|
|
1862 |
|
|
1887 | 1863 |
if(!skipComputing) { |
1888 | 1864 |
|
1889 | 1865 |
// store last used parameters |
1890 |
this.updateLastParameters(); |
|
1866 |
// this.updateLastParameters();
|
|
1891 | 1867 |
|
1892 | 1868 |
if (!this.autoSaveParametersFromAnnotations()) { |
1893 | 1869 |
Log.severe("TXMResult.compute(): " + this.getClass().getSimpleName() + ": failed to save parameters from annotations for " + this.getName() + "."); |
... | ... | |
1903 | 1879 |
|
1904 | 1880 |
this.dirty = false; // the computing was successful, the result is no more dirty |
1905 | 1881 |
this.hasBeenComputedOnce = true; |
1906 |
this.needsFullRecomputing = false; |
|
1907 | 1882 |
|
1908 | 1883 |
Log.finest("TXMResult.compute(): " + this.getClass().getSimpleName() + ": computing of result type " + this.getClass() + " done."); |
1909 | 1884 |
|
... | ... | |
1922 | 1897 |
// this.getChild(i).setDirty(); // force recomputing even if some parameters of the result itself have not changed |
1923 | 1898 |
|
1924 | 1899 |
// FIXME: SJ: need to try again to stop to use this parameter |
1925 |
this.children.get(i).setNeedsFullRecomputing(true); // force recomputing even if some parameters of the result itself have not changed |
|
1900 |
//this.children.get(i).setNeedsFullRecomputing(true); // force recomputing even if some parameters of the result itself have not changed
|
|
1926 | 1901 |
|
1927 | 1902 |
// recompute only children that has been opened once |
1928 | 1903 |
//if (child.hasBeenComputedOnce()) { |
... | ... | |
2242 | 2217 |
} |
2243 | 2218 |
|
2244 | 2219 |
/** |
2245 |
* @return the needsFullRecomputing |
|
2246 |
*/ |
|
2247 |
public boolean needsFullRecomputing() { |
|
2248 |
return needsFullRecomputing; |
|
2249 |
} |
|
2250 |
|
|
2251 |
/** |
|
2252 |
* @param needsFullRecomputing the needsFullRecomputing to set |
|
2253 |
*/ |
|
2254 |
public void setNeedsFullRecomputing(boolean needsFullRecomputing) { |
|
2255 |
this.needsFullRecomputing = needsFullRecomputing; |
|
2256 |
} |
|
2257 |
|
|
2258 |
/** |
|
2259 | 2220 |
* @return the parametersHistory |
2260 | 2221 |
*/ |
2261 | 2222 |
public ArrayList<HashMap<String, Object>> getParametersHistory() { |
tmp/org.txm.core/src/java/org/txm/core/messages/messages_ru.properties (revision 1167) | ||
---|---|---|
18 | 18 |
common_query = Запрос: |
19 | 19 |
common_structuralUnit = Структурная единица: |
20 | 20 |
common_structure = Структура |
21 |
common_thresholds = Пороги |
|
21 | 22 |
common_units = Единицы |
22 | 23 |
|
23 | 24 |
error_error2 = |
tmp/org.txm.core/src/java/org/txm/core/messages/TXMCoreMessages.java (revision 1167) | ||
---|---|---|
37 | 37 |
public static String common_rows; |
38 | 38 |
public static String common_structuralUnit; |
39 | 39 |
public static String common_structure; |
40 |
public static String common_thresholds; |
|
40 | 41 |
public static String common_units; |
41 | 42 |
|
42 | 43 |
public static String error_error2; |
tmp/org.txm.core/src/java/org/txm/core/messages/messages_fr.properties (revision 1167) | ||
---|---|---|
287 | 287 |
common_reference = Référence |
288 | 288 |
common_rows = Lignes |
289 | 289 |
common_structure = Structure |
290 |
common_thresholds = Seuils |
|
290 | 291 |
common_units = Unités |
291 | 292 |
|
292 | 293 |
error_error = ** Erreur : {0}. |
tmp/org.txm.core/src/java/org/txm/core/messages/messages.properties (revision 1167) | ||
---|---|---|
301 | 301 |
common_rows = Rows |
302 | 302 |
common_structuralUnit = Structural Unit: |
303 | 303 |
common_structure = Structure |
304 |
common_thresholds = Thresholds |
|
304 | 305 |
common_units = Units |
305 | 306 |
|
306 | 307 |
error_error = ** Error: {0}. |
tmp/org.txm.index.rcp/src/org/txm/index/rcp/messages/messages_ru.properties (revision 1167) | ||
---|---|---|
4 | 4 |
IndexEditor_0 = Запрос пуст |
5 | 5 |
IndexEditor_1 = ** Не удалось вычислить индекс |
6 | 6 |
IndexEditor_10 = N/A_CQP error: |
7 |
IndexEditor_17 = |
|
8 |
IndexEditor_18 = |
|
7 | 9 |
IndexEditor_2 = Индекс <{0}> со свойством {1} в корпусе {2} |
8 | 10 |
IndexEditor_20 = Индекс <{0}> со свойством {1} в корпусе {2} |
9 | 11 |
IndexEditor_22 = Не удается инициализировать таблицу индекса |
12 |
IndexEditor_25 = |
|
13 |
IndexEditor_26 = |
|
14 |
IndexEditor_27 = |
|
15 |
IndexEditor_28 = |
|
10 | 16 |
IndexEditor_29 = Открытие таблицы индекса |
17 |
IndexEditor_3 = |
|
18 |
IndexEditor_31 = |
|
11 | 19 |
IndexEditor_33 = Расчет индекса |
20 |
IndexEditor_36 = |
|
21 |
IndexEditor_37 = |
|
22 |
IndexEditor_4 = |
|
23 |
IndexEditor_5 = |
|
24 |
IndexEditor_6 = |
|
25 |
IndexEditor_7 = |
|
12 | 26 |
IndexEditor_8 = Число результатов на странице: |
13 |
IndexEditor_9 = Пороги: |
|
14 |
|
|
15 |
IndexEditor_17 = |
|
16 |
IndexEditor_18= |
|
17 |
IndexEditor_25= |
|
18 |
IndexEditor_26= |
|
19 |
IndexEditor_27= |
|
20 |
IndexEditor_28= |
|
21 |
IndexEditor_3= |
|
22 |
IndexEditor_31= |
|
23 |
IndexEditor_36= |
|
24 |
IndexEditor_37= |
|
25 |
IndexEditor_4= |
|
26 |
IndexEditor_5= |
|
27 |
IndexEditor_6= |
|
28 |
IndexEditor_7= |
tmp/org.txm.index.rcp/src/org/txm/index/rcp/messages/messages_fr.properties (revision 1167) | ||
---|---|---|
1 |
|
|
1 | 2 |
ComputeIndex_0 = Ouverture de l'Index |
3 |
|
|
2 | 4 |
IndexEditor_0 = La requête est vide |
3 | 5 |
IndexEditor_1 = ** Échec du calcul de l'index |
4 | 6 |
IndexEditor_10 = Echec de la récupération de la dernière erreur CQP : |
7 |
IndexEditor_17 = |
|
8 |
IndexEditor_18 = |
|
5 | 9 |
IndexEditor_2 = Index de <{0}> avec la propriété {1} dans le corpus {2} |
6 | 10 |
IndexEditor_20 = Index de <{0}> avec la propriété {1} dans la partition {2} |
7 | 11 |
IndexEditor_22 = Impossible d'initialiser le tableau d'index |
12 |
IndexEditor_25 = |
|
13 |
IndexEditor_26 = |
|
14 |
IndexEditor_27 = |
|
15 |
IndexEditor_28 = |
|
8 | 16 |
IndexEditor_29 = Ouverture du tableau d'index |
17 |
IndexEditor_3 = |
|
18 |
IndexEditor_31 = |
|
9 | 19 |
IndexEditor_33 = Calcul de l'index |
20 |
IndexEditor_36 = |
|
21 |
IndexEditor_37 = |
|
22 |
IndexEditor_4 = |
|
23 |
IndexEditor_5 = |
|
24 |
IndexEditor_6 = |
|
25 |
IndexEditor_7 = |
|
10 | 26 |
IndexEditor_8 = Résultats par page |
11 |
IndexEditor_9 = Seuils : |
|
12 |
IndexEditor_17 = |
|
13 |
IndexEditor_18= |
|
14 |
IndexEditor_25= |
|
15 |
IndexEditor_26= |
|
16 |
IndexEditor_27= |
|
17 |
IndexEditor_28= |
|
18 |
IndexEditor_3= |
|
19 |
IndexEditor_31= |
|
20 |
IndexEditor_36= |
|
21 |
IndexEditor_37= |
|
22 |
IndexEditor_4= |
|
23 |
IndexEditor_5= |
|
24 |
IndexEditor_6= |
|
25 |
IndexEditor_7= |
tmp/org.txm.index.rcp/src/org/txm/index/rcp/messages/IndexUIMessages.java (revision 1167) | ||
---|---|---|
41 | 41 |
public static String IndexEditor_6; |
42 | 42 |
public static String IndexEditor_7; |
43 | 43 |
public static String IndexEditor_8; |
44 |
public static String IndexEditor_9; |
|
45 | 44 |
public static String ComputeIndex_0; |
46 | 45 |
|
47 | 46 |
|
tmp/org.txm.index.rcp/src/org/txm/index/rcp/messages/messages.properties (revision 1167) | ||
---|---|---|
4 | 4 |
IndexEditor_0 = Index: query is empty |
5 | 5 |
IndexEditor_1 = ** Failed to compute index |
6 | 6 |
IndexEditor_10 = CQP error: |
7 |
IndexEditor_17 = |
|
8 |
IndexEditor_18 = |
|
7 | 9 |
IndexEditor_2 = Index of <{0}> with property: {1} in the corpus: {2} |
8 | 10 |
IndexEditor_20 = Index of <{0}> with property: {1} in the partition: {2} |
9 | 11 |
IndexEditor_22 = Couldn't initialize Index table |
12 |
IndexEditor_25 = |
|
13 |
IndexEditor_26 = |
|
14 |
IndexEditor_27 = |
|
15 |
IndexEditor_28 = |
|
10 | 16 |
IndexEditor_29 = Opening the Index results |
17 |
IndexEditor_3 = |
|
18 |
IndexEditor_31 = |
|
11 | 19 |
IndexEditor_33 = Computing index |
20 |
IndexEditor_36 = |
|
21 |
IndexEditor_37 = |
|
22 |
IndexEditor_4 = |
|
23 |
IndexEditor_5 = |
|
24 |
IndexEditor_6 = |
|
25 |
IndexEditor_7 = |
|
12 | 26 |
IndexEditor_8 = Page size |
13 |
IndexEditor_9 = Thresholds: |
|
14 | 27 |
|
15 |
IndexEditor_17 = |
|
16 |
IndexEditor_18= |
|
17 |
IndexEditor_25= |
|
18 |
IndexEditor_26= |
|
19 |
IndexEditor_27= |
|
20 |
IndexEditor_28= |
|
21 |
IndexEditor_3= |
|
22 |
IndexEditor_31= |
|
23 |
IndexEditor_36= |
|
24 |
IndexEditor_37= |
|
25 |
IndexEditor_4= |
|
26 |
IndexEditor_5= |
|
27 |
IndexEditor_6= |
|
28 |
IndexEditor_7= |
|
28 |
composite_infos = Infos |
|
29 | 29 |
|
30 |
composite_infos=Infos |
|
31 |
preference_number_of_lines_per_page=Number of lines per result page |
|
32 |
preference_title=Index |
|
30 |
preference_number_of_lines_per_page = Number of lines per result page |
|
31 |
preference_title = Index |
tmp/org.txm.index.rcp/src/org/txm/index/rcp/editors/PartitionIndexEditor.java (revision 1167) | ||
---|---|---|
233 | 233 |
filtercontrols.setLayout(gridLayout); |
234 | 234 |
|
235 | 235 |
Label tmp = new Label(filtercontrols, SWT.NONE); |
236 |
tmp.setText(IndexUIMessages.IndexEditor_9);
|
|
236 |
tmp.setText(TXMCoreMessages.common_thresholds);
|
|
237 | 237 |
tmp.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false)); |
238 | 238 |
|
239 | 239 |
Label lFmin = new Label(filtercontrols, SWT.NONE); |
tmp/org.txm.index.rcp/src/org/txm/index/rcp/editors/IndexEditor.java (revision 1167) | ||
---|---|---|
129 | 129 |
@Parameter(key=TXMPreferences.QUERY) |
130 | 130 |
protected AssistedChoiceQueryWidget queryWidget; |
131 | 131 |
|
132 |
/** The Fmin spinner. */ |
|
132 |
/** |
|
133 |
* Minimum frequency filtering spinner. |
|
134 |
*/ |
|
133 | 135 |
@Parameter(key=TXMPreferences.F_MIN) |
134 | 136 |
protected Spinner fMinSpinner; |
135 | 137 |
|
136 |
/** The Fmax spinner. */ |
|
138 |
/** |
|
139 |
* Maximum frequency filtering spinner. |
|
140 |
*/ |
|
137 | 141 |
@Parameter(key=TXMPreferences.F_MAX) |
138 | 142 |
protected Spinner fMaxSpinner; |
139 | 143 |
|
140 |
/** The Tmax spinner. */ |
|
144 |
/** |
|
145 |
* Maximum number of lines filtering. |
|
146 |
*/ |
|
141 | 147 |
@Parameter(key=TXMPreferences.V_MAX) |
142 | 148 |
protected Spinner vMaxSpinner; |
143 | 149 |
|
... | ... | |
167 | 173 |
ComputeSelectionListener computeSelectionListener = new ComputeSelectionListener(this); |
168 | 174 |
ComputeKeyListener computeKeyListener = new ComputeKeyListener(this); |
169 | 175 |
|
170 |
Composite paramArea = this.getExtendedParametersComposite();
|
|
171 |
paramArea.setLayout(new FormLayout());
|
|
176 |
Composite extendedParametersComposite = this.getExtendedParametersComposite();
|
|
177 |
extendedParametersComposite.setLayout(new FormLayout());
|
|
172 | 178 |
|
173 | 179 |
// info&navigation panel |
174 | 180 |
final GLComposite infosArea = this.getBottomToolbar().installGLComposite(IndexUIMessages.composite_infos, 1, false); |
... | ... | |
177 | 183 |
|
178 | 184 |
// on créé une Query, ici le pivot de la concordance est "[]" |
179 | 185 |
// Query Area: query itself + view properties |
180 |
Composite queryArea = new Composite(paramArea, SWT.NONE);
|
|
186 |
Composite queryArea = new Composite(extendedParametersComposite, SWT.NONE);
|
|
181 | 187 |
|
182 | 188 |
FormData queryLayoutData = new FormData(); |
183 | 189 |
queryLayoutData.top = new FormAttachment(0); |
... | ... | |
223 | 229 |
propertiesSelector.addSelectionListener(computeSelectionListener); |
224 | 230 |
|
225 | 231 |
// Filters |
226 |
Composite filtercontrols = new Composite(paramArea, SWT.NONE);
|
|
232 |
Composite filtercontrols = new Composite(extendedParametersComposite, SWT.NONE);
|
|
227 | 233 |
FormData filtersLayoutData = new FormData(); |
228 | 234 |
filtersLayoutData.top = new FormAttachment(queryArea, 0); |
229 | 235 |
filtersLayoutData.bottom = new FormAttachment(100); |
... | ... | |
236 | 242 |
gridLayout.makeColumnsEqualWidth = false; |
237 | 243 |
filtercontrols.setLayout(gridLayout); |
238 | 244 |
|
239 |
Label tmp = new Label(filtercontrols, SWT.NONE);
|
|
240 |
tmp.setText(IndexUIMessages.IndexEditor_9);
|
|
241 |
tmp.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));
|
|
245 |
Label thresholds = new Label(filtercontrols, SWT.NONE);
|
|
246 |
thresholds.setText(TXMCoreMessages.common_thresholds);
|
|
247 |
thresholds.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));
|
|
242 | 248 |
|
243 | 249 |
Label lFmin = new Label(filtercontrols, SWT.NONE); |
244 | 250 |
lFmin.setText(TXMCoreMessages.common_fMin); |
... | ... | |
477 | 483 |
separatorColumn = new TableColumn(viewer.getTable(), SWT.LEFT); |
478 | 484 |
separatorColumn.setText(""); //$NON-NLS-1$ |
479 | 485 |
separatorColumn.pack(); |
480 |
paramArea.pack();
|
|
486 |
extendedParametersComposite.pack();
|
|
481 | 487 |
|
482 | 488 |
// Add double click, "Send to" command |
483 | 489 |
TXMEditor.addDoubleClickCommandListener(viewer.getTable(), 1, "org.txm.concordance.rcp.handlers.ComputeConcordance"); //$NON-NLS-1$ |
tmp/org.txm.progression.rcp/src/org/txm/progression/rcp/editors/ProgressionEditor.java (revision 1167) | ||
---|---|---|
117 | 117 |
protected Text propertyRegex; |
118 | 118 |
|
119 | 119 |
/** |
120 |
* Mono style. Same lines styles.
|
|
120 |
* Multiple line styles.
|
|
121 | 121 |
*/ |
122 | 122 |
@Parameter(key=ChartsEnginePreferences.MULTIPLE_LINE_STROKES) |
123 | 123 |
protected Button multipleLineStrokes; |
Formats disponibles : Unified diff