Révision 1174

tmp/org.txm.setups/shared/win/txm.nsi (revision 1174)
6 6

  
7 7
;general
8 8

  
9
Name "TXM 0.8.0"
9
Name "TXM 0.8.0a2"
10 10

  
11 11
;!define Version ""
12
!define Version "_0.8.0a"
12
!define Version "_0.8.0a2"
13 13

  
14 14

  
15 15
OutFile "TXM${Version}_Win64_installer.exe"
......
20 20

  
21 21
;compression
22 22

  
23
SetCompressor /FINAL /SOLID lzma
23
;SetCompressor /FINAL /SOLID lzma
24 24

  
25
SetCompressorDictSize 64
25
;SetCompressorDictSize 64
26 26

  
27 27

  
28 28
;interface configuration
tmp/org.txm.index.rcp/src/org/txm/index/rcp/editors/IndexEditor.java (revision 1174)
36 36
import org.eclipse.swt.events.SelectionListener;
37 37
import org.eclipse.swt.graphics.Font;
38 38
import org.eclipse.swt.graphics.FontData;
39
import org.eclipse.swt.layout.FormAttachment;
40
import org.eclipse.swt.layout.FormData;
41
import org.eclipse.swt.layout.FormLayout;
42 39
import org.eclipse.swt.layout.GridData;
43 40
import org.eclipse.swt.layout.GridLayout;
41
import org.eclipse.swt.layout.RowLayout;
44 42
import org.eclipse.swt.widgets.Composite;
45 43
import org.eclipse.swt.widgets.Display;
46 44
import org.eclipse.swt.widgets.Label;
47 45
import org.eclipse.swt.widgets.Spinner;
48 46
import org.eclipse.swt.widgets.TableColumn;
49 47
import org.txm.core.messages.TXMCoreMessages;
50
import org.txm.core.preferences.TBXPreferences;
51 48
import org.txm.core.preferences.TXMPreferences;
52 49
import org.txm.core.results.Parameter;
53 50
import org.txm.index.core.functions.Index;
54 51
import org.txm.index.core.functions.Line;
55 52
import org.txm.index.core.functions.LineComparator.SortMode;
56
import org.txm.index.core.preferences.IndexPreferences;
57 53
import org.txm.index.rcp.messages.IndexUIMessages;
58 54
import org.txm.rcp.StatusLine;
59 55
import org.txm.rcp.editors.TXMEditor;
......
63 59
import org.txm.rcp.messages.TXMUIMessages;
64 60
import org.txm.rcp.swt.GLComposite;
65 61
import org.txm.rcp.swt.widget.AssistedChoiceQueryWidget;
66
import org.txm.rcp.swt.widget.AssistedQueryWidget;
67 62
import org.txm.rcp.swt.widget.NavigationWidget;
68 63
import org.txm.rcp.swt.widget.PropertiesSelector;
64
import org.txm.rcp.swt.widget.ThresholdsGroup;
69 65
import org.txm.rcp.views.QueriesView;
70 66
import org.txm.searchengine.core.Query;
71 67
import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
72 68
import org.txm.searchengine.cqp.corpus.CQPCorpus;
73 69
import org.txm.searchengine.cqp.corpus.Property;
74 70
import org.txm.searchengine.cqp.corpus.WordProperty;
75
import org.txm.searchengine.cqp.corpus.query.CQLQuery;
76 71
import org.txm.statsengine.r.rcp.views.RVariablesView;
77 72
import org.txm.utils.logger.Log;
78 73

  
......
147 142
	@Parameter(key=TXMPreferences.V_MAX)
148 143
	protected Spinner vMaxSpinner;
149 144

  
145
	
150 146
	/** The N ligne p page spinner. */
151 147
	@Parameter(key=TXMPreferences.N_LINES_PER_PAGE)
152 148
	protected Spinner nLinesPerPageSpinner;
......
173 169
		ComputeSelectionListener computeSelectionListener = new ComputeSelectionListener(this);
174 170
		ComputeKeyListener computeKeyListener = new ComputeKeyListener(this);
175 171
		
176
		Composite extendedParametersComposite = this.getExtendedParametersComposite();
177
		extendedParametersComposite.setLayout(new FormLayout());
172
		Composite extendedParametersComposite = this.getExtendedParametersGroup();
173
		//extendedParametersComposite.setLayout(new FormLayout());
178 174

  
179 175
		// info&navigation panel
180 176
		final GLComposite infosArea = this.getBottomToolbar().installGLComposite(IndexUIMessages.composite_infos, 1, false);
......
183 179
		
184 180
		// on créé une Query, ici le pivot de la concordance est "[]"
185 181
		// Query Area: query itself + view properties
186
		Composite queryArea = new Composite(extendedParametersComposite, SWT.NONE);
182
//		Composite queryArea = new Composite(extendedParametersComposite, SWT.NONE);
183
//
184
//		FormData queryLayoutData = new FormData();
185
//		queryLayoutData.top = new FormAttachment(0);
186
//		queryLayoutData.left = new FormAttachment(0);
187
//		queryLayoutData.right = new FormAttachment(100);
188
//		queryArea.setLayoutData(queryLayoutData);
189
//
190
//		queryArea.setLayout(new GridLayout(4, false));
187 191

  
188
		FormData queryLayoutData = new FormData();
189
		queryLayoutData.top = new FormAttachment(0);
190
		queryLayoutData.left = new FormAttachment(0);
191
		queryLayoutData.right = new FormAttachment(100);
192
		queryArea.setLayoutData(queryLayoutData);
193

  
194
		queryArea.setLayout(new GridLayout(4, false));
195

  
196 192
		// | Query: [ (v)] [Search] |
197 193
		
198
		// Query:
199
		getMainParametersComposite().getLayout().numColumns = 3;
194
		
195
		// Main parameters
196
		// Query
197
		this.getMainParametersComposite().getLayout().numColumns = 3;
200 198
		// make the zone expandable to display the longest query field
201
		getMainParametersComposite().setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
199
		this.getMainParametersComposite().setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
202 200
				
203 201
		// Query:
204
		queryLabel = new Label(getMainParametersComposite(), SWT.NONE);
202
		queryLabel = new Label(this.getMainParametersComposite(), SWT.NONE);
205 203
		queryLabel.setText(TXMCoreMessages.common_query);
206 204
		queryLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, true));
207 205

  
208 206
		// [ (v)]
209
		queryWidget = new AssistedChoiceQueryWidget(getMainParametersComposite(), SWT.DROP_DOWN, index.getCorpus());
207
		queryWidget = new AssistedChoiceQueryWidget(this.getMainParametersComposite(), SWT.DROP_DOWN, index.getCorpus());
210 208
		GridData layoutData = new GridData(GridData.VERTICAL_ALIGN_CENTER);
211 209
		layoutData.horizontalAlignment = GridData.FILL;
212 210
		layoutData.grabExcessHorizontalSpace = true;
......
215 213

  
216 214
		
217 215
		// Word properties selector
218
		propertiesSelector = new PropertiesSelector<WordProperty>(getMainParametersComposite(), SWT.NONE);
216
		propertiesSelector = new PropertiesSelector<WordProperty>(this.getMainParametersComposite(), SWT.NONE);
219 217
		propertiesSelector.setLayoutData(new GridData(GridData.FILL, GridData.FILL, false, false));
220 218
		propertiesSelector.setLayout(new GridLayout(3, false));
221 219
		try {
......
228 226
		// Listener
229 227
		propertiesSelector.addSelectionListener(computeSelectionListener);
230 228
		
229
		
230
		// extended parameters
231
		
232
		// FIXME: old version
231 233
		// Filters
232
		Composite filtercontrols = new Composite(extendedParametersComposite, SWT.NONE);
233
		FormData filtersLayoutData = new FormData();
234
		filtersLayoutData.top = new FormAttachment(queryArea, 0);
235
		filtersLayoutData.bottom = new FormAttachment(100);
236
		filtersLayoutData.left = new FormAttachment(0);
237
		filtersLayoutData.right = new FormAttachment(100);
238
		filtercontrols.setLayoutData(filtersLayoutData);
234
//		Composite filtercontrols = new Composite(extendedParametersComposite, SWT.NONE);
235
//		FormData filtersLayoutData = new FormData();
236
//		filtersLayoutData.top = new FormAttachment(queryArea, 0);
237
//		filtersLayoutData.bottom = new FormAttachment(100);
238
//		filtersLayoutData.left = new FormAttachment(0);
239
//		filtersLayoutData.right = new FormAttachment(100);
240
//		filtercontrols.setLayoutData(filtersLayoutData);
241
//
242
//		GridLayout gridLayout = new GridLayout();
243
//		gridLayout.numColumns = 9;
244
//		gridLayout.makeColumnsEqualWidth = false;
245
//		filtercontrols.setLayout(gridLayout);
246
//
247
//		Label thresholds = new Label(filtercontrols, SWT.NONE);
248
//		thresholds.setText(TXMCoreMessages.common_thresholds);
249
//		thresholds.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));
250
//
251
//		Label lFmin = new Label(filtercontrols, SWT.NONE);
252
//		lFmin.setText(TXMCoreMessages.common_fMin);
253
//		lFmin.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));
254
//
255
//		GridData fieldsGridData = new GridData(GridData.VERTICAL_ALIGN_END);
256
//		fieldsGridData.minimumWidth = 100;
257
//
258
//		fMinSpinner = new Spinner(filtercontrols, SWT.BORDER);
259
//		fMinSpinner.setMinimum(0);
260
//		fMinSpinner.setMaximum(9999999);
261
//		fMinSpinner.setIncrement(1);
262
//		fMinSpinner.setPageIncrement(100);
263
//		fMinSpinner.setLayoutData(fieldsGridData);
264
//		fMinSpinner.addKeyListener(computeKeyListener);
265
//		fMinSpinner.addSelectionListener(computeSelectionListener);
266
//
267
//		Label lFmax = new Label(filtercontrols, SWT.NONE);
268
//		lFmax.setText(TXMCoreMessages.common_fMax);
269
//		lFmax.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));
270
//
271
//		fMaxSpinner = new Spinner(filtercontrols, SWT.BORDER);
272
//		fMaxSpinner.setMinimum(0);
273
//		fMaxSpinner.setMaximum(9999999);
274
//		fMaxSpinner.setIncrement(1);
275
//		fMaxSpinner.setPageIncrement(100);
276
//		fMaxSpinner.setLayoutData(fieldsGridData);
277
//		fMaxSpinner.addKeyListener(computeKeyListener);
278
//		fMaxSpinner.addSelectionListener(computeSelectionListener);
279
//
280
//		Label lVmax = new Label(filtercontrols, SWT.NONE);
281
//		lVmax.setText(TXMCoreMessages.VMAX_1);
282
//		lVmax.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));
283
//
284
//		vMaxSpinner = new Spinner(filtercontrols, SWT.BORDER);
285
//		vMaxSpinner.setMinimum(0);
286
//		vMaxSpinner.setMaximum(9999999);
287
//		vMaxSpinner.setIncrement(1);
288
//		vMaxSpinner.setPageIncrement(100);
289
//		vMaxSpinner.setLayoutData(fieldsGridData);
290
//		vMaxSpinner.addKeyListener(computeKeyListener);
291
//		vMaxSpinner.addSelectionListener(computeSelectionListener);
239 292

  
240
		GridLayout gridLayout = new GridLayout();
241
		gridLayout.numColumns = 9;
242
		gridLayout.makeColumnsEqualWidth = false;
243
		filtercontrols.setLayout(gridLayout);
244

  
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));
248

  
249
		Label lFmin = new Label(filtercontrols, SWT.NONE);
250
		lFmin.setText(TXMCoreMessages.common_fMin);
251
		lFmin.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));
252

  
253
		GridData fieldsGridData = new GridData(GridData.VERTICAL_ALIGN_END);
254
		fieldsGridData.minimumWidth = 100;
255

  
256
		fMinSpinner = new Spinner(filtercontrols, SWT.BORDER);
257
		fMinSpinner.setMinimum(0);
258
		fMinSpinner.setMaximum(9999999);
259
		fMinSpinner.setIncrement(1);
260
		fMinSpinner.setPageIncrement(100);
261
		fMinSpinner.setLayoutData(fieldsGridData);
262
		fMinSpinner.addKeyListener(computeKeyListener);
263
		fMinSpinner.addSelectionListener(computeSelectionListener);
264

  
265
		Label lFmax = new Label(filtercontrols, SWT.NONE);
266
		lFmax.setText(TXMCoreMessages.common_fMax);
267
		lFmax.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));
268

  
269
		fMaxSpinner = new Spinner(filtercontrols, SWT.BORDER);
270
		fMaxSpinner.setMinimum(0);
271
		fMaxSpinner.setMaximum(9999999);
272
		fMaxSpinner.setIncrement(1);
273
		fMaxSpinner.setPageIncrement(100);
274
		fMaxSpinner.setLayoutData(fieldsGridData);
275
		fMaxSpinner.addKeyListener(computeKeyListener);
276
		fMaxSpinner.addSelectionListener(computeSelectionListener);
277

  
278
		Label lVmax = new Label(filtercontrols, SWT.NONE);
279
		lVmax.setText(TXMCoreMessages.VMAX_1);
280
		lVmax.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));
281

  
282
		vMaxSpinner = new Spinner(filtercontrols, SWT.BORDER);
283
		vMaxSpinner.setMinimum(0);
284
		vMaxSpinner.setMaximum(9999999);
285
		vMaxSpinner.setIncrement(1);
286
		vMaxSpinner.setPageIncrement(100);
287
		vMaxSpinner.setLayoutData(fieldsGridData);
288
		vMaxSpinner.addKeyListener(computeKeyListener);
289
		vMaxSpinner.addSelectionListener(computeSelectionListener);
290

  
291
		Label lNLigneppage = new Label(filtercontrols, SWT.NONE);
293
		
294
		// FIXME: new version
295
		// Filters
296
		ThresholdsGroup thresholdsGroup = new ThresholdsGroup(this.getExtendedParametersGroup(), this);
297
		this.fMinSpinner = thresholdsGroup.getFMinSpinner();
298
		this.fMaxSpinner = thresholdsGroup.getFMaxSpinner();
299
		this.vMaxSpinner = thresholdsGroup.getVMaxSpinner();
300
		
301
		
302
		
303
		
304
		Label lNLigneppage = new Label(this.getExtendedParametersGroup(), SWT.NONE);
292 305
		lNLigneppage.setText(IndexUIMessages.IndexEditor_8);
293
		lNLigneppage.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));
294

  
295
		nLinesPerPageSpinner = new Spinner(filtercontrols, SWT.BORDER);
306
		
307
		nLinesPerPageSpinner = new Spinner(this.getExtendedParametersGroup(), SWT.BORDER);
296 308
		nLinesPerPageSpinner.setMinimum(0);
297 309
		nLinesPerPageSpinner.setMaximum(99999);
298 310
		nLinesPerPageSpinner.setIncrement(1);
299 311
		nLinesPerPageSpinner.setPageIncrement(100);
300
		nLinesPerPageSpinner.setLayoutData(fieldsGridData);
301
		nLinesPerPageSpinner.addSelectionListener(new SelectionListener() {
302
			@Override
303
			public void widgetSelected(SelectionEvent e) { }
304

  
305
			@Override
306
			public void widgetDefaultSelected(SelectionEvent e) {
307
				index.setTopLine(0);
308
				index.setNLinesPerPage(nLinesPerPageSpinner.getSelection());
309
				fillResultArea();
310
				viewer.getTable().select(0);
311
				viewer.getTable().showSelection();
312
			}
313
		});
314

  
312
		
313
		// FIXME; became useless?
314
//		nLinesPerPageSpinner.addSelectionListener(new SelectionListener() {
315
//			@Override
316
//			public void widgetSelected(SelectionEvent e) { }
317
//
318
//			@Override
319
//			public void widgetDefaultSelected(SelectionEvent e) {
320
//				index.setTopLine(0);
321
//				index.setNLinesPerPage(nLinesPerPageSpinner.getSelection());
322
//				fillResultArea();
323
//				viewer.getTable().select(0);
324
//				viewer.getTable().showSelection();
325
//			}
326
//		});
327
		
328
		nLinesPerPageSpinner.addSelectionListener(computeSelectionListener);
329
		nLinesPerPageSpinner.addKeyListener(computeKeyListener);
330
		
331
		
332
		
315 333
		navigationArea = new NavigationWidget(infosArea, SWT.NONE);
316 334
		navigationArea.setLayoutData(new GridData(SWT.CENTER, SWT.FILL, true,	false));
317 335

  
tmp/org.txm.index.rcp/src/org/txm/index/rcp/editors/PartitionIndexEditor.java (revision 1174)
63 63
import org.txm.rcp.swt.widget.AssistedChoiceQueryWidget;
64 64
import org.txm.rcp.swt.widget.NavigationWidget;
65 65
import org.txm.rcp.swt.widget.PropertiesSelector;
66
import org.txm.rcp.swt.widget.ThresholdsGroup;
66 67
import org.txm.rcp.views.QueriesView;
67 68
import org.txm.searchengine.core.Query;
68 69
import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
......
73 74
import org.txm.utils.logger.Log;
74 75

  
75 76
/**
76
 * display an index/lexicon parameters and result.
77
 * Partition index editor.
77 78
 *
78 79
 * @author mdecorde
79 80
 */
......
125 126
	@Parameter(key=TXMPreferences.QUERY)
126 127
	protected AssistedChoiceQueryWidget queryWidget;
127 128

  
128
	/** The Fmin spinner. */
129
	/**
130
	 * Minimum frequency filtering spinner.
131
	 */
129 132
	@Parameter(key=TXMPreferences.F_MIN)
130 133
	protected Spinner fMinSpinner;
131 134

  
132
	/** The Fmax spinner. */
135
	/**
136
	 * Maximum frequency filtering spinner.
137
	 */
133 138
	@Parameter(key=TXMPreferences.F_MAX)
134 139
	protected Spinner fMaxSpinner;
135 140

  
136
	/** The Tmax spinner. */
141
	/**
142
	 * Maximum number of lines filtering.
143
	 */
137 144
	@Parameter(key=TXMPreferences.V_MAX)
138 145
	protected Spinner vMaxSpinner;
139 146

  
147
	
140 148
	/** The N ligne p page spinner. */
141 149
	@Parameter(key=TXMPreferences.N_LINES_PER_PAGE)
142 150
	protected Spinner nLinesPerPageSpinner;
......
163 171
		ComputeSelectionListener computeSelectionListener = new ComputeSelectionListener(this);
164 172
		ComputeKeyListener computeKeyListener = new ComputeKeyListener(this);
165 173
		
166
		Composite paramArea = this.getExtendedParametersComposite();
167
		paramArea.setLayout(new FormLayout());
174
		Composite extendedParametersComposite = this.getExtendedParametersGroup();
175
//		paramArea.setLayout(new FormLayout());
168 176

  
169 177
		// info&navigation panel
170 178
		final GLComposite infosArea = this.getBottomToolbar().installGLComposite(IndexUIMessages.composite_infos, 1, false);
171 179
		infosArea.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
172 180
		infosArea.getLayout().numColumns = 5; // nav panel + labels
173 181
		
174
		// on créé une Query, ici le pivot de la concordance est "[]"
175
		// Query Area: query itself + view properties
176
		Composite queryArea = new Composite(paramArea, SWT.NONE);
182
//		// on créé une Query, ici le pivot de la concordance est "[]"
183
//		// Query Area: query itself + view properties
184
//		Composite queryArea = new Composite(paramArea, SWT.NONE);
185
//
186
//		FormData queryLayoutData = new FormData();
187
//		queryLayoutData.top = new FormAttachment(0);
188
//		queryLayoutData.left = new FormAttachment(0);
189
//		queryLayoutData.right = new FormAttachment(100);
190
//		queryArea.setLayoutData(queryLayoutData);
191
//
192
//		queryArea.setLayout(new GridLayout(4, false));
177 193

  
178
		FormData queryLayoutData = new FormData();
179
		queryLayoutData.top = new FormAttachment(0);
180
		queryLayoutData.left = new FormAttachment(0);
181
		queryLayoutData.right = new FormAttachment(100);
182
		queryArea.setLayoutData(queryLayoutData);
183

  
184
		queryArea.setLayout(new GridLayout(4, false));
185

  
186 194
		// | Query: [ (v)] [Search] |
187 195
		
188
		// Query:
189
		getMainParametersComposite().getLayout().numColumns = 3;
196
		// Main parameters
197
		// Query
198
		this.getMainParametersComposite().getLayout().numColumns = 3;
190 199
		// make the zone expandable to display the longest query field
191
		getMainParametersComposite().setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
200
		this.getMainParametersComposite().setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
192 201
				
193 202
		// Query:
194
		queryLabel = new Label(getMainParametersComposite(), SWT.NONE);
203
		queryLabel = new Label(this.getMainParametersComposite(), SWT.NONE);
195 204
		queryLabel.setText(TXMCoreMessages.common_query);
196 205
		queryLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, true));
197 206

  
198 207
		// [ (v)]
199
		queryWidget = new AssistedChoiceQueryWidget(getMainParametersComposite(), SWT.DROP_DOWN, index.getCorpus());
208
		queryWidget = new AssistedChoiceQueryWidget(this.getMainParametersComposite(), SWT.DROP_DOWN, index.getCorpus());
200 209
		GridData layoutData = new GridData(GridData.VERTICAL_ALIGN_CENTER);
201 210
		layoutData.horizontalAlignment = GridData.FILL;
202 211
		layoutData.grabExcessHorizontalSpace = true;
......
205 214

  
206 215
		
207 216
		// Word properties selector
208
		propertiesSelector = new PropertiesSelector<WordProperty>(getMainParametersComposite(), SWT.NONE);
217
		propertiesSelector = new PropertiesSelector<WordProperty>(this.getMainParametersComposite(), SWT.NONE);
209 218
		propertiesSelector.setLayoutData(new GridData(GridData.FILL, GridData.FILL, false, false));
210 219
		propertiesSelector.setLayout(new GridLayout(3, false));
211 220
		try {
......
218 227
		// Listener
219 228
		propertiesSelector.addSelectionListener(computeSelectionListener);
220 229
		
230
		
231
		// extended parameters
232
		
233
		// FIXME: old version
221 234
		// Filters
222
		Composite filtercontrols = new Composite(paramArea, SWT.NONE);
223
		FormData filtersLayoutData = new FormData();
224
		filtersLayoutData.top = new FormAttachment(queryArea, 0);
225
		filtersLayoutData.bottom = new FormAttachment(100);
226
		filtersLayoutData.left = new FormAttachment(0);
227
		filtersLayoutData.right = new FormAttachment(100);
228
		filtercontrols.setLayoutData(filtersLayoutData);
235
//		Composite filtercontrols = new Composite(paramArea, SWT.NONE);
236
//		FormData filtersLayoutData = new FormData();
237
//		filtersLayoutData.top = new FormAttachment(queryArea, 0);
238
//		filtersLayoutData.bottom = new FormAttachment(100);
239
//		filtersLayoutData.left = new FormAttachment(0);
240
//		filtersLayoutData.right = new FormAttachment(100);
241
//		filtercontrols.setLayoutData(filtersLayoutData);
242
//
243
//		GridLayout gridLayout = new GridLayout();
244
//		gridLayout.numColumns = 9;
245
//		gridLayout.makeColumnsEqualWidth = false;
246
//		filtercontrols.setLayout(gridLayout);
247
//
248
//		Label tmp = new Label(filtercontrols, SWT.NONE);
249
//		tmp.setText(TXMCoreMessages.common_thresholds);
250
//		tmp.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));
251
//
252
//		Label lFmin = new Label(filtercontrols, SWT.NONE);
253
//		lFmin.setText(TXMCoreMessages.common_fMin);
254
//		lFmin.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));
255
//
256
//		GridData fieldsGridData = new GridData(GridData.VERTICAL_ALIGN_END);
257
//		fieldsGridData.minimumWidth = 100;
258
//
259
//		fMinSpinner = new Spinner(filtercontrols, SWT.BORDER);
260
//		fMinSpinner.setMinimum(0);
261
//		fMinSpinner.setMaximum(9999999);
262
//		fMinSpinner.setIncrement(1);
263
//		fMinSpinner.setPageIncrement(100);
264
//		fMinSpinner.setLayoutData(fieldsGridData);
265
//		fMinSpinner.addKeyListener(computeKeyListener);
266
//		fMinSpinner.addSelectionListener(computeSelectionListener);
267
//
268
//		Label lFmax = new Label(filtercontrols, SWT.NONE);
269
//		lFmax.setText(TXMCoreMessages.common_fMax);
270
//		lFmax.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));
271
//
272
//		fMaxSpinner = new Spinner(filtercontrols, SWT.BORDER);
273
//		fMaxSpinner.setMinimum(0);
274
//		fMaxSpinner.setMaximum(9999999);
275
//		fMaxSpinner.setIncrement(1);
276
//		fMaxSpinner.setPageIncrement(100);
277
//		fMaxSpinner.setLayoutData(fieldsGridData);
278
//		fMaxSpinner.addKeyListener(computeKeyListener);
279
//		fMaxSpinner.addSelectionListener(computeSelectionListener);
280
//
281
//		Label lVmax = new Label(filtercontrols, SWT.NONE);
282
//		lVmax.setText(TXMCoreMessages.VMAX_1);
283
//		lVmax.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));
284
//
285
//		vMaxSpinner = new Spinner(filtercontrols, SWT.BORDER);
286
//		vMaxSpinner.setMinimum(0);
287
//		vMaxSpinner.setMaximum(9999999);
288
//		vMaxSpinner.setIncrement(1);
289
//		vMaxSpinner.setPageIncrement(100);
290
//		vMaxSpinner.setLayoutData(fieldsGridData);
291
//		vMaxSpinner.addKeyListener(computeKeyListener);
292
//		vMaxSpinner.addSelectionListener(computeSelectionListener);
229 293

  
230
		GridLayout gridLayout = new GridLayout();
231
		gridLayout.numColumns = 9;
232
		gridLayout.makeColumnsEqualWidth = false;
233
		filtercontrols.setLayout(gridLayout);
294
		
295
		// FIXME: new version
296
		// Filters
297
		ThresholdsGroup thresholdsGroup = new ThresholdsGroup(this.getExtendedParametersGroup(), this);
298
		this.fMinSpinner = thresholdsGroup.getFMinSpinner();
299
		this.fMaxSpinner = thresholdsGroup.getFMaxSpinner();
300
		this.vMaxSpinner = thresholdsGroup.getVMaxSpinner();
234 301

  
235
		Label tmp = new Label(filtercontrols, SWT.NONE);
236
		tmp.setText(TXMCoreMessages.common_thresholds);
237
		tmp.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));
238

  
239
		Label lFmin = new Label(filtercontrols, SWT.NONE);
240
		lFmin.setText(TXMCoreMessages.common_fMin);
241
		lFmin.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));
242

  
243
		GridData fieldsGridData = new GridData(GridData.VERTICAL_ALIGN_END);
244
		fieldsGridData.minimumWidth = 100;
245

  
246
		fMinSpinner = new Spinner(filtercontrols, SWT.BORDER);
247
		fMinSpinner.setMinimum(0);
248
		fMinSpinner.setMaximum(9999999);
249
		fMinSpinner.setIncrement(1);
250
		fMinSpinner.setPageIncrement(100);
251
		fMinSpinner.setLayoutData(fieldsGridData);
252
		fMinSpinner.addKeyListener(computeKeyListener);
253
		fMinSpinner.addSelectionListener(computeSelectionListener);
254

  
255
		Label lFmax = new Label(filtercontrols, SWT.NONE);
256
		lFmax.setText(TXMCoreMessages.common_fMax);
257
		lFmax.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));
258

  
259
		fMaxSpinner = new Spinner(filtercontrols, SWT.BORDER);
260
		fMaxSpinner.setMinimum(0);
261
		fMaxSpinner.setMaximum(9999999);
262
		fMaxSpinner.setIncrement(1);
263
		fMaxSpinner.setPageIncrement(100);
264
		fMaxSpinner.setLayoutData(fieldsGridData);
265
		fMaxSpinner.addKeyListener(computeKeyListener);
266
		fMaxSpinner.addSelectionListener(computeSelectionListener);
267

  
268
		Label lVmax = new Label(filtercontrols, SWT.NONE);
269
		lVmax.setText(TXMCoreMessages.VMAX_1);
270
		lVmax.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));
271

  
272
		vMaxSpinner = new Spinner(filtercontrols, SWT.BORDER);
273
		vMaxSpinner.setMinimum(0);
274
		vMaxSpinner.setMaximum(9999999);
275
		vMaxSpinner.setIncrement(1);
276
		vMaxSpinner.setPageIncrement(100);
277
		vMaxSpinner.setLayoutData(fieldsGridData);
278
		vMaxSpinner.addKeyListener(computeKeyListener);
279
		vMaxSpinner.addSelectionListener(computeSelectionListener);
280

  
281
		Label lNLigneppage = new Label(filtercontrols, SWT.NONE);
302
		
303
		
304
		
305
		Label lNLigneppage = new Label(this.getExtendedParametersGroup(), SWT.NONE);
282 306
		lNLigneppage.setText(IndexUIMessages.IndexEditor_8);
283
		lNLigneppage.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));
284 307

  
285
		nLinesPerPageSpinner = new Spinner(filtercontrols, SWT.BORDER);
308
		nLinesPerPageSpinner = new Spinner(this.getExtendedParametersGroup(), SWT.BORDER);
286 309
		nLinesPerPageSpinner.setMinimum(0);
287 310
		nLinesPerPageSpinner.setMaximum(99999);
288 311
		nLinesPerPageSpinner.setIncrement(1);
289 312
		nLinesPerPageSpinner.setPageIncrement(100);
290
		nLinesPerPageSpinner.setLayoutData(fieldsGridData);
291
		nLinesPerPageSpinner.addSelectionListener(new SelectionListener() {
292
			@Override
293
			public void widgetSelected(SelectionEvent e) { }
294 313

  
295
			@Override
296
			public void widgetDefaultSelected(SelectionEvent e) {
297
				index.setTopLine(0);
298
				index.setNLinesPerPage(nLinesPerPageSpinner.getSelection());
299
				fillResultArea();
300
				viewer.getTable().select(0);
301
				viewer.getTable().showSelection();
302
			}
303
		});
314
		// FIXME; became useless?
315
//		nLinesPerPageSpinner.addSelectionListener(new SelectionListener() {
316
//			@Override
317
//			public void widgetSelected(SelectionEvent e) { }
318
//
319
//			@Override
320
//			public void widgetDefaultSelected(SelectionEvent e) {
321
//				index.setTopLine(0);
322
//				index.setNLinesPerPage(nLinesPerPageSpinner.getSelection());
323
//				fillResultArea();
324
//				viewer.getTable().select(0);
325
//				viewer.getTable().showSelection();
326
//			}
327
//		});
304 328

  
329
		nLinesPerPageSpinner.addSelectionListener(computeSelectionListener);
330
		nLinesPerPageSpinner.addKeyListener(computeKeyListener);
331
		
332
		
305 333
		navigationArea = new NavigationWidget(infosArea, SWT.NONE);
306 334
		navigationArea.setLayoutData(new GridData(SWT.CENTER, SWT.FILL, true,	false));
307 335

  
......
498 526
		separatorColumn = new TableColumn(viewer.getTable(), SWT.LEFT);
499 527
		separatorColumn.setText(""); //$NON-NLS-1$
500 528
		separatorColumn.pack();
501
		paramArea.pack();
529
		extendedParametersComposite.pack();
502 530

  
503 531
		// Add double click, "Send to" command
504 532
		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 1174)
227 227
				public void widgetDefaultSelected(SelectionEvent e) { }
228 228
			});
229 229
			// System.out.println(parent.getLayout());
230
			Composite mainPanel = this.getExtendedParametersComposite();
230
			Composite mainPanel = this.getExtendedParametersGroup();
231 231
			GridData gridData = new GridData(GridData.FILL, GridData.CENTER, true, true);
232 232
			mainPanel.setLayoutData(gridData);
233 233
			GridLayout glayout = new GridLayout(2, false);
tmp/org.txm.textsbalance.rcp/src/org/txm/textsbalance/rcp/editors/TextsBalanceEditor.java (revision 1174)
62 62

  
63 63
		
64 64
		// for group tests
65
		Composite parametersArea = this.getExtendedParametersComposite();
65
		Composite parametersArea = this.getExtendedParametersGroup();
66 66
		
67 67
		Group group = new Group(parametersArea, SWT.NONE);
68 68
		
tmp/org.txm.concordance.rcp/src/org/txm/concordance/rcp/editors/ConcordanceEditor.java (revision 1174)
324 324
	@Override
325 325
	public void _createPartControl() {
326 326

  
327
		Composite controlArea = getExtendedParametersComposite();
327
		Composite controlArea = getExtendedParametersGroup();
328 328

  
329 329
		try {
330 330
			composeControlArea(controlArea);
tmp/org.txm.referencer.rcp/src/org/txm/referencer/rcp/editors/ReferencerEditor.java (revision 1174)
142 142
		ComputeSelectionListener computeSelectionListener = new ComputeSelectionListener(this);
143 143
		ComputeKeyListener computeKeyListener = new ComputeKeyListener(this);
144 144
		
145
		Composite paramArea = getExtendedParametersComposite();
145
		Composite paramArea = getExtendedParametersGroup();
146 146
		paramArea.setLayout(new GridLayout(3, false));
147 147
		
148 148
		getMainParametersComposite().getLayout().numColumns = 3;
tmp/org.txm.searchengine.cqp.core/src/org/txm/importer/cwb/CwbProcess.java (revision 1174)
93 93
		File pathToExecutable = new File(CQPLibPreferences.getInstance().getString(CQPLibPreferences.CQI_SERVER_PATH_TO_CQPLIB), filename);
94 94

  
95 95
		if (!pathToExecutable.exists()) {
96
			System.out.println("Error: "+pathToExecutable.getAbsolutePath()+" not found.");
96
			Log.severe("Error: "+pathToExecutable.getAbsolutePath()+" not found.");
97 97
			return false;
98 98
		}
99 99
		
100 100
		if (!pathToExecutable.canExecute()) {
101
			System.out.println("Error: "+pathToExecutable.getAbsolutePath()+" not executable.");
101
			Log.severe("Error: "+pathToExecutable.getAbsolutePath()+" not executable.");
102 102
			return false;
103 103
		}
104 104
		return true;
......
114 114
	 * @throws InterruptedException 
115 115
	 * @throws IOException 
116 116
	 */
117
	protected boolean run(List<String> cmd, boolean monitorOutput, boolean waitFor)
118
			throws ServerNotFoundException, InterruptedException, IOException {
117
	protected boolean run(List<String> cmd, boolean monitorOutput, boolean waitFor) throws ServerNotFoundException, InterruptedException, IOException {
118
		
119 119
		Log.info(TXMCoreMessages.CwbProcess_1 + StringUtils.join(cmd, " ")); //$NON-NLS-1$ 
120
		
120 121
		//System.out.println(StringUtils.join(cmd, " "));
121 122
		for (String s : cmd) {
122 123
			//System.out.println("s="+s);
123 124
			if (s == null) {
124
				System.out.println("ERROR null arg parameter: "+cmd);
125
				Log.severe("ERROR null arg parameter: "+cmd);
125 126
				return false;
126 127
			}
127 128
		}
......
265 266
		String cwbLoc = CQPLibPreferences.getInstance().getString(CQPLibPreferences.CQI_SERVER_PATH_TO_CQPLIB)+File.separator;
266 267

  
267 268
		if (!new File(cwbLoc).exists()) {
268
			System.out.println(TXMCoreMessages.CwbProcess_5+cwbLoc);
269
			Log.severe(TXMCoreMessages.CwbProcess_5+cwbLoc);
269 270
			return null;
270 271
		}
271 272

  
tmp/org.txm.searchengine.cqp.core/src/org/txm/importer/cwb/CwbMakeAll.java (revision 1174)
32 32
import java.util.ArrayList;
33 33
import java.util.Arrays;
34 34

  
35
import org.txm.core.preferences.TXMPreferences;
36 35
import org.txm.libs.cqp.CQPLibPreferences;
37 36
import org.txm.searchengine.cqp.clientExceptions.ServerNotFoundException;
37
import org.txm.utils.OSDetector;
38
import org.txm.utils.logger.Log;
38 39

  
39 40
// TODO: Auto-generated Javadoc
40 41
/**
......
131 132
	 * @throws IOException 
132 133
	 * @throws InterruptedException 
133 134
	 */
134
	public boolean run(String pathToExecutable, String corpusName,
135
			String pathToRegistry, boolean monitorOutput)
136
			throws ServerNotFoundException, InterruptedException, IOException {
137
		if (System.getProperty("os.name").contains("Win")) //$NON-NLS-1$ //$NON-NLS-2$
138
		{
139
			pathToExecutable = "\"" + pathToExecutable + "\""; //$NON-NLS-1$ //$NON-NLS-2$
140
			pathToRegistry = "\"" + pathToRegistry + "\""; //$NON-NLS-1$ //$NON-NLS-2$
141
		}
135
	public boolean run(String pathToExecutable, String corpusName, String pathToRegistry, boolean monitorOutput) throws ServerNotFoundException, InterruptedException, IOException {
136

  
137
		// FIXME: SJ: old code that created a wrong file path
138
		// need to check on a real TXM install if this code is very useless then remove it
139
//		if (OSDetector.isFamilyWindows()) { //$NON-NLS-1$ //$NON-NLS-2$
140
////			pathToExecutable = "\"" + pathToExecutable + "\""; //$NON-NLS-1$ //$NON-NLS-2$
141
////			pathToRegistry = "\"" + pathToRegistry + "\""; //$NON-NLS-1$ //$NON-NLS-2$
142
//			
143
//			pathToExecutable = pathToExecutable + "/"; //$NON-NLS-1$ //$NON-NLS-2$
144
//			pathToRegistry = pathToRegistry + "/"; //$NON-NLS-1$ //$NON-NLS-2$
145
//
146
//			
147
//		}
142 148
		
143 149
		if (!new File(pathToExecutable).exists()) {
144
			System.out.println("Error: path to cwb-makeall not found: "+pathToExecutable);
150
			Log.severe("Error: path to cwb-makeall not found: " + pathToExecutable);
145 151
			return false;
146 152
		}
147 153
		if (!new File(pathToExecutable).canExecute()) {
148
			System.out.println("Error: path to cwb-makeall not executable: "+pathToExecutable);
154
			Log.severe("Error: path to cwb-makeall not executable: " + pathToExecutable);
149 155
			return false;
150 156
		}
151 157
		
152 158
		ArrayList<String> cmd = new ArrayList<String>();
153
		cmd.addAll(Arrays.asList(pathToExecutable,
154
				"-r", pathToRegistry, "-V", corpusName.toUpperCase())); //$NON-NLS-1$ //$NON-NLS-2$
159
		cmd.addAll(Arrays.asList(pathToExecutable, "-r", pathToRegistry, "-V", corpusName.toUpperCase())); //$NON-NLS-1$ //$NON-NLS-2$
155 160
		if (debug) {
156
			cmd.add(1, "-D"); //$NON-NLS-1$ //$NON-NLS-2$
161
			cmd.add(1, "-D"); //$NON-NLS-1$
157 162
		}
158 163
		return run(cmd, monitorOutput, true); // always wait for cwb-makeall to end
159 164
	}
tmp/org.txm.rcp.feature/win/TXM.bat (revision 1174)
25 25
:USERHOMEOK
26 26

  
27 27
set TXMHOME=%USERHOME%TXM-%VERSION%\
28
set DOTTXM=%TXMHOME%.txm\
28
set DOTTXM=%TXMHOME%corpora\
29 29

  
30 30
mkdir "%TXMHOME%" 
31 31

  
tmp/org.txm.queryindex.rcp/src/org/txm/queryindex/rcp/editors/queryindex/QueryIndexEditor.java (revision 1174)
425 425
//			}
426 426
//		});
427 427

  
428
		final Composite paramArea = getExtendedParametersComposite();
428
		final Composite paramArea = getExtendedParametersGroup();
429 429

  
430 430
		// info&navigation panel
431 431
		// final Composite infosArea = new Composite(headComposite, SWT.NONE);
tmp/org.txm.queryindex.rcp/src/org/txm/rcp/editors/queryindex/QueryIndexEditor.java (revision 1174)
425 425
//			}
426 426
//		});
427 427

  
428
		final Composite paramArea = getExtendedParametersComposite();
428
		final Composite paramArea = getExtendedParametersGroup();
429 429

  
430 430
		// info&navigation panel
431 431
		// final Composite infosArea = new Composite(headComposite, SWT.NONE);
tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/editors/LexicalTableEditor.java (revision 1174)
179 179
					this.getResult().getProperty(), false);
180 180

  
181 181
			// Extended parameters
182
			Composite extendedParametersArea = this.getExtendedParametersComposite();
182
			Composite extendedParametersArea = this.getExtendedParametersGroup();
183 183
			
184 184
			// FIXME: Apply button
185 185
//			Button keepTop = new Button(extendedParametersArea, SWT.PUSH);
tmp/org.txm.properties.rcp/src/org/txm/properties/rcp/editors/PropertiesEditor.java (revision 1174)
59 59
	@Override
60 60
	public void _createPartControl() {
61 61

  
62
		Composite parametersArea = this.getExtendedParametersComposite();
62
		Composite parametersArea = this.getExtendedParametersGroup();
63 63

  
64 64
		// label
65 65
		new Label(parametersArea, SWT.NONE).setText(PropertiesUIMessages.editor_label_v_max);
tmp/org.txm.wordcloud.rcp/src/org/txm/wordcloud/rcp/editors/WordCloudEditor.java (revision 1174)
41 41
	public void __createPartControl() {
42 42

  
43 43
		// for group tests
44
		Composite parametersArea = this.getExtendedParametersComposite();
44
		Composite parametersArea = this.getExtendedParametersGroup();
45 45

  
46 46
		// fmin
47 47
		new Label(parametersArea, SWT.NONE).setText(WordCloudUIMessages.EditorToolBar_fmin);
tmp/org.txm.core/src/java/org/txm/core/results/TXMResult.java (revision 1174)
546 546
		if (key.isEmpty()) {
547 547
			return false;
548 548
		}
549
		if (this.isDirty()) {
550
			return true;
551
		}
549
//		if (this.isDirty()) {
550
//			return true;
551
//		}
552 552

  
553 553
		Object lastValue = lastParameters.get(key);
554 554
		Object newValue = this.getParameter(key);
......
1161 1161
	}
1162 1162

  
1163 1163
	/**
1164
	 * Deletes all non persistent results and save the results to persist.
1164
	 * Deletes all non persistent results and saves the results to persist.
1165 1165
	 */
1166 1166
	public static void deleteAllNonPersistentResults() {
1167 1167
		List<TXMResult> results = Toolbox.workspace.getDeepChildren();
......
1789 1789
	 * @throws Exception
1790 1790
	 */
1791 1791
	public boolean compute() {
1792
		return this.compute(new LogMonitor("Computing "+this));
1792
		return this.compute(new LogMonitor("Computing " + this));
1793 1793
	}
1794 1794

  
1795 1795

  
......
1973 1973
	 * Checks if the result must be persisted according to the persistence global preference or the user persistable state.
1974 1974
	 * @return
1975 1975
	 */
1976
//	public boolean mustBePersisted()	{
1977
//		if (this.internalPersistable
1978
//				|| this.userPersistable)	{
1979
//			return true;
1980
//		}
1981
//		return false;
1982
//	}
1983

  
1984
	// FIXME: need to prove this code
1976 1985
	public boolean mustBePersisted()	{
1977 1986
		return this.internalPersistable || this.userPersistable;
1978 1987
	}
tmp/org.txm.core/src/java/org/txm/objects/Workspace.java (revision 1174)
353 353
	}
354 354

  
355 355
	/**
356
	 * Loads and recreate the existing projects.
356
	 * Loads and recreates the existing projects.
357 357
	 */
358 358
	public void loadTXMResultsFromProjectScopes()	{
359 359

  
360
		// FIXME: tmp persistence tests: Reload saved results
361
		//		if (TBXPreferences.getInstance().getBoolean(TBXPreferences.AUTO_PERSISTENCE_ENABLED)) {
362 360
		Log.finest("Toolbox.initialize(): reloading projects...");
363 361
		
364 362
		IWorkspace rcpWorkspace = ResourcesPlugin.getWorkspace();
365 363
		IProject projects[] = rcpWorkspace.getRoot().getProjects();
366 364
		
367 365
		Log.info("Toolbox.initialize(): " + projects.length + " project(s) found in workspace.");
368
		LogMonitor monitor = new LogMonitor("Workspace project init");
366
		LogMonitor monitor = new LogMonitor("Workspace project init.");
369 367
		for (IProject project : projects) {
370 368
			try {
371 369
				project.open(monitor);
tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/handlers/CopyChartViewToClipboard.java (revision 1174)
8 8
import org.txm.utils.logger.Log;
9 9

  
10 10
/**
11
 * Resets the chart view of the active chart editor part.
11
 * Copy the chart view of the active chart editor part the clipboard .
12 12
 * @author sjacquot
13 13
 *
14 14
 */
......
19 19
	public Object execute(ExecutionEvent event) throws ExecutionException {
20 20
		ChartEditor chartEditor = SWTChartsComponentsProvider.getActiveChartEditor(event);
21 21
		chartEditor.copyChartViewToClipboard();
22
		Log.finest("View copied to clipboard.");
22
		
23
		Log.finest("Chart view copied to clipboard.");
24
		
23 25
		return null;
24 26
	}
25 27

  
tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditorToolBar.java (revision 1174)
244 244
		RowLayout layout = new RowLayout();
245 245
		layout.wrap = true;
246 246
		layout.center = true;
247
		layout.spacing = layout.marginWidth = layout.marginBottom = layout.marginHeight = layout.marginTop = 0;
247
		layout.spacing = 8;
248
		layout.marginWidth = layout.marginBottom = layout.marginHeight = layout.marginTop = 0;
248 249
		group.setLayout(layout);
249 250

  
250 251
		GridData gd2 = new GridData(GridData.FILL_BOTH);
tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditor.java (revision 1174)
119 119
	/**
120 120
	 * The parameters groups are added to this composite. contains the sub widgets of the default Top toolbar
121 121
	 */
122
	private GLComposite extendedParametersGroupsComposite;
122
	private GLComposite extendedParametersComposite;
123 123

  
124 124
	/**
125 125
	 * Command main parameters that are always visible in the toolbar. 
......
128 128

  
129 129

  
130 130
	/**
131
	 * Command extended parameters composite that can be hidden.
131
	 * Command extended parameters group that can be hidden.
132 132
	 */
133
	protected Group extendedParametersComposite;
133
	protected Group extendedParametersGroup;
134 134

  
135 135
	/**
136 136
	 * 
......
301 301
			this.mainParametersComposite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, false, false));
302 302
			this.mainParametersComposite.getLayout().horizontalSpacing = 5;
303 303

  
304
			this.extendedParametersGroupsComposite = new GLComposite(parent, SWT.NONE, "Extended parameters area"); //$NON-NLS-1$
305
			this.extendedParametersGroupsComposite.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
304
			this.extendedParametersComposite = new GLComposite(parent, SWT.NONE, "Extended parameters area"); //$NON-NLS-1$
305
			this.extendedParametersComposite.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
306 306

  
307
			this.topToolBar = new TXMEditorToolBar(this, this.firstLineComposite, this.extendedParametersGroupsComposite, SWT.FLAT | SWT.RIGHT, TOP_TOOLBAR_ID);
307
			this.topToolBar = new TXMEditorToolBar(this, this.firstLineComposite, this.extendedParametersComposite, SWT.FLAT | SWT.RIGHT, TOP_TOOLBAR_ID);
308 308

  
309 309

  
310 310
			// computing parameters components
......
314 314
			//			if(!this.getResult().canCompute() && this.getResult().isDirty())	{
315 315
			//				showExtendedParameters = true;
316 316
			//			}
317
			this.extendedParametersComposite = this.topToolBar.installGroup(COMPUTING_PARAMETERS_GROUP_ID, TXMUIMessages.TXMEditor_7, 
317
			this.extendedParametersGroup = this.topToolBar.installGroup(COMPUTING_PARAMETERS_GROUP_ID, TXMUIMessages.TXMEditor_7, 
318 318
					"icons/show_computing_parameters.png",  //$NON-NLS-1$
319 319
					"icons/hide_computing_parameters.png",  //$NON-NLS-1$
320 320
					showExtendedParameters);
......
358 358
			}
359 359

  
360 360
			// uninstall parameters group if not used
361
			if (extendedParametersComposite.getChildren().length == 0) {
361
			if (extendedParametersGroup.getChildren().length == 0) {
362 362
				this.topToolBar.unInstallGroup(COMPUTING_PARAMETERS_GROUP_ID);
363 363
			}
364 364

  
......
474 474
	/**
475 475
	 * @return the commandParametersComposite. Put here you main parameter widgets
476 476
	 */
477
	public Group getExtendedParametersComposite() {
478
		return this.extendedParametersComposite;
477
	public Group getExtendedParametersGroup() {
478
		return this.extendedParametersGroup;
479 479
	}
480 480

  
481 481
	@Override
......
1184 1184
	 * @return the composite that contains the <b>default Top</b> TXMEditorToolBar parameters panels
1185 1185
	 */
1186 1186
	public GLComposite getParametersGroupsComposite() {
1187
		return extendedParametersGroupsComposite;
1187
		return extendedParametersComposite;
1188 1188
	}
1189 1189

  
1190 1190
	/**
tmp/org.txm.index.core/src/org/txm/index/core/functions/Index.java (revision 1174)
169 169

  
170 170
	@Override
171 171
	protected boolean _compute() throws Exception {
172
		lines.clear();
173
		counts.clear();
174
		currentpartid = 0;
175
		nTotalTokens = 0;
172

  
176 173
		
177
		if (parent instanceof MainCorpus && "[]".equals(pQuery.getQueryString()) && pProperties.size() == 1) {
178

  
179
			computeWithCorpusAndNoQuery(); // internally using a lexicon
180
		}
181
		else {
182
			this.lexicon = null;
183

  
184
			if (parent instanceof CQPCorpus) {
185

  
186
				CQPCorpus corpus = (CQPCorpus)parent;
187

  
188
				if (!scanCorpus(corpus)) {
189
					lines = new ArrayList<Line>();
174
//		lines.clear();
175
//		counts.clear();
176
//		currentpartid = 0;
177
//		nTotalTokens = 0;
178
		// FIXME: tests to not recompute all on fmax, vmax, etc. changes
179
		// It works but the problem is the cut() method that really cut the lines rather than doing getLines() that could filtering and returns only the lines between fmin/fmax
180
//		if(this.hasParameterChanged(TXMPreferences.QUERY) || this.hasParameterChanged(TXMPreferences.UNIT_PROPERTIES))	{
181
		
182
			if (parent instanceof MainCorpus && "[]".equals(pQuery.getQueryString()) && pProperties.size() == 1) {
183
	
184
				computeWithCorpusAndNoQuery(); // internally using a lexicon
185
			}
186
			else {
187
				this.lexicon = null;
188
	
189
				if (parent instanceof CQPCorpus) {
190
	
191
					if (!scanCorpus((CQPCorpus)parent)) {
192
						lines = new ArrayList<Line>();
193
						return false;
194
					}
195
	
196
					setLineCounts();
197
	
198
					getAllLines();
199
	
200
				}
201
				else {
202
					Log.severe("Error: Index parent is not a corpus.");
190 203
					return false;
191 204
				}
192

  
193
				setLineCounts();
194

  
195
				getAllLines();
196

  
197 205
			}
198
			else {
199
				Log.severe("Error: Index parent is not a corpus.");
200
				return false;
201
			}
202
		}
206
	//	}
203 207

  
204 208
		this.filterLines();
205 209

  
......
387 391
	 */
388 392
	private void computeWithCorpusAndNoQuery() {
389 393
		try {
394
			
390 395
			//			this.query = new Query("[]"); //$NON-NLS-1$
391 396
			//			this.props = new ArrayList<Property>();
392 397
			//			this.props.add(property);
393 398
			Property property = pProperties.get(0);
399

  
394 400
			if (lexicon == null) {
395 401
				lexicon = new Lexicon(getCorpus());
396 402
			}
397 403
			lexicon.setProperty(property);
398 404
			lexicon.setDirty();
399 405
			lexicon.compute(monitor);
400
			
401
			
402
			
406
		
407

  
408
		
403 409
			this.nTotalTokens = lexicon.nbrOfToken();
404 410
			String[] forms = lexicon.getForms();
405 411
			int[] freqs = lexicon.getFreq();
406 412
			int[] ids = lexicon.getIds();
407 413
			this.lines = new ArrayList<Line>();
408 414
			int nbOfToken = lexicon.nbrOfToken();
409
			if (nbOfToken > 0) // no lines
415
			if (nbOfToken > 0) { // no lines
410 416
				for (int i = 0; i < forms.length && i < freqs.length; i++) {
411 417
					Line l = new Line();
412 418
					List<String> values = new ArrayList<String>(1);
......
425 431
					if (Fmax < freqs[i]) {
426 432
						Fmax = freqs[i];
427 433
					}
428

  
429
					// getAllLines();
430 434
				}
435
			}
436
			
431 437
		} catch (Exception e) {
432 438
			// TODO Auto-generated catch block
433 439
			org.txm.utils.logger.Log.printStackTrace(e);
tmp/org.txm.tigersearch.rcp/src/org/txm/tigersearch/editors/TSIndexEditor.java (revision 1174)
480 480
//			}
481 481
//		});
482 482

  
483
		final Composite paramArea = getExtendedParametersComposite();
483
		final Composite paramArea = getExtendedParametersGroup();
484 484

  
485 485
		// info&navigation panel
486 486
		final Composite infosArea = getBottomToolbar().installGLComposite("infos", 1, false);
tmp/org.txm.tigersearch.rcp/src/org/txm/tigersearch/editors/TIGERSearchEditor.java (revision 1174)
67 67
	public void _createPartControl() {
68 68

  
69 69
		// System.out.println(parent.getLayout());
70
		Composite queryPanel = this.getExtendedParametersComposite();
70
		Composite queryPanel = this.getExtendedParametersGroup();
71 71
	
72 72
		// fill query Area
73 73
		GridLayout qlayout = new GridLayout(11, false);
tmp/org.txm.internalview.rcp/src/org/txm/internalview/rcp/editors/InternalViewEditor.java (revision 1174)
98 98
		ComputeKeyListener computeKeyListener = new ComputeKeyListener(this);
99 99
		
100 100
		
101
		Composite parametersArea = getExtendedParametersComposite();
101
		Composite parametersArea = getExtendedParametersGroup();
102 102
		parametersArea.setLayout(new GridLayout(5,false));
103 103
		parametersArea.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
104 104
		
tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/editors/SpecificitiesEditor.java (revision 1174)
110 110

  
111 111
			
112 112
			// Extended parameters
113
			Composite extendedParametersArea = this.getExtendedParametersComposite();
113
			Composite extendedParametersArea = this.getExtendedParametersGroup();
114 114
			
115 115
			// max score
116 116
			new Label(extendedParametersArea, SWT.NONE).setText("Maximum score");
tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/editors/SpecificitiesSelectionEditor.java (revision 1174)
53 53
		
54 54
		
55 55
		// Banality
56
        Label label = new Label(this.getExtendedParametersComposite(), SWT.NONE);
56
        Label label = new Label(this.getExtendedParametersGroup(), SWT.NONE);
57 57
        label.setText("Banality:");
58 58
		
59
		banality = new FloatSpinner(this.getExtendedParametersComposite(), SWT.BORDER);
59
		banality = new FloatSpinner(this.getExtendedParametersGroup(), SWT.BORDER);
60 60
		banality.setToolTipText("Banality threshold");
61 61
		banality.setMaximumAsFloat(200);
62 62
		banality.addSelectionListener(computeSelectionListener);
tmp/org.txm.cooccurrence.rcp/src/org/txm/cooccurrence/rcp/editors/CooccurrencesEditor.java (revision 1174)
205 205
		// paramLayoutData.right = new FormAttachment(100);
206 206
		// scrollComposite.setLayoutData(paramLayoutData);
207 207

  
208
		final Composite paramArea = this.getExtendedParametersComposite();
208
		final Composite paramArea = this.getExtendedParametersGroup();
209 209
		FormLayout paramLayout = new FormLayout();
210 210
		paramArea.setLayout(paramLayout);
211 211

  
tmp/org.txm.ca.rcp/src/org/txm/ca/rcp/editors/CAFactorialMapChartEditor.java (revision 1174)
247 247
			
248 248
			
249 249
			// advanced parameters
250
			ThresholdsGroup thresholdsGroup = new ThresholdsGroup(this.getExtendedParametersComposite(), SWT.NONE, this, true, false);
250
			ThresholdsGroup thresholdsGroup = new ThresholdsGroup(this.getExtendedParametersGroup(), SWT.NONE, this, true, false);
251 251
			this.fMinSpinner = thresholdsGroup.getFMinSpinner();
252 252
			this.fMaxSpinner = thresholdsGroup.getFMaxSpinner();
253 253
			this.vMaxSpinner = thresholdsGroup.getVMaxSpinner();
tmp/org.txm.ca.rcp/src/org/txm/ca/rcp/handlers/ComputeCA.java (revision 1174)
99 99
				
100 100
				// FIXME: old version using dialog box for parameters
101 101
				// ask property and Fmins and Vmax
102
				String title = TXMUIMessages.bind(CAUIMessages.ComputeCorrespondanceAnalysisDialog_0, partition.getName());
103
				CAParametersDialog d = new CAParametersDialog(window.getShell(), partition.getParent(), title);
102
//				String title = TXMUIMessages.bind(CAUIMessages.ComputeCorrespondanceAnalysisDialog_0, partition.getName());
103
//				CAParametersDialog d = new CAParametersDialog(window.getShell(), partition.getParent(), title);
104
//
105
//				if (d.open() == MessageDialog.OK) {
106
//					WordProperty property = d.getProperty();
107
//					int fMin = d.getFmin();
108
//					int vMax = d.getMaxLines();
109
//
110
//					Log.info(NLS.bind(CAUIMessages.ComputeCorrespondanceAnalysis_0, partition, property));
111
//
112
//					LexicalTable lexicalTable = new LexicalTable(partition);
113
//					lexicalTable.setParameters(property, fMin, vMax, null);
114
//					ca = new CA(lexicalTable);
115
//				} else { // aborted
116
//					return null;
117
//				}
104 118

  
105
				if (d.open() == MessageDialog.OK) {
106
					WordProperty property = d.getProperty();
107
					int fMin = d.getFmin();
108
					int vMax = d.getMaxLines();
119
				// FIXME: SJ: temporary version before we fix the problems listed below
120
				LexicalTable lexicalTable = new LexicalTable(partition);
121
				lexicalTable.setParameters((WordProperty) partition.getCorpus().getDefaultProperty(), 20, 200, null);
122
				ca = new CA(lexicalTable);
109 123

  
110
					Log.info(NLS.bind(CAUIMessages.ComputeCorrespondanceAnalysis_0, partition, property));
111

  
112
					LexicalTable lexicalTable = new LexicalTable(partition);
113
					lexicalTable.setParameters(property, fMin, vMax, null);
114
					ca = new CA(lexicalTable);
115
				} else { // aborted
116
					return null;
117
				}
118 124
				
119 125
				// FIXME: SJ: new version, creating a, empty LT and an empty CA
120
				// does not work at this time because of some problem in CAEditor (refreshing and component creation + eigenvalues computing)
126
				// does not work at this time because of some problems in CAEditor (refreshing and components creation + eigenvalues computing)
121 127
//				ca = new CA(new LexicalTable(partition));
122 128
			}
123 129
			// Creating from Lexical Table
tmp/org.txm.specificities.core/src/org/txm/specificities/core/statsengine/r/function/SpecificitiesR.java (revision 1174)
71 71
		super(symbol);
72 72
	}
73 73

  
74
	/**
75
	 * 
76
	 * @param lt
77
	 * @throws StatException
78
	 */
74 79
	public SpecificitiesR(ILexicalTable lt) throws StatException {
75 80
		super(prefixR+(specif_counter++));
76 81

  
......
92 97
	 * @throws REXPMismatchException 
93 98
	 * @throws RserveException 
94 99
	 */
95
	public SpecificitiesR(Vector lexicon, Vector subLexicon)
96
			throws StatException, RserveException, REXPMismatchException {
100
	public SpecificitiesR(Vector lexicon, Vector subLexicon) throws StatException, RserveException, REXPMismatchException {
97 101
		super(prefixR+(specif_counter++));
98 102

  
99 103
		RWorkspace rw = RWorkspace.getRWorkspaceInstance();
100 104
		rw.safeEval("library(textometry)");
101
		REXP r = rw.callFunction(
102
				"specificities.lexicon.new", new QuantitativeDataStructure[] { lexicon, subLexicon }, symbol); //$NON-NLS-1$
105
		REXP r = rw.callFunction("specificities.lexicon.new", new QuantitativeDataStructure[] { lexicon, subLexicon }, symbol); //$NON-NLS-1$
103 106
		// double[] res = RWorkspace.toDouble(r);
104 107
		//System.out.println(" build double matrix");
105 108
		specIndex = r.asDoubleMatrix();
......
114 117
	 * @return the double[][]
115 118
	 * @throws StatException the stat exception
116 119
	 */
117
	protected static double[][] compute(String symbol, ILexicalTable table,
118
			String[] typeFocus, String[] partFocus) throws StatException {
120
	protected static double[][] compute(String symbol, ILexicalTable table, String[] typeFocus, String[] partFocus) throws StatException {
119 121

  
120 122
		RWorkspace rw = RWorkspace.getRWorkspaceInstance();
121 123

  

Formats disponibles : Unified diff