Revision 2387

tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditor.java (revision 2387)
111 111
	 * ID defined in plugin.xml for the compute button contribution.
112 112
	 */
113 113
	public final static String TOP_TOOLBAR_COMPUTE_BUTTON_ID = "compute"; //$NON-NLS-1$
114

  
114
	
115 115
	public static final int MAX_NAME_LENGTH = 40;
116 116
	
117 117
	/**
......
1209 1209
		// }
1210 1210
		
1211 1211
		// Hide the computing parameter area if the editor wasn't open and the result is computed
1212
		//TODO MD: why was the toolbar hidden ?
1212
		// TODO MD: why was the toolbar hidden ?
1213 1213
		// SJ: need to check all works then remove this code
1214
//		if (!update && !result.isDirty() && !this.topToolBar.isDisposed()) {
1215
//			this.topToolBar.setComputingParametersVisible(false);
1216
//		}
1214
		// if (!update && !result.isDirty() && !this.topToolBar.isDisposed()) {
1215
		// this.topToolBar.setComputingParametersVisible(false);
1216
		// }
1217 1217
		
1218 1218
		if (!topToolBar.isDisposed()) {
1219 1219
			this.topToolBar.redraw();
tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/ExportPreferencePage.java (revision 2387)
52 52
	private ComboFieldEditor txtseparators;
53 53
	
54 54
	/**
55
	 * The charts engine export formats selection combo box.
56
	 */
57
	//private ComboFieldEditor chartsEngineExportFormatsComboField;
58

  
59
	
60
	/**
55 61
	 * Instantiates a new export preference page.
56 62
	 */
57 63
	public ExportPreferencePage() {
......
91 97
		show_export = new BooleanFieldEditor(TBXPreferences.EXPORT_SHOW,
92 98
				TXMUIMessages.showExportResultInTheTextEditor,
93 99
				BooleanFieldEditor.SEPARATE_LABEL, getFieldEditorParent());
100
		addField(show_export);
94 101
		
95 102
		
103
		// current engine supported export formats
104
		// FIXME: SJ: doesn't work because even when giving the right preference store. It is automatically set to org.txm.core before performOK() is called, but where?
105
//		this.chartsEngineExportFormatsComboField = new ComboFieldEditor(ChartsEnginePreferences.DEFAULT_EXPORT_FORMAT, "Graphiques", ChartsEnginesManager.getExportFormatsEntryNamesAndValues(ChartsEnginesManager.getInstance().getCurrentEngine()), this.getFieldEditorParent());
106
//		this.chartsEngineExportFormatsComboField.setPreferenceStore(new TXMPreferenceStore(ChartsEnginePreferences.getInstance().getPreferencesNodeQualifier()));
107
//		System.out.println("ExportPreferencePage.createFields(): before add field " + ((TXMPreferenceStore) this.chartsEngineExportFormatsComboField.getPreferenceStore()).getNodeQualifier());
108
//		this.addField(this.chartsEngineExportFormatsComboField);
109
//		System.out.println("ExportPreferencePage.createFields(): after add field " + ((TXMPreferenceStore) this.chartsEngineExportFormatsComboField.getPreferenceStore()).getNodeQualifier());
110
		
96 111
		//FIXME: move this code to org.txm.jfreechart.rcp and other SWT components provider implementations
97 112
		// Default charts export format
98 113
//		String[][] devicesvalues = new String[SWTChartsComponentsProvider.getCurrent().getEditorSupportedExportFileFormats().size()][2];
......
110 125
//		devices = new ComboFieldEditor(RDEVICE, Messages.ExportPreferencePage_21, devicesvalues, getFieldEditorParent());
111 126
		//addField(devices);
112 127
		
113
		addField(show_export);
114 128
	
115 129
	}
130
	
131
	@Override
132
	public boolean performOk() {
133
		// FIXME: SJ: doesn't work because even when giving the right preference store. It is automatically set to org.txm.core before performOK() is called, but where?
134
//		try {
135
//			System.out.println("ExportPreferencePage.performOk(): " + ((TXMPreferenceStore) this.chartsEngineExportFormatsComboField.getPreferenceStore()).getNodeQualifier());
136
//			((ScopedPreferenceStore) this.chartsEngineExportFormatsComboField.getPreferenceStore()).save();
137
//		}
138
//		catch (IOException e) {
139
//			// TODO Auto-generated catch block
140
//			e.printStackTrace();
141
//		}
142
		return super.performOk();
143
	}
144
	
116 145
}

Also available in: Unified diff