Révision 1160
tmp/org.txm.ca.core/src/org/txm/ca/core/preferences/CAPreferences.java (revision 1160) | ||
---|---|---|
79 | 79 |
preferences.putInt(FIRST_DIMENSION, 1); |
80 | 80 |
preferences.putInt(SECOND_DIMENSION, 2); |
81 | 81 |
|
82 |
|
|
83 |
// shared charts rendering preferences |
|
84 |
ChartsEnginePreferences.initializeChartsEngineSharedPreferences(preferences); |
|
85 |
|
|
86 | 82 |
// disable unavailable functionality |
87 | 83 |
TXMPreferences.setEmpty(this.getPreferencesNodeQualifier(), ChartsEnginePreferences.RENDERING_COLORS_MODE); |
88 | 84 |
|
tmp/org.txm.specificities.core/src/org/txm/specificities/core/preferences/SpecificitiesPreferences.java (revision 1160) | ||
---|---|---|
58 | 58 |
preferences.putBoolean(CHART_DRAW_BARS, true); |
59 | 59 |
preferences.putBoolean(CHART_DRAW_LINES, false); |
60 | 60 |
preferences.putFloat(CHART_BANALITY, 2); |
61 |
|
|
62 |
|
|
63 |
// shared charts rendering preferences |
|
64 |
ChartsEnginePreferences.initializeChartsEngineSharedPreferences(preferences); |
|
65 | 61 |
} |
66 |
|
|
67 | 62 |
} |
tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/function/RenameResult.java (revision 1160) | ||
---|---|---|
40 | 40 |
} |
41 | 41 |
TXMPreferences.flush(r); |
42 | 42 |
|
43 |
|
|
44 | 43 |
window.getShell().getDisplay().syncExec(new Runnable() { |
45 | 44 |
@Override |
46 | 45 |
public void run() { |
tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditor.java (revision 1160) | ||
---|---|---|
160 | 160 |
*/ |
161 | 161 |
protected HashSet<TXMEditorExtension<T>> extensions = new HashSet<TXMEditorExtension<T>>(); |
162 | 162 |
|
163 |
|
|
163 |
|
|
164 | 164 |
/** |
165 | 165 |
* Linked editors. |
166 | 166 |
*/ |
167 | 167 |
protected ArrayList<EditorPart> linkedEditors = null; |
168 |
|
|
168 |
private T result; |
|
169 | 169 |
|
170 | 170 |
|
171 |
|
|
171 | 172 |
@Override |
172 | 173 |
public void init(IEditorSite site, IEditorInput input) throws PartInitException { |
173 | 174 |
this.setSite(site); |
174 | 175 |
this.setInput(input); |
176 |
this.result = getEditorInput().getResult(); // store result for debug purpose |
|
175 | 177 |
// FIXME: see how to use the Adapters and AdapterFactory to define image and title of Editor in the contributing plug-ins |
176 | 178 |
// another way is to use editors extension in plug-ins and redefine icon and name, using this solution the problem is that the name (which is also editor title) can not be dynamic according to the result data |
177 | 179 |
// so it seems better to use Adapters if it's possible or keep this solution below |
... | ... | |
208 | 210 |
System.out.println("Exception while installing "+e.getName()+": "+ex.getLocalizedMessage()); //$NON-NLS-1$ //$NON-NLS-2$ |
209 | 211 |
} |
210 | 212 |
} |
211 |
|
|
213 |
|
|
212 | 214 |
IPartListener2 pl = new IPartListener2() { |
213 | 215 |
// ... Other methods |
214 | 216 |
public void partClosed(IWorkbenchPartReference partRef) { |
... | ... | |
266 | 268 |
} |
267 | 269 |
return Display.getDefault().getActiveShell(); |
268 | 270 |
} |
269 |
|
|
271 |
|
|
270 | 272 |
/** |
271 | 273 |
* |
272 | 274 |
* @return the composite displayed before the toptoolbar, containing the minimal parameters widgets |
... | ... | |
357 | 359 |
if (extendedParametersComposite.getChildren().length == 0) { |
358 | 360 |
this.topToolBar.unInstallGroup(COMPUTING_PARAMETERS_GROUP_ID); |
359 | 361 |
} |
360 |
|
|
362 |
|
|
361 | 363 |
} |
362 | 364 |
catch(Throwable e) { |
363 | 365 |
Log.severe("TXMEditor.createPartControl(): can not create the editor for result " + this.getResult() + "."); //$NON-NLS-1$ //$NON-NLS-2$ |
... | ... | |
389 | 391 |
|
390 | 392 |
ArrayList<TXMEditorExtension<T>> errors = new ArrayList<TXMEditorExtension<T>>(); |
391 | 393 |
for (final TXMEditorExtension<T> ext : extensions) { |
392 |
// ISafeRunnable runnable = new ISafeRunnable() { |
|
393 |
// @Override |
|
394 |
// public void handleException(Throwable exception) { |
|
395 |
// System.out.println("Error while installing: "+ext+": "+ exception.getLocalizedMessage()); |
|
396 |
// } |
|
397 |
// |
|
398 |
// @Override |
|
399 |
// public void run() throws Exception { |
|
394 |
// ISafeRunnable runnable = new ISafeRunnable() {
|
|
395 |
// @Override
|
|
396 |
// public void handleException(Throwable exception) {
|
|
397 |
// System.out.println("Error while installing: "+ext+": "+ exception.getLocalizedMessage());
|
|
398 |
// }
|
|
399 |
//
|
|
400 |
// @Override
|
|
401 |
// public void run() throws Exception {
|
|
400 | 402 |
try { |
401 |
java.lang.reflect.Method method;
|
|
402 |
method = ext.getClass().getMethod(step);
|
|
403 |
if (method != null) {
|
|
404 |
method.invoke(ext);
|
|
405 |
} else {
|
|
406 |
ext.notify(step);
|
|
407 |
}
|
|
403 |
java.lang.reflect.Method method; |
|
404 |
method = ext.getClass().getMethod(step); |
|
405 |
if (method != null) { |
|
406 |
method.invoke(ext); |
|
407 |
} else { |
|
408 |
ext.notify(step); |
|
409 |
} |
|
408 | 410 |
} catch(Throwable e) { |
409 | 411 |
errors.add(ext); |
410 | 412 |
e.printStackTrace(); |
411 | 413 |
} |
412 |
// } |
|
413 |
// }; |
|
414 |
// SafeRunner.run(runnable); |
|
414 |
// }
|
|
415 |
// };
|
|
416 |
// SafeRunner.run(runnable);
|
|
415 | 417 |
} |
416 | 418 |
extensions.removeAll(errors); |
417 | 419 |
} |
... | ... | |
476 | 478 |
@Override |
477 | 479 |
public void doSave(IProgressMonitor monitor) { |
478 | 480 |
// FIXME: SJ: to discuss. A this moment the save is automatically done or not in TXMResult.compute() according to a preference of the TBX |
479 |
// if (TBXPreferences.getInstance().getBoolean(TBXPreferences.AUTO_SAVE_RESULTS)) { // ? |
|
480 |
// getResult().saveParameters(); |
|
481 |
// } |
|
481 |
// if (TBXPreferences.getInstance().getBoolean(TBXPreferences.AUTO_SAVE_RESULTS)) { // ?
|
|
482 |
// getResult().saveParameters();
|
|
483 |
// }
|
|
482 | 484 |
|
483 | 485 |
notifyExtensions("notifyDoSave"); //$NON-NLS-1$ |
484 | 486 |
firePropertyChange(IEditorPart.PROP_DIRTY); |
... | ... | |
496 | 498 |
|
497 | 499 |
@Override |
498 | 500 |
public boolean isDirty() { |
499 |
|
|
501 |
|
|
500 | 502 |
boolean dirty = false; |
501 |
|
|
502 |
// if (this.getResult() != null) { //TODO see what to do with dirty results in TXMEditor |
|
503 |
// // if the result has never been computed, the editor is not dirty -> no * shown |
|
504 |
// //dirty = this.getResult().isDirty() && this.getResult().hasBeenComputedOnce(); |
|
505 |
// } |
|
506 |
|
|
507 |
|
|
503 |
|
|
504 |
// if (this.getResult() != null) { //TODO see what to do with dirty results in TXMEditor
|
|
505 |
// // if the result has never been computed, the editor is not dirty -> no * shown
|
|
506 |
// //dirty = this.getResult().isDirty() && this.getResult().hasBeenComputedOnce();
|
|
507 |
// }
|
|
508 |
|
|
509 |
|
|
508 | 510 |
for (TXMEditorExtension<T> b : extensions) { |
509 | 511 |
try { |
510 | 512 |
dirty = dirty || b.isDirty(); |
... | ... | |
609 | 611 |
* @param clearChartItemsSelection |
610 | 612 |
*/ |
611 | 613 |
public JobHandler compute(final boolean update) { |
612 |
|
|
614 |
|
|
613 | 615 |
StatusLine.setMessage(TXMUIMessages.TXMEditor_0 + this.getResult().getName()); |
614 | 616 |
|
615 | 617 |
JobHandler job = new JobHandler(TXMUIMessages.TXMEditor_1 + this.getResult().getName()) { |
... | ... | |
631 | 633 |
updateResultFromEditor(); // subclasses manual result updating from editor fields |
632 | 634 |
// FIXME: DEbug |
633 | 635 |
Log.finest("TXMEditor.compute(): " + TXMEditor.this.getClass().getSimpleName() + ": auto updating result from editor."); //$NON-NLS-1$ |
636 |
|
|
634 | 637 |
autoUpdateResultFromEditorParameters(); // auto updating result from Parameter annotations in result <=> editor |
635 | 638 |
|
636 | 639 |
// Stores the last parameters before the computing to later auto-update the Widgets only if some parameters have changed |
... | ... | |
686 | 689 |
//job.setPriority(Job.INTERACTIVE); |
687 | 690 |
job.setUser(true); |
688 | 691 |
job.schedule(); |
689 |
|
|
692 |
|
|
690 | 693 |
return job; |
691 | 694 |
} |
692 | 695 |
|
... | ... | |
738 | 741 |
public final void refresh(boolean update) throws Exception { |
739 | 742 |
if (!createPartControlDoneSucessfully) return; // no refresh |
740 | 743 |
notifyExtensions("notifyStartOfRefresh"); //$NON-NLS-1$ |
741 |
|
|
742 |
// FIXME: result should never be null? |
|
743 |
if (this.getResult() != null) { |
|
744 | 744 |
|
745 |
// FIXME: debug test to not draw while updating the widgets |
|
746 |
this.getContainer().setRedraw(false); |
|
747 |
|
|
748 |
this.setPartName(this.getResult().getName()); |
|
749 |
this.firePropertyChange(TXMEditor.PROP_DIRTY); |
|
745 |
TXMResult result = this.getResult(); |
|
750 | 746 |
|
751 |
//MD commented 'if (!update) {...}' |
|
752 |
// SJ need to check all works, it also was dedicated to not refresh the Editor from result after a computing, it's not needed since the computing has been done |
|
753 |
// from fields themselves |
|
754 |
//if (!update) { |
|
755 |
// FIXME: debug |
|
756 |
Log.finest("TXMEditor.refresh(): auto updating editor from result."); //$NON-NLS-1$ |
|
757 |
this.autoUpdateEditorFieldsFromResult(update); // auto update from Parameter annotations |
|
747 |
// FIXME: debug test to not draw while updating the widgets |
|
748 |
this.getContainer().setRedraw(false); |
|
758 | 749 |
|
759 |
// FIXME: debug |
|
760 |
Log.finest("TXMEditor.refresh(): updating subclass editor (" + getClass().getSimpleName() + ") from result."); //$NON-NLS-1$ //$NON-NLS-2$ |
|
761 |
this.updateEditorFromResult(update); // subclasses manual settings |
|
762 |
//} |
|
750 |
this.setPartName(result.getName()); |
|
751 |
this.firePropertyChange(TXMEditor.PROP_DIRTY); |
|
763 | 752 |
|
764 |
// Hide the computing parameter area if the editor wasn't open and the result is computed |
|
765 |
if (!update) { |
|
766 |
if (!this.getResult().isDirty() && !this.topToolBar.isDisposed()) { |
|
767 |
this.topToolBar.setComputingParametersVisible(false); |
|
768 |
} |
|
769 |
} |
|
753 |
//MD commented 'if (!update) {...}' |
|
754 |
// SJ need to check all works, it also was dedicated to not refresh the Editor from result after a computing, it's not needed since the computing has been done |
|
755 |
// from fields themselves |
|
756 |
//if (!update) { |
|
757 |
// FIXME: debug |
|
758 |
Log.finest("TXMEditor.refresh(): auto updating editor from result."); //$NON-NLS-1$ |
|
759 |
this.autoUpdateEditorFieldsFromResult(update); // auto update from Parameter annotations |
|
770 | 760 |
|
771 |
topToolBar.redraw(); |
|
761 |
// FIXME: debug |
|
762 |
Log.finest("TXMEditor.refresh(): updating subclass editor (" + getClass().getSimpleName() + ") from result."); //$NON-NLS-1$ //$NON-NLS-2$ |
|
763 |
this.updateEditorFromResult(update); // subclasses manual settings |
|
764 |
//} |
|
772 | 765 |
|
773 |
CorporaView.refreshObject(this); |
|
774 |
TXMResultDebugView.refreshView(); |
|
766 |
// Hide the computing parameter area if the editor wasn't open and the result is computed |
|
767 |
if (!update) { |
|
768 |
if (!result.isDirty() && !this.topToolBar.isDisposed()) { |
|
769 |
this.topToolBar.setComputingParametersVisible(false); |
|
770 |
} |
|
771 |
} |
|
775 | 772 |
|
776 |
// FIXME: debug test to not draw while updating the widgets |
|
777 |
this.getContainer().setRedraw(true); |
|
773 |
topToolBar.redraw(); |
|
778 | 774 |
|
779 |
|
|
780 |
// FIXME: update all open editors of the children result |
|
781 |
// FIXME: prob here is that updateEditorFromResult() doesn't enough because the compute() method does some other stuff |
|
782 |
// so the cascade computing may be done here rather than in TXMResult.compute() or we need to move some stuff from TXMEditor.compute() to |
|
783 |
// TXMEditor.updateEditorFromResult(), eg. the chart loading |
|
784 |
// WARNING: At This moment, with this code, TXMResult.compute() of the children is called twice |
|
785 |
// for (IEditorReference reference : PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getEditorReferences()) { |
|
786 |
// IEditorPart editor = reference.getEditor(false); |
|
787 |
// if(editor != null && editor instanceof TXMEditor) { |
|
788 |
// TXMEditor txmEditor = ((TXMEditor)editor); |
|
789 |
// if(txmEditor.getResult().getParent() == this.getResult()) { |
|
790 |
// Log.finest("TXMEditor.refresh(): updating editor for result: " + txmEditor.getResult().getSimpleName()); |
|
791 |
// txmEditor.compute(false); |
|
792 |
// //txmEditor.updateEditorFromResult(false); |
|
793 |
// //txmEditor.refresh(false); |
|
794 |
// } |
|
795 |
// } |
|
796 |
// } |
|
775 |
CorporaView.refreshObject(this); |
|
776 |
TXMResultDebugView.refreshView(); |
|
797 | 777 |
|
798 |
|
|
778 |
// FIXME: debug test to not draw while updating the widgets |
|
779 |
this.getContainer().setRedraw(true); |
|
799 | 780 |
|
800 | 781 |
|
801 |
} |
|
782 |
// FIXME: update all open editors of the children result |
|
783 |
// FIXME: prob here is that updateEditorFromResult() doesn't enough because the compute() method does some other stuff |
|
784 |
// so the cascade computing may be done here rather than in TXMResult.compute() or we need to move some stuff from TXMEditor.compute() to |
|
785 |
// TXMEditor.updateEditorFromResult(), eg. the chart loading |
|
786 |
// WARNING: At This moment, with this code, TXMResult.compute() of the children is called twice |
|
787 |
// for (IEditorReference reference : PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getEditorReferences()) { |
|
788 |
// IEditorPart editor = reference.getEditor(false); |
|
789 |
// if(editor != null && editor instanceof TXMEditor) { |
|
790 |
// TXMEditor txmEditor = ((TXMEditor)editor); |
|
791 |
// if(txmEditor.getResult().getParent() == this.getResult()) { |
|
792 |
// Log.finest("TXMEditor.refresh(): updating editor for result: " + txmEditor.getResult().getSimpleName()); |
|
793 |
// txmEditor.compute(false); |
|
794 |
// //txmEditor.updateEditorFromResult(false); |
|
795 |
// //txmEditor.refresh(false); |
|
796 |
// } |
|
797 |
// } |
|
798 |
// } |
|
799 |
|
|
802 | 800 |
notifyExtensions("notifyEndOfRefresh"); //$NON-NLS-1$ |
803 | 801 |
} |
804 | 802 |
|
... | ... | |
852 | 850 |
f.setAccessible(true); |
853 | 851 |
Object object = f.get(this); |
854 | 852 |
Object value = this.getResult().getParameter(parameter.key(), true); // propagate to parent one time |
855 |
|
|
853 |
|
|
856 | 854 |
if (value == null) { |
857 | 855 |
//System.out.println("Warning: "+this.getPartName()+" result "+this.getResult()+" "+parameter.key()+" is not initialized."); |
858 | 856 |
continue; // not initialized |
... | ... | |
1198 | 1196 |
* @param commandId |
1199 | 1197 |
*/ |
1200 | 1198 |
public static void addDoubleClickCommandListener(final Table table, final int column, final String commandId) { |
1201 |
|
|
1199 |
|
|
1202 | 1200 |
table.addMouseListener(new MouseAdapter() { |
1203 | 1201 |
@Override |
1204 | 1202 |
public void mouseDoubleClick(MouseEvent e) { |
... | ... | |
1210 | 1208 |
} |
1211 | 1209 |
}); |
1212 | 1210 |
} |
1213 |
|
|
1214 |
|
|
1211 |
|
|
1212 |
|
|
1215 | 1213 |
/** |
1216 | 1214 |
* Adds a mouse adapter to the specified composite that executes a command link specified by its id on double click event. |
1217 | 1215 |
* @param table |
... | ... | |
1226 | 1224 |
}); |
1227 | 1225 |
} |
1228 | 1226 |
|
1229 |
|
|
1227 |
|
|
1230 | 1228 |
/** |
1231 | 1229 |
* Gets the pointed column. |
1232 | 1230 |
* |
... | ... | |
1243 | 1241 |
return i; |
1244 | 1242 |
} |
1245 | 1243 |
} |
1246 |
|
|
1244 |
|
|
1247 | 1245 |
return -1; |
1248 | 1246 |
} |
1249 | 1247 |
|
... | ... | |
1270 | 1268 |
parent.layout(b); |
1271 | 1269 |
} |
1272 | 1270 |
} |
1273 |
|
|
1274 |
|
|
1271 |
|
|
1272 |
|
|
1275 | 1273 |
/** |
1276 | 1274 |
* Links the specified editor to this editor. |
1277 | 1275 |
* @param editor |
... | ... | |
1282 | 1280 |
} |
1283 | 1281 |
if (!this.linkedEditors.contains(editor)) { |
1284 | 1282 |
this.linkedEditors.add(editor); |
1285 |
|
|
1283 |
|
|
1286 | 1284 |
// Debug |
1287 | 1285 |
Log.finest(this.getClass().getSimpleName() + ": A linked editor of type \"" + editor.getClass().getSimpleName() + "\" has been added to this one. Linked editors count: " + this.linkedEditors.size() + "."); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ |
1288 |
|
|
1286 |
|
|
1289 | 1287 |
// FIXME: temporary solution to break the link with chart editor from another TXM result editor when its closed |
1290 | 1288 |
// a better solution would be to redefine the onclose event in a root class of all TXM editors |
1291 | 1289 |
editor.getSite().getPage().addPartListener(new IPartListener() { |
1292 | 1290 |
|
1293 |
@Override
|
|
1294 |
public void partOpened(IWorkbenchPart part) {
|
|
1295 |
// TODO Auto-generated method stub
|
|
1291 |
@Override
|
|
1292 |
public void partOpened(IWorkbenchPart part) {
|
|
1293 |
// TODO Auto-generated method stub
|
|
1296 | 1294 |
|
1297 |
}
|
|
1295 |
}
|
|
1298 | 1296 |
|
1299 |
@Override
|
|
1300 |
public void partDeactivated(IWorkbenchPart part) {
|
|
1301 |
// TODO Auto-generated method stub
|
|
1297 |
@Override
|
|
1298 |
public void partDeactivated(IWorkbenchPart part) {
|
|
1299 |
// TODO Auto-generated method stub
|
|
1302 | 1300 |
|
1303 |
}
|
|
1301 |
}
|
|
1304 | 1302 |
|
1305 |
@Override
|
|
1306 |
public void partClosed(IWorkbenchPart part) {
|
|
1307 |
if(part.equals(editor)) {
|
|
1308 |
removeLinkedEditor(editor);
|
|
1309 |
editor.getSite().getPage().removePartListener(this);
|
|
1310 |
}
|
|
1311 |
}
|
|
1303 |
@Override
|
|
1304 |
public void partClosed(IWorkbenchPart part) {
|
|
1305 |
if(part.equals(editor)) {
|
|
1306 |
removeLinkedEditor(editor);
|
|
1307 |
editor.getSite().getPage().removePartListener(this);
|
|
1308 |
}
|
|
1309 |
}
|
|
1312 | 1310 |
|
1313 |
@Override
|
|
1314 |
public void partBroughtToTop(IWorkbenchPart part) {
|
|
1315 |
// TODO Auto-generated method stub
|
|
1311 |
@Override
|
|
1312 |
public void partBroughtToTop(IWorkbenchPart part) {
|
|
1313 |
// TODO Auto-generated method stub
|
|
1316 | 1314 |
|
1317 |
}
|
|
1315 |
}
|
|
1318 | 1316 |
|
1319 |
@Override
|
|
1320 |
public void partActivated(IWorkbenchPart part) {
|
|
1321 |
// TODO Auto-generated method stub
|
|
1317 |
@Override
|
|
1318 |
public void partActivated(IWorkbenchPart part) {
|
|
1319 |
// TODO Auto-generated method stub
|
|
1322 | 1320 |
|
1323 |
}
|
|
1324 |
});
|
|
1325 |
|
|
1326 |
|
|
1321 |
}
|
|
1322 |
});
|
|
1323 |
|
|
1324 |
|
|
1327 | 1325 |
} |
1328 | 1326 |
} |
1329 |
|
|
1327 |
|
|
1330 | 1328 |
/** |
1331 | 1329 |
* Unlinks the specified editor from this editor. |
1332 | 1330 |
* @param editor |
... | ... | |
1342 | 1340 |
this.linkedEditors = null; |
1343 | 1341 |
} |
1344 | 1342 |
} |
1345 |
|
|
1343 |
|
|
1346 | 1344 |
/** |
1347 | 1345 |
* Gets the linked editors to this one if exist. |
1348 | 1346 |
* @return |
... | ... | |
1350 | 1348 |
public ArrayList<EditorPart> getLinkedEditors() { |
1351 | 1349 |
return this.linkedEditors; |
1352 | 1350 |
} |
1353 |
|
|
1351 |
|
|
1354 | 1352 |
/** |
1355 | 1353 |
* Gets the first linked editor of the specified class if exists. |
1356 | 1354 |
* @param editorClass |
... | ... | |
1368 | 1366 |
} |
1369 | 1367 |
return editor; |
1370 | 1368 |
} |
1371 |
|
|
1369 |
|
|
1372 | 1370 |
/** |
1373 | 1371 |
* Gets the linked editors of the specified class if exist otherwise returns an empty list. |
1374 | 1372 |
* @param editorClass |
... | ... | |
1385 | 1383 |
} |
1386 | 1384 |
return editors; |
1387 | 1385 |
} |
1388 |
|
|
1386 |
|
|
1389 | 1387 |
} |
tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/PropertiesSelector.java (revision 1160) | ||
---|---|---|
229 | 229 |
* @return the properties |
230 | 230 |
*/ |
231 | 231 |
public List<P> getSelectedProperties() { |
232 |
return this.selectedProperties;
|
|
232 |
return new ArrayList<P>(this.selectedProperties);
|
|
233 | 233 |
} |
234 | 234 |
|
235 | 235 |
/** |
... | ... | |
238 | 238 |
* @return the Available properties |
239 | 239 |
*/ |
240 | 240 |
public List<P> getAvailableProperties() { |
241 |
return this.availableProperties;
|
|
241 |
return new ArrayList<P>(this.availableProperties);
|
|
242 | 242 |
} |
243 | 243 |
|
244 | 244 |
/** |
tmp/org.txm.textsbalance.core/src/org/txm/textsbalance/core/preferences/TextsBalancePreferences.java (revision 1160) | ||
---|---|---|
40 | 40 |
|
41 | 41 |
preferences.put(STRUCTURAL_UNIT, "text"); |
42 | 42 |
|
43 |
// shared charts rendering preferences |
|
44 |
ChartsEnginePreferences.initializeChartsEngineSharedPreferences(preferences); |
|
45 |
|
|
46 | 43 |
// to disable the functionality |
47 | 44 |
TXMPreferences.setEmpty(this.getPreferencesNodeQualifier(), ChartsEnginePreferences.SHOW_GRID); |
48 | 45 |
} |
tmp/org.txm.cql2lsa.rcp/src/org/txm/functions/cql2lsa/ExpI.java (revision 1160) | ||
---|---|---|
375 | 375 |
}; |
376 | 376 |
|
377 | 377 |
@Override |
378 |
public boolean compute(IProgressMonitor watcher) { |
|
378 |
public boolean _compute() throws Exception { |
|
379 |
|
|
379 | 380 |
System.out.println("ExpI.compute(monitor): not implemented."); |
380 | 381 |
return false; |
381 | 382 |
} |
... | ... | |
412 | 413 |
// TODO Auto-generated method stub |
413 | 414 |
return false; |
414 | 415 |
} |
415 |
|
|
416 |
@Override |
|
417 |
protected boolean _compute() throws Exception { |
|
418 |
// TODO Auto-generated method stub |
|
419 |
return false; |
|
420 |
} |
|
421 | 416 |
|
422 | 417 |
@Override |
423 | 418 |
public String getResultype() { |
tmp/org.txm.cql2lsa.rcp/src/org/txm/functions/cql2lsa/ContextSubcorpus.java (revision 1160) | ||
---|---|---|
69 | 69 |
} |
70 | 70 |
|
71 | 71 |
@Override |
72 |
public boolean compute(IProgressMonitor monitor) { |
|
72 |
public boolean _compute() throws Exception { |
|
73 |
|
|
73 | 74 |
|
74 | 75 |
try { |
75 | 76 |
if (!(CQPSearchEngine.getCqiClient() instanceof MemCqiClient)); |
... | ... | |
171 | 172 |
} |
172 | 173 |
|
173 | 174 |
@Override |
174 |
protected boolean _compute() throws Exception { |
|
175 |
// TODO Auto-generated method stub |
|
176 |
return false; |
|
177 |
} |
|
178 |
|
|
179 |
@Override |
|
180 | 175 |
public String getResultype() { |
181 | 176 |
// TODO |
182 | 177 |
return this.getClass().getSimpleName(); |
tmp/org.txm.cql2lsa.rcp/src/org/txm/functions/cql2lsa/ValuesOfQuery.java (revision 1160) | ||
---|---|---|
187 | 187 |
} |
188 | 188 |
|
189 | 189 |
@Override |
190 |
public boolean compute(IProgressMonitor watcher) { |
|
191 |
// TODO Auto-generated method stub |
|
192 |
System.err.println("ValuesOfQuery.compute(): not yet implemented."); |
|
193 |
return false; |
|
194 |
} |
|
195 |
|
|
196 |
@Override |
|
197 | 190 |
public String getName() { |
198 | 191 |
return "ValuesOfQuery"; |
199 | 192 |
} |
tmp/org.txm.cql2lsa.rcp/src/org/txm/functions/cql2lsa/ExpII.java (revision 1160) | ||
---|---|---|
675 | 675 |
} |
676 | 676 |
|
677 | 677 |
@Override |
678 |
public boolean compute(IProgressMonitor watcher) { |
|
679 |
System.out.println("ExpII.compute(monitor): not implemented."); |
|
680 |
return false; |
|
681 |
} |
|
682 |
|
|
683 |
@Override |
|
684 | 678 |
public String getSimpleName() { |
685 | 679 |
return "ExpII"; |
686 | 680 |
} |
tmp/org.txm.chartsengine.core/src/org/txm/chartsengine/core/preferences/ChartsEnginePreferences.java (revision 1160) | ||
---|---|---|
93 | 93 |
} |
94 | 94 |
return TXMPreferences.instances.get(ChartsEnginePreferences.class); |
95 | 95 |
} |
96 |
|
|
97 | 96 |
|
98 | 97 |
@Override |
99 | 98 |
public void initializeDefaultPreferences() { |
... | ... | |
124 | 123 |
preferences.put(FONT, DEFAULT_FONT); |
125 | 124 |
|
126 | 125 |
} |
127 |
|
|
128 |
|
|
129 |
|
|
130 |
|
|
131 | 126 |
} |
132 | 127 |
|
tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/Part.java (revision 1160) | ||
---|---|---|
56 | 56 |
this.userName = partName; |
57 | 57 |
this.pQuery = new CQLQuery(query); |
58 | 58 |
this.pID = CqpObject.partNamePrefix + CQPCorpus.getNextSubcorpusCounter(); |
59 |
this.pName = partName; |
|
60 | 59 |
this.setVisible(false); |
61 | 60 |
this.internalPersistable = true; |
62 | 61 |
} |
tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/CQPCorpus.java (revision 1160) | ||
---|---|---|
507 | 507 |
* @return the infos |
508 | 508 |
*/ |
509 | 509 |
public String getInfos() { |
510 |
return TXMCoreMessages.Corpus_2 + this.pName + TXMCoreMessages.Corpus_3 + getCharset()
|
|
510 |
return TXMCoreMessages.Corpus_2 + this.pID + TXMCoreMessages.Corpus_3 + getCharset()
|
|
511 | 511 |
+ TXMCoreMessages.Corpus_4 + getLanguage(); |
512 | 512 |
} |
513 | 513 |
|
... | ... | |
575 | 575 |
|
576 | 576 |
@Override |
577 | 577 |
public String getName() { |
578 |
return this.pName;
|
|
578 |
return this.userName;
|
|
579 | 579 |
} |
580 | 580 |
|
581 | 581 |
@Override |
582 | 582 |
public String getSimpleName() { |
583 |
return this.pName;
|
|
583 |
return this.userName;
|
|
584 | 584 |
} |
585 | 585 |
|
586 | 586 |
/** |
... | ... | |
824 | 824 |
Subcorpus subcorp = this.createSubcorpus(subcorpusElem); |
825 | 825 |
subcorp._load(subcorpusElem); |
826 | 826 |
} catch (CqiClientException ex) { |
827 |
Log.warning(this.pName + TXMCoreMessages.Corpus_12 + pName
|
|
827 |
Log.warning(this.pID + TXMCoreMessages.Corpus_12 + pID
|
|
828 | 828 |
+ " : " + ex); //$NON-NLS-1$ |
829 | 829 |
} |
830 | 830 |
} |
... | ... | |
851 | 851 |
// partition.setSelfElement(partitionElem); |
852 | 852 |
// partition.load(); |
853 | 853 |
} catch (Exception ex) { |
854 |
Log.warning(this.pName + TXMCoreMessages.Corpus_19 + name
|
|
854 |
Log.warning(this.pID + TXMCoreMessages.Corpus_19 + name
|
|
855 | 855 |
+ " : " + ex); //$NON-NLS-1$ |
856 | 856 |
//c.getParentNode().removeChild(c); |
857 | 857 |
} |
... | ... | |
1154 | 1154 |
// Compare node weights |
1155 | 1155 |
int output = super.compareTo(o); |
1156 | 1156 |
// Compare simple names if weights are equal |
1157 |
if (this.pName == null) {
|
|
1157 |
if (this.pID == null) {
|
|
1158 | 1158 |
return -1; |
1159 | 1159 |
} |
1160 | 1160 |
if (o.getSimpleName() == null) return 1; |
1161 | 1161 |
if(output == 0) { |
1162 |
output = this.pName.compareTo(o.getSimpleName());
|
|
1162 |
output = this.getSimpleName().compareTo(o.getSimpleName());
|
|
1163 | 1163 |
} |
1164 | 1164 |
return output; |
1165 | 1165 |
} |
tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/MainCorpus.java (revision 1160) | ||
---|---|---|
587 | 587 |
} |
588 | 588 |
|
589 | 589 |
public void setName(String name) { |
590 |
this.pName = name;
|
|
590 |
this.userName = name;
|
|
591 | 591 |
} |
592 | 592 |
|
593 | 593 |
@Override |
tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/query/CQLQuery.java (revision 1160) | ||
---|---|---|
69 | 69 |
/** |
70 | 70 |
* The query string. |
71 | 71 |
*/ |
72 |
protected String queryString; |
|
72 |
protected String queryString = "";
|
|
73 | 73 |
|
74 | 74 |
|
75 | 75 |
|
tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/Subcorpus.java (revision 1160) | ||
---|---|---|
110 | 110 |
protected void setParameters(String pID, String name, CQLQuery query) throws InvalidCqpIdException { |
111 | 111 |
this.pID = pID; |
112 | 112 |
this.pQuery = query; |
113 |
this.pName = name;
|
|
113 |
this.userName = name;
|
|
114 | 114 |
} |
115 | 115 |
|
116 | 116 |
/** |
... | ... | |
131 | 131 |
|
132 | 132 |
CorpusManager.getCorpusManager().getCqiClient().cqpQuery(this.getCorpusParent().getQualifiedCqpId(), this.pID, this.pQuery.getQueryString()); |
133 | 133 |
|
134 |
this.qresult = new QueryResult(this.pID, this.pName, this.getCorpusParent(), this.pQuery); // getCorpusParent().query(pQuery, this.pID, true);
|
|
134 |
this.qresult = new QueryResult(this.pID, this.userName, this.getCorpusParent(), this.pQuery); // getCorpusParent().query(pQuery, this.pID, true);
|
|
135 | 135 |
} |
136 | 136 |
return qresult != null; |
137 | 137 |
} |
... | ... | |
184 | 184 |
throw new CqiClientException(e); |
185 | 185 |
} |
186 | 186 |
long end = System.currentTimeMillis(); |
187 |
Log.finest(NLS.bind(TXMCoreMessages.END_SUBCORPUS_SIZE, new Object[]{this.pName, this.size, (end - start)}));
|
|
187 |
Log.finest(NLS.bind(TXMCoreMessages.END_SUBCORPUS_SIZE, new Object[]{this.pID, this.size, (end - start)}));
|
|
188 | 188 |
} |
189 | 189 |
return this.size; |
190 | 190 |
} |
... | ... | |
291 | 291 |
Subcorpus subcorp = new Subcorpus(this); |
292 | 292 |
subcorp._load(subcorpusElem); |
293 | 293 |
} catch (Exception ex) { |
294 |
Log.warning(this.pName + TXMCoreMessages.Corpus_12 + subcorpusElem.getAttribute("name")
|
|
294 |
Log.warning(this.pID + TXMCoreMessages.Corpus_12 + subcorpusElem.getAttribute("name")
|
|
295 | 295 |
+ " : " + ex); //$NON-NLS-1$ |
296 | 296 |
} |
297 | 297 |
} |
... | ... | |
316 | 316 |
//partition.setSelfElement(partitionElem); |
317 | 317 |
partition._load(partitionElem); |
318 | 318 |
} catch (Exception ex) { |
319 |
Log.warning(this.pName + TXMCoreMessages.Corpus_19 + name
|
|
319 |
Log.warning(this.pID + TXMCoreMessages.Corpus_19 + name
|
|
320 | 320 |
+ " : " + ex); //$NON-NLS-1$ |
321 | 321 |
//c.getParentNode().removeChild(c); |
322 | 322 |
} |
... | ... | |
506 | 506 |
|
507 | 507 |
@Override |
508 | 508 |
public boolean canCompute() { |
509 |
return pID != null && pName != null && (pQuery != null || qresult != null);
|
|
509 |
return pID != null && userName != null && (pQuery != null || qresult != null);
|
|
510 | 510 |
} |
511 | 511 |
|
512 | 512 |
@Override |
... | ... | |
554 | 554 |
*/ |
555 | 555 |
public void setParameters(String cqpId, String name, QueryResult queryResult) { |
556 | 556 |
this.pID = cqpId; |
557 |
this.pName = name;
|
|
557 |
this.userName = name;
|
|
558 | 558 |
this.pQuery = queryResult.getQuery(); |
559 | 559 |
this.qresult = queryResult; |
560 | 560 |
|
tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/ReferencePattern.java (revision 1160) | ||
---|---|---|
171 | 171 |
* @return the title |
172 | 172 |
*/ |
173 | 173 |
public String getTitle() { |
174 |
if (this.properties == null) return "none"; |
|
175 |
else if (this.properties.size() == 0) return "none"; |
|
174 |
if (this.properties == null || this.properties.size() == 0) return "none"; |
|
176 | 175 |
|
177 | 176 |
String title = ""; //$NON-NLS-1$ |
178 | 177 |
for (Property p : this.properties) { |
tmp/org.txm.core/src/java/org/txm/core/preferences/TXMPreferences.java (revision 1160) | ||
---|---|---|
52 | 52 |
// we'll use the ProjectScope. |
53 | 53 |
public abstract class TXMPreferences extends AbstractPreferenceInitializer { |
54 | 54 |
|
55 |
|
|
56 | 55 |
/** |
57 | 56 |
* Scope used for storing the command preferences. |
58 | 57 |
*/ |
tmp/org.txm.core/src/java/org/txm/objects/CorpusBuild.java (revision 1160) | ||
---|---|---|
54 | 54 |
*/ |
55 | 55 |
public abstract class CorpusBuild extends TXMResult { |
56 | 56 |
|
57 |
@Parameter(key=TBXPreferences.NAME) |
|
58 |
protected String pName; |
|
59 | 57 |
@Parameter(key=TBXPreferences.ID) |
60 | 58 |
protected String pID; |
61 | 59 |
|
... | ... | |
293 | 291 |
protected boolean _load(Element e) { |
294 | 292 |
if (e == null) return false; |
295 | 293 |
|
296 |
this.pName = e.getAttribute(NAME);
|
|
294 |
this.userName = e.getAttribute(NAME);
|
|
297 | 295 |
this.pID = e.getAttribute(NAME); |
298 | 296 |
// this.pLanguage = e.getAttribute(LANG); |
299 | 297 |
// System.out.println("LOAD BASE "+this.name); |
... | ... | |
864 | 862 |
} |
865 | 863 |
|
866 | 864 |
public void setName(String name) { |
867 |
this.pName = name;
|
|
865 |
this.userName = name;
|
|
868 | 866 |
} |
869 | 867 |
|
870 | 868 |
public void setID(String id) { |
tmp/org.txm.progression.core/src/org/txm/progression/core/preferences/ProgressionPreferences.java (revision 1160) | ||
---|---|---|
40 | 40 |
return TXMPreferences.instances.get(ProgressionPreferences.class); |
41 | 41 |
} |
42 | 42 |
|
43 |
|
|
44 | 43 |
@Override |
45 | 44 |
public void initializeDefaultPreferences() { |
46 | 45 |
super.initializeDefaultPreferences(); |
... | ... | |
48 | 47 |
preferences.putBoolean(CHART_CUMULATIVE, true); |
49 | 48 |
preferences.putBoolean(REPEAT_SAME_VALUES, false); |
50 | 49 |
preferences.putDouble(BANDE_MULTIPLIER, 1.0d); |
51 |
|
|
52 |
// shared charts rendering preferences |
|
53 |
ChartsEnginePreferences.initializeChartsEngineSharedPreferences(preferences); |
|
54 | 50 |
} |
55 |
|
|
56 | 51 |
} |
tmp/org.txm.tigersearch.rcp/src/org/txm/function/tigersearch/TIGERSearch.java (revision 1160) | ||
---|---|---|
232 | 232 |
} |
233 | 233 |
|
234 | 234 |
@Override |
235 |
public boolean compute(IProgressMonitor watcher) { |
|
236 |
// TODO Auto-generated method stub |
|
237 |
System.err.println("TIGERSearch.compute(): not yet implemnted."); |
|
238 |
return false; |
|
239 |
} |
|
240 |
|
|
241 |
@Override |
|
242 | 235 |
public String getName() { |
243 | 236 |
return query; |
244 | 237 |
} |
tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/editors/ChartEditor.java (revision 1160) | ||
---|---|---|
522 | 522 |
* Implementations using a Composite to embed AWT/Swing components should manually call this.composite.dispose() in the redefined method. |
523 | 523 |
*/ |
524 | 524 |
public void dispose() { |
525 |
this.chartComposite.dispose(); |
|
525 |
if (chartComposite != null && !chartComposite.isDisposed()) { |
|
526 |
this.chartComposite.dispose(); |
|
527 |
} |
|
526 | 528 |
super.dispose(); |
527 | 529 |
} |
528 | 530 |
|
tmp/org.txm.partition.core/src/org/txm/partition/core/preferences/PartitionDimensionsPreferences.java (revision 1160) | ||
---|---|---|
38 | 38 |
preferences.putBoolean(CHART_DIMENSIONS_DISPLAY_PARTS_COUNT_IN_TITLE, true); |
39 | 39 |
preferences.putBoolean(CHART_DIMENSIONS_SORT_BY_SIZE, false); |
40 | 40 |
|
41 |
// shared charts rendering preferences |
|
42 |
ChartsEnginePreferences.initializeChartsEngineSharedPreferences(preferences); |
|
43 |
|
|
44 | 41 |
// disable unavailable functionality |
45 | 42 |
TXMPreferences.setEmpty(this.getPreferencesNodeQualifier(), ChartsEnginePreferences.SHOW_LEGEND); |
46 |
|
|
47 | 43 |
} |
48 |
|
|
49 | 44 |
} |
tmp/org.txm.ahc.core/src/org/txm/ahc/core/preferences/AHCPreferences.java (revision 1160) | ||
---|---|---|
63 | 63 |
preferences.put(METRIC, "euclidean"); //$NON-NLS-1$ |
64 | 64 |
|
65 | 65 |
preferences.putBoolean(COLUMNS_COMPUTING, true); |
66 |
|
|
67 |
// shared charts rendering preferences |
|
68 |
ChartsEnginePreferences.initializeChartsEngineSharedPreferences(preferences); |
|
69 | 66 |
} |
70 |
|
|
71 | 67 |
} |
tmp/org.txm.wordcloud.core/src/org/txm/wordcloud/core/preferences/WordCloudPreferences.java (revision 1160) | ||
---|---|---|
32 | 32 |
preferences.putInt(F_MIN, 20); |
33 | 33 |
preferences.putInt(ROTATION_PERCENT, 10); |
34 | 34 |
preferences.putBoolean(RANDOM_POSITIONS, false); |
35 |
|
|
36 |
// shared charts rendering preferences |
|
37 |
ChartsEnginePreferences.initializeChartsEngineSharedPreferences(preferences); |
|
38 | 35 |
} |
39 | 36 |
|
40 | 37 |
/** |
Formats disponibles : Unified diff