Révision 2655
| tmp/org.txm.core/src/java/org/txm/core/results/TXMResult.java (revision 2655) | ||
|---|---|---|
| 517 | 517 |
} |
| 518 | 518 |
|
| 519 | 519 |
/** |
| 520 |
* Stores the parameters of the specified type used for last computing.
|
|
| 520 |
* Stores the parameters of the specified types used for last computing in the specified HashMap.
|
|
| 521 | 521 |
* |
| 522 | 522 |
* @param parameterTypes |
| 523 | 523 |
* @param appendToLastParameters |
| 524 | 524 |
* @throws Exception |
| 525 | 525 |
*/ |
| 526 |
protected void updateLastParameters(ArrayList<Integer> parametersTypes) throws Exception {
|
|
| 526 |
protected void updateLastParameters(ArrayList<Integer> parametersTypes, HashMap<String, Object> lastParameters) throws Exception {
|
|
| 527 | 527 |
|
| 528 |
HashMap<String, Object> lastParameters; |
|
| 529 |
|
|
| 530 |
lastParameters = new HashMap<>(); |
|
| 531 |
|
|
| 532 | 528 |
List<Field> fields = this.getAllFields(); |
| 533 | 529 |
|
| 534 | 530 |
for (Field f : fields) {
|
| ... | ... | |
| 566 | 562 |
} |
| 567 | 563 |
|
| 568 | 564 |
/** |
| 565 |
* Stores the last parameters of the specified types used for computing. |
|
| 566 |
* |
|
| 567 |
* @param parametersTypes |
|
| 568 |
* @throws Exception |
|
| 569 |
*/ |
|
| 570 |
protected void updateLastParameters(ArrayList<Integer> parametersTypes) throws Exception {
|
|
| 571 |
this.updateLastParameters(parametersTypes, new HashMap<>()); |
|
| 572 |
} |
|
| 573 |
|
|
| 574 |
/** |
|
| 569 | 575 |
* Stores the last parameters used for computing. |
| 570 | 576 |
* |
| 571 | 577 |
* @throws Exception |
| ... | ... | |
| 904 | 910 |
} |
| 905 | 911 |
} |
| 906 | 912 |
|
| 913 |
|
|
| 907 | 914 |
/** |
| 915 |
* Dumps the parameters history stack to the specified StringBuffer. |
|
| 916 |
* |
|
| 917 |
* @param buffer |
|
| 918 |
*/ |
|
| 919 |
public void dumpParametersHistory(StringBuffer buffer) {
|
|
| 920 |
buffer.append("Parameters history stack:\n"); //$NON-NLS-1$
|
|
| 921 |
if (this.parametersHistory == null) {
|
|
| 922 |
buffer.append("Parameters history stack is undefined\n"); //$NON-NLS-1$
|
|
| 923 |
} |
|
| 924 |
else {
|
|
| 925 |
for (int i = this.parametersHistory.size() - 1; i >= 0; i--) {
|
|
| 926 |
HashMap<String, Object> lastParameters = this.parametersHistory.get(i); |
|
| 927 |
buffer.append("Parameters (" + i + ") = " + lastParameters + "\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
|
| 928 |
} |
|
| 929 |
} |
|
| 930 |
} |
|
| 931 |
|
|
| 932 |
|
|
| 933 |
/** |
|
| 908 | 934 |
* Gets the dirty state. |
| 909 | 935 |
* |
| 910 | 936 |
* @return |
| tmp/org.txm.chartsengine.core/src/org/txm/chartsengine/core/results/ChartResult.java (revision 2655) | ||
|---|---|---|
| 288 | 288 |
// this.updateLastParameters(); |
| 289 | 289 |
|
| 290 | 290 |
// updates last rendering parameters |
| 291 |
// ArrayList<Integer> parametersTypes = new ArrayList<>();
|
|
| 292 |
// parametersTypes.add(Parameter.RENDERING);
|
|
| 293 |
// HashMap<String, Object> lastParameters = this.getLastParametersFromHistory();
|
|
| 294 |
// if (lastParameters == null) {
|
|
| 295 |
// lastParameters = new HashMap<>();
|
|
| 296 |
// }
|
|
| 297 |
// this.updateLastParameters(parametersTypes, lastParameters);
|
|
| 291 |
// ArrayList<Integer> parametersTypes = new ArrayList<>();
|
|
| 292 |
// parametersTypes.add(Parameter.RENDERING);
|
|
| 293 |
// HashMap<String, Object> lastParameters = this.getLastParametersFromHistory();
|
|
| 294 |
// if (lastParameters == null) {
|
|
| 295 |
// lastParameters = new HashMap<>();
|
|
| 296 |
// }
|
|
| 297 |
// this.updateLastParameters(parametersTypes, lastParameters);
|
|
| 298 | 298 |
|
| 299 | 299 |
|
| 300 | 300 |
this.needsToClearItemsSelection = false; |
| ... | ... | |
| 327 | 327 |
// need to investigate further |
| 328 | 328 |
ArrayList<Integer> parametersTypes = new ArrayList<>(); |
| 329 | 329 |
parametersTypes.add(Parameter.COMPUTING); |
| 330 |
// parametersTypes.add(Parameter.RENDERING); // when adding this, it breaks the rendering of the Progression due of the call of this method too early in the process
|
|
| 330 |
parametersTypes.add(Parameter.RENDERING); // when adding this, it breaks the rendering of the Progression due of the call of this method too early in the process |
|
| 331 | 331 |
// then hasRenderingParameterChanged() always returns false |
| 332 | 332 |
this.updateLastParameters(parametersTypes); |
| 333 | 333 |
} |
| ... | ... | |
| 371 | 371 |
|
| 372 | 372 |
/** |
| 373 | 373 |
* Sets the chart dirty state to true if a rendering parameter has changed since last computing. |
| 374 |
* Also sets the chart dirty to true if the computing dirty state is equals to true. |
|
| 374 | 375 |
* |
| 375 | 376 |
* @return |
| 376 | 377 |
* @throws Exception |
| 377 | 378 |
*/ |
| 378 | 379 |
public void updateChartDirtyFromHistory() throws Exception {
|
| 379 |
if (this.hasRenderingParameterChanged()) {
|
|
| 380 |
if (this.dirty || this.hasRenderingParameterChanged()) {
|
|
| 380 | 381 |
this.chartDirty = true; |
| 381 | 382 |
} |
| 382 | 383 |
} |
| tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/debug/TXMResultDebugView.java (revision 2655) | ||
|---|---|---|
| 134 | 134 |
buffer.append(this.currentResult.dumpPreferences()); |
| 135 | 135 |
buffer.append("\n"); //$NON-NLS-1$
|
| 136 | 136 |
|
| 137 |
// Last parameters used for computing |
|
| 138 |
HashMap<String, Object> lastParameters = this.currentResult.getLastParametersFromHistory(); |
|
| 139 |
buffer.append("Last parameters = " + lastParameters + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
|
|
| 137 |
// Parameters history stack |
|
| 138 |
this.currentResult.dumpParametersHistory(buffer); |
|
| 140 | 139 |
|
| 141 |
|
|
| 142 | 140 |
// Hierarchy |
| 143 | 141 |
buffer.append("\n"); //$NON-NLS-1$
|
| 144 | 142 |
buffer.append("Selected object = " + this.currentResult + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
|
Formats disponibles : Unified diff