Révision 1864
| tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/AdvancedPreferencePage.java (revision 1864) | ||
|---|---|---|
| 61 | 61 |
protected void createFieldEditors() {
|
| 62 | 62 |
|
| 63 | 63 |
// install directory |
| 64 |
addField(new DirectoryFieldEditor(TBXPreferences.INSTALL_DIR, TXMUIMessages.tXMInstallDirectory, getFieldEditorParent())); |
|
| 64 |
//addField(new DirectoryFieldEditor(TBXPreferences.INSTALL_DIR, TXMUIMessages.tXMInstallDirectory, getFieldEditorParent()));
|
|
| 65 | 65 |
|
| 66 | 66 |
// txmhome directory |
| 67 |
addField(new DirectoryFieldEditor(TBXPreferences.USER_TXM_HOME, TXMUIMessages.tXMUserDirectory, getFieldEditorParent())); |
|
| 67 |
//addField(new DirectoryFieldEditor(TBXPreferences.USER_TXM_HOME, TXMUIMessages.tXMUserDirectory, getFieldEditorParent()));
|
|
| 68 | 68 |
|
| 69 | 69 |
Group updateGroup = new Group(getFieldEditorParent(), SWT.NONE); |
| 70 | 70 |
updateGroup.setText(TXMUIMessages.logs); |
| tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/RCPPreferences.java (revision 1864) | ||
|---|---|---|
| 31 | 31 |
* To auto compute result and refresh editor when a form computing parameter is modified. |
| 32 | 32 |
*/ |
| 33 | 33 |
public static final String AUTO_UPDATE_EDITOR = "auto_update_editor"; //$NON-NLS-1$ |
| 34 |
|
|
| 34 |
public static final String AUTO_COMPUTE_ON_EDITOR_OPEN = "auto_compute_editor"; //$NON-NLS-1$ |
|
| 35 |
|
|
| 35 | 36 |
public static final String SHOW_SEVERE_DIALOG = "show_severe_dialog"; |
| 36 | 37 |
|
| 37 | 38 |
public static final String UPDATE_LEVEL = "update_level"; //$NON-NLS-1$ |
| ... | ... | |
| 61 | 62 |
|
| 62 | 63 |
public static final String CGU = "cgu"; //$NON-NLS-1$ |
| 63 | 64 |
|
| 65 |
|
|
| 64 | 66 |
@Override |
| 65 | 67 |
public void initializeDefaultPreferences() {
|
| 66 | 68 |
|
| ... | ... | |
| 78 | 80 |
preferences.put(UPDATE_LEVEL, "STABLE"); //$NON-NLS-1$ |
| 79 | 81 |
|
| 80 | 82 |
preferences.putBoolean(AUTO_UPDATE_EDITOR, false); |
| 83 |
preferences.putBoolean(AUTO_COMPUTE_ON_EDITOR_OPEN, true); |
|
| 81 | 84 |
preferences.putBoolean(SHOW_SEVERE_DIALOG, false); |
| 82 | 85 |
preferences.putBoolean(USER_ALERT_DELETE, false); |
| 83 | 86 |
preferences.putBoolean(SAVE_BEFORE_EXECUTION, false); |
| tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/UserPreferencePage.java (revision 1864) | ||
|---|---|---|
| 54 | 54 |
// Auto compute the result when a parameter changes |
| 55 | 55 |
this.addField(new BooleanFieldEditor(RCPPreferences.AUTO_UPDATE_EDITOR, TXMUIMessages.automaticRecomputingWhenChangingAParameter, BooleanFieldEditor.SEPARATE_LABEL, this.getFieldEditorParent())); |
| 56 | 56 |
|
| 57 |
//this.addField(new BooleanFieldEditor(RCPPreferences.AUTO_COMPUTE_ON_EDITOR_OPEN, "Compute when opening its window", BooleanFieldEditor.SEPARATE_LABEL, this.getFieldEditorParent())); |
|
| 58 |
|
|
| 57 | 59 |
// Auto save each result after computing and auto load them at startup |
| 58 | 60 |
this.addField(new BooleanFieldEditor(TBXPreferences.AUTO_PERSISTENCE_ENABLED, TXMUIMessages.enableAutomaticSaveOfAllResultsPersistence, BooleanFieldEditor.SEPARATE_LABEL, this.getFieldEditorParent())); |
| 59 | 61 |
} |
| tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditor.java (revision 1864) | ||
|---|---|---|
| 67 | 67 |
import org.txm.rcp.editors.listeners.BaseAbstractComputeListener; |
| 68 | 68 |
import org.txm.rcp.handlers.BaseAbstractHandler; |
| 69 | 69 |
import org.txm.rcp.messages.TXMUIMessages; |
| 70 |
import org.txm.rcp.preferences.RCPPreferences; |
|
| 70 | 71 |
import org.txm.rcp.swt.GLComposite; |
| 71 | 72 |
import org.txm.rcp.swt.widget.AssistedChoiceQueryWidget; |
| 72 | 73 |
import org.txm.rcp.swt.widget.AssistedQueryWidget; |
| ... | ... | |
| 110 | 111 |
*/ |
| 111 | 112 |
public final static String TOP_TOOLBAR_COMPUTE_BUTTON_ID = "compute"; //$NON-NLS-1$ |
| 112 | 113 |
|
| 113 |
|
|
| 114 | 114 |
/** |
| 115 | 115 |
* The editor main tool bar, positioned at the top of the editor. |
| 116 | 116 |
*/ |
| ... | ... | |
| 985 | 985 |
} |
| 986 | 986 |
|
| 987 | 987 |
// compute the result only if the editor wasn't already opened |
| 988 |
if (!wasAlreadyOpened) {
|
|
| 988 |
if (!wasAlreadyOpened && RCPPreferences.getInstance().getBoolean(RCPPreferences.AUTO_COMPUTE_ON_EDITOR_OPEN)) {
|
|
| 989 | 989 |
editor.compute(false); |
| 990 | 990 |
} |
| 991 | 991 |
} |
Formats disponibles : Unified diff