Revision 606

tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/editors/SpecificitiesSelectionEditor.java (revision 606)
24 24

  
25 25

  
26 26
	@Override
27
	public void createPartControl(Composite parent) {
28
		super.createPartControl(parent);
27
	public void _createPartControl(Composite parent) {
28
		super._createPartControl(parent);
29 29
		
30 30
		// Group bars by lines
31 31
		final ToolItem groupBarsByLines = new ToolItem(this.getToolBar(), SWT.CHECK);
tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/editors/SpecificitiesEditor.java (revision 606)
87 87
	
88 88
	
89 89
	@Override
90
	public void createPartControl(Composite parent) {
91
		super.createPartControl(parent);
90
	public void _createPartControl(Composite parent) {
91
//		super.createPartControl(parent);
92 92

  
93 93
		// max score parameter
94 94
		Composite parametersArea = this.getCommandParametersGroup();
tmp/org.txm.wordcloud.rcp/src/org/txm/wordcloud/rcp/editors/WordCloudEditor.java (revision 606)
37 37
	
38 38
	
39 39
	@Override
40
	public void createPartControl(Composite parent) {
41
		super.createPartControl(parent);
40
	public void _createPartControl(Composite parent) {
41
//		super.createPartControl(parent);
42 42

  
43 43
		//Composite paramPanel = new Composite(parent, SWT.NONE);
44 44

  
tmp/org.txm.partition.rcp/src/org/txm/partition/rcp/editors/PartitionDimensionsEditor.java (revision 606)
25 25
	
26 26
	
27 27
	@Override
28
	public void createPartControl(Composite parent) {
28
	public void _createPartControl(Composite parent) {
29 29

  
30 30
		this.createComputingParametersArea = false;
31 31
		
32
		super.createPartControl(parent);
32
//		super.createPartControl(parent);
33 33

  
34 34
		// extend the tool bar
35 35
		new ToolItem(this.getToolBar(), SWT.SEPARATOR);
tmp/org.txm.cooccurrence.rcp/src/org/txm/cooccurrence/rcp/editors/CooccurrencesEditor.java (revision 606)
199 199
	 * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
200 200
	 */
201 201
	@Override
202
	public void createPartControl(final Composite parent) {
203
		super.createPartControl(parent);
202
	public void _createPartControl(final Composite parent) {
203
//		super.createPartControl(parent);
204 204
		// FIXME: to do
205 205
		// super.createPartControl(parent);
206 206

  
tmp/org.txm.internalview.core/src/org/txm/functions/internal/InternalView.java (revision 606)
30 30
	protected List<Property> availablesProperties;
31 31
	protected List<StructuralUnit> availableStructs;
32 32
	protected List<StructuralUnitProperty> availableStructuralUnitProperties;
33
	protected Corpus corpus;
34 33
	protected List<Match> matches = new ArrayList<Match>();
35 34
	protected int nmatches = 0;
36 35

  
......
45 44

  
46 45
	public InternalView(Corpus corpus) {
47 46
		super(corpus);
48
		this.corpus = corpus;
49 47
		
50 48
		try {
51 49
			String propNames = this.getStringParameterValue(InternalViewPreferences.PROPERTIES);
......
74 72
		//find struct start-end
75 73
		Query query = new Query("<"+pStructure.getName()+"> [] expand to "+pStructure); //$NON-NLS-1$ //$NON-NLS-2$
76 74
		//System.out.println(query);
77
		QueryResult result = corpus.query(query, "test", false); //$NON-NLS-1$
75
		QueryResult result = getCorpus().query(query, "test", false); //$NON-NLS-1$
78 76
		nmatches = result.getNMatch();
79 77
		if (nmatches > 0) {
80 78
			matches = result.getMatches();
......
87 85

  
88 86
	@Override
89 87
	public boolean canCompute() {
90
		return corpus != null && 
88
		return getCorpus() != null && 
91 89
				pStructure != null && 
92 90
				pProperties != null && 
93 91
				pProperties.size() > 0 && 
......
128 126
	}
129 127

  
130 128
	public Corpus getCorpus() {
131
		return corpus;
129
		return (Corpus)getParent();
132 130
	}
133 131

  
134 132
	public String getCurrentLocation() {
......
148 146
	}
149 147

  
150 148
	public String getDetails() {
151
		return corpus.getName()+" "+pStructure.getName()+" "+(pCurrentPage+1); //$NON-NLS-1$ //$NON-NLS-2$
149
		return getCorpus().getName()+" "+pStructure.getName()+" "+(pCurrentPage+1); //$NON-NLS-1$ //$NON-NLS-2$
152 150
	}
153 151

  
154 152
	public Integer getFirst() throws CqiClientException {
......
170 168
	@Override
171 169
	public String getName() {
172 170
		if (pStructure != null) return pStructure.getName()+" "+pCurrentPage;
173
		return corpus.getName();
171
		return getCorpus().getName();
174 172
	}
175 173

  
176 174
	public Integer getNext() throws CqiClientException {
......
290 288
		
291 289
		String s = this.getStringParameterValue(InternalViewPreferences.STRUCTURALUNIT);
292 290
		if (s != null && s.length() > 0)
293
			this.pStructure = corpus.getStructuralUnit(s);
291
			this.pStructure = getCorpus().getStructuralUnit(s);
294 292
		
295 293
		s = this.getStringParameterValue(InternalViewPreferences.STRUCTURALUNITPROPERTIES);
296
		this.pStructProperties = StructuralUnitProperty.fromStringToList(corpus, s);
294
		this.pStructProperties = StructuralUnitProperty.fromStringToList(getCorpus(), s);
297 295
		
298 296
		s = this.getStringParameterValue(InternalViewPreferences.PROPERTIES);
299
		this.pProperties = WordProperty.fromStringToList(corpus, s);
297
		this.pProperties = WordProperty.fromStringToList(getCorpus(), s);
300 298
		
301 299
		return true;
302 300
	}
tmp/org.txm.ca.rcp/src/org/txm/ca/rcp/editors/CAFactorialMapChartEditor.java (revision 606)
68 68

  
69 69

  
70 70
	@Override
71
	public void createPartControl(Composite parent) {
71
	public void _createPartControl(Composite parent) {
72 72

  
73
		super.createPartControl(parent);
73
//		super.createPartControl(parent);
74 74

  
75 75
		// Extend the chart editor tool bar
76 76
		ToolItem separator = new ToolItem(this.topToolBar, SWT.SEPARATOR);
tmp/org.txm.lexicon.core/src/org/txm/lexicon/core/corpusengine/cqp/Lexicon.java (revision 606)
94 94

  
95 95
	private Corpus corpus;
96 96

  
97
	/**
98
	 * Find or build a lexicon given a Corpus (MainCorpus or SubCorpus).
99
	 * 
100
	 * @param corpus
101
	 * @param property
102
	 * @return a Lexicon. May return null if the lexicon forms or freqs are null.
103
	 * @throws Exception 
104
	 */
105
	public static Lexicon getLexicon(Corpus corpus, Property property) throws Exception {
106
		HashSet<Object> results = corpus.getStoredData(Lexicon.class);
107
		for (Object result : results) {
108
			Lexicon lex = (Lexicon)result;
109
			if (lex.getProperty().equals(property)) {
110
				return lex;
111
			}
112
		}
97
//	/**
98
//	 * Find or build a lexicon given a Corpus (MainCorpus or SubCorpus).
99
//	 * 
100
//	 * @param corpus
101
//	 * @param property
102
//	 * @return a Lexicon. May return null if the lexicon forms or freqs are null.
103
//	 * @throws Exception 
104
//	 */
105
//	public static Lexicon getLexicon(Corpus corpus, Property property) throws Exception {
106
//		HashSet<Object> results = corpus.getStoredData(Lexicon.class);
107
//		for (Object result : results) {
108
//			Lexicon lex = (Lexicon)result;
109
//			if (lex.getProperty().equals(property)) {
110
//				return lex;
111
//			}
112
//		}
113
//
114
//		Lexicon lex = new Lexicon(corpus);
115
//		lex.setParameters(property);
116
//		if (lex.compute(null) && lex.getForms() != null && lex.getFreq() != null) {
117
//			corpus.storeData(lex);
118
//			return lex;
119
//		} else {
120
//			return null;
121
//		}
122
//	}
113 123

  
114
		Lexicon lex = new Lexicon(corpus);
115
		lex.setParameters(property);
116
		if (lex.compute(null) && lex.getForms() != null && lex.getFreq() != null) {
117
			corpus.storeData(lex);
118
			return lex;
119
		} else {
120
			return null;
121
		}
122
	}
123

  
124 124
	public Lexicon(Corpus corpus) {
125 125
		this.corpus = corpus;
126 126
	}
......
573 573
	public boolean validateParameters() {
574 574
		return corpus != null && pProperty != null;
575 575
	}
576

  
577
	public void setProperty(Property property) {
578
		this.pProperty = property;
579
	}
576 580
}
tmp/org.txm.index.rcp/src/org/txm/index/rcp/editors/DictionnaryEditor.java (revision 606)
17 17
	 * @see org.txm.rcp.editors.index.IndexEditor#createPartControl(org.eclipse.swt.widgets.Composite)
18 18
	 */
19 19
	@Override
20
	public void createPartControl(final Composite parent) {
21
		super.createPartControl(parent);
20
	public void _createPartControl(final Composite parent) {
21
		super._createPartControl(parent);
22
		
22 23
		this.propsArea.setMaxPropertyNumber(1);
23 24
		this.queryWidget.setText("[]"); //$NON-NLS-1$
24 25
		this.queryWidget.setEnabled(false);
tmp/org.txm.index.rcp/src/org/txm/index/rcp/editors/IndexEditor.java (revision 606)
272 272
	 * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
273 273
	 */
274 274
	@Override
275
	public void createPartControl(Composite parent) {
276
		super.createPartControl(parent);
275
	public void _createPartControl(Composite parent) {
276
//		super.createPartControl(parent);
277 277

  
278 278
		Composite paramArea = this.getCommandParametersGroup();
279 279
		paramArea.setLayout(new FormLayout());
tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/editors/ChartEditorPart.java (revision 606)
120 120
	
121 121

  
122 122
	@Override
123
	public void createPartControl(Composite parent) {
124
		super.createPartControl(parent);
123
	public void _createPartControl(Composite parent) {
124
//		super.createPartControl(parent);
125 125
		
126 126
		// Toolbar
127 127
		this.chartToolBar = new ChartEditorToolBar(this, SWT.FLAT | SWT.RIGHT);
......
138 138
		// Remove parent composites
139 139
		//TODO MD: hack ?
140 140
		this.displayArea.dispose();
141
		this.bottomToolBar.dispose();
142 141
		
143 142
		// Chart composite
144 143
		this.chartComposite = this.getSWTChartsComponentsProvider().createComposite(this, parent);
......
151 150
		
152 151
		// Re-add the bottom toolbar
153 152
		//TODO MD: hack ?
154
		this.bottomToolBar = new TXMEditorToolBar(this, SWT.FLAT, "bottom");
153
		//this.bottomToolBar = new TXMEditorToolBar(this, SWT.FLAT, "bottom");
155 154
		
156 155
		// FIXME: open dialog box message if the composite doesn't contain any chart (typically when the charts engine doesn't contain chart creator for the specified result data type)
157 156
//		if(composite.getChart() == null)	{
......
439 438
		getSite().getShell().getDisplay().syncExec(new Runnable() {
440 439
			@Override
441 440
			public void run() {
442
				chartComposite.loadChart(getResultData().needsToResetView(), getResultData().needsToClearItemsSelection());
441
				chartComposite.loadChart(
442
						getResultData().needsToResetView(), 
443
						getResultData().needsToClearItemsSelection());
443 444
			}
444 445
		});
445 446
	}
tmp/org.txm.progression.rcp/src/org/txm/progression/rcp/editors/ProgressionEditor.java (revision 606)
33 33
import org.txm.progression.core.functions.Progression;
34 34
import org.txm.progression.core.preferences.ProgressionPreferences;
35 35
import org.txm.progression.rcp.messages.ProgressionUIMessages;
36
import org.txm.rcp.IImageKeys;
36 37
import org.txm.rcp.RCPMessages;
37 38
import org.txm.rcp.StatusLine;
38 39
import org.txm.rcp.swt.widget.AssistedQueryWidget;
......
49 50
 */
50 51
public class ProgressionEditor extends ChartEditorPart<Progression> {
51 52

  
52
	
53

  
53 54
	/** The query widgets. */
54
	protected List<AssistedQueryWidget> queryWidgets = new ArrayList<AssistedQueryWidget>();
55
	
55
	protected List<QueryField> queryWidgets = new ArrayList<QueryField>();
56

  
56 57
	/** The queries. */
57 58
	List<Query> queries;
58
	
59

  
59 60
	/** The corpus. */
60 61
	private Corpus corpus;
61
	
62

  
62 63
	/** The selected structural unit. */
63 64
	private StructuralUnit selectedStructuralUnit;
64
	
65

  
65 66
	/** The selected structural unit property. */
66 67
	private StructuralUnitProperty selectedStructuralUnitProperty;
67
	
68

  
68 69
	/** The regexproperty value. */
69 70
	private String regexPropertyValue;
70
	
71

  
71 72
	/** The graphtype. */
72 73
	private boolean cumulative = true;
73
	
74

  
74 75
	/** The monostyle. */
75 76
	private boolean monostyle = true;
76
	
77

  
77 78
	/** The linewidth. */
78 79
	private int lineWidth = 2;
79
	
80

  
80 81
	/** The structural units combo. */
81 82
	Combo structuralUnitsCombo;
82
	
83

  
83 84
	/** The structural units. */
84 85
	List<StructuralUnit> structuralUnits;
85
	
86

  
86 87
	/** The structural units properties. */
87 88
	List<StructuralUnitProperty> structuralUnitsProperties;
88
	
89

  
89 90
	/** The property combo. */
90 91
	private Combo propertyCombo;
91
	
92

  
92 93
	/** The regex value. */
93 94
	private Text regexValue;
94 95

  
95 96
	/** The focus composite. */
96 97
	Composite queriesFocusComposite;
97
	
98

  
98 99
	/** The main panel. */
99 100
	Composite mainPanel;
100
	
101

  
101 102
	/** The bande field. */
102 103
	Text bandeField;
103
	
104

  
104 105
	/** The cumu button. */
105 106
	Button cumuButton;
106
	
107

  
107 108
	/** The repeat button. */
108 109
	Button repeatButton;
109
	
110

  
110 111
	/** The style button. */
111 112
	Button styleButton;
112
	
113

  
113 114
	/** The colors. */
114 115
	String[] colors = DefaultTheme.colors;
115
	
116

  
116 117
	/** The parent. */
117 118
	private Composite parent;
118 119

  
119 120
	private ScrolledComposite sc1;
120 121

  
121
	
122
	private Button densityButton;
123

  
124

  
122 125
	@Override
123
	public void createPartControl(Composite parent) {
124
		super.createPartControl(parent);
125
		
126
		
126
	public void _createPartControl(Composite parent) {
127
		super._createPartControl(parent);
128

  
129

  
127 130
		// FIXME: tests parameters composite extension
128
//		new ProgressionParametersComposite(this.getCommandParametersGroup(), SWT.NONE);
129
//		this.getCommandParametersGroup().pack();
131
		//		new ProgressionParametersComposite(this.getCommandParametersGroup(), SWT.NONE);
132
		//		this.getCommandParametersGroup().pack();
130 133

  
131 134
		// FIXME: tests to use Fields editor and ScopedPreferenceStore for command parameters
132
//		BooleanFieldEditor field = new BooleanFieldEditor(ChartsEnginePreferences.SHOW_TITLE, "test2 show title store", editor.getParametersComposite());
133
//		field.setPreferenceStore(new TXMPreferenceStore(TXMPreferences.getId(progression)));
134
//		field.load();
135
//		field.store();
136
//		try {
137
//			((ScopedPreferenceStore) field.getPreferenceStore()).save();
138
//		}
139
//		catch(IOException e) {
140
//			// TODO Auto-generated catch block
141
//			e.printStackTrace();
142
//		}
143
		
144
		
135
		//		BooleanFieldEditor field = new BooleanFieldEditor(ChartsEnginePreferences.SHOW_TITLE, "test2 show title store", editor.getParametersComposite());
136
		//		field.setPreferenceStore(new TXMPreferenceStore(TXMPreferences.getId(progression)));
137
		//		field.load();
138
		//		field.store();
139
		//		try {
140
		//			((ScopedPreferenceStore) field.getPreferenceStore()).save();
141
		//		}
142
		//		catch(IOException e) {
143
		//			// TODO Auto-generated catch block
144
		//			e.printStackTrace();
145
		//		}
146

  
147

  
145 148
		// FIXME: to discuss
146
//		// initialize extended menus for item selection
147
//		Menu menu = editor.getComposite().getContextMenu(EventCallBack.AREA_ITEM);
148
//		
149
//		// send to index
150
//		MenuItem sendToIndex = new MenuItem(menu.getItem(0).getMenu(), SWT.CASCADE);
151
//	    sendToIndex.setText(SWTComponentsProviderMessages.SWTChartsComponentProvider_SHARED_SEND_SELECTION_TO_INDEX);
152
//	    sendToIndex.setImage(IImageKeys.getImage(IImageKeys.ACTION_INDEX));
153
//	    sendToIndex.addSelectionListener(new ProgressionSelectionListener(editor, BaseSelectionListener.SEND_TO_INDEX));
154
//
155
//	    // send to concordance
156
//		MenuItem sendToConcordance = new MenuItem(menu.getItem(0).getMenu(), SWT.CASCADE);
157
//	    sendToConcordance.setText(SWTComponentsProviderMessages.SWTChartsComponentProvider_SHARED_SEND_SELECTION_TO_CONCORDANCE);
158
//	    sendToConcordance.setImage(IImageKeys.getImage(IImageKeys.ACTION_CONCORDANCES));
159
//	    sendToConcordance.addSelectionListener(new ProgressionSelectionListener(editor, BaseSelectionListener.SEND_TO_CONCORDANCE));
160
//	    
161
//	    // send to cooccurrence
162
//		MenuItem sendToCoorccurrence = new MenuItem(menu.getItem(0).getMenu(), SWT.CASCADE);
163
//	    sendToCoorccurrence.setText(SWTComponentsProviderMessages.SWTChartsComponentProvider_SHARED_SEND_SELECTION_TO_COOCCURRENCE);
164
//	    sendToCoorccurrence.setImage(IImageKeys.getImage(IImageKeys.ACTION_COOCCURRENCE));
165
//	    sendToCoorccurrence.addSelectionListener(new ProgressionSelectionListener(editor, BaseSelectionListener.SEND_TO_COOCCURRENCE));
166
//	    //*****************************************************
167
	
168
		
149
		//		// initialize extended menus for item selection
150
		//		Menu menu = editor.getComposite().getContextMenu(EventCallBack.AREA_ITEM);
151
		//		
152
		//		// send to index
153
		//		MenuItem sendToIndex = new MenuItem(menu.getItem(0).getMenu(), SWT.CASCADE);
154
		//	    sendToIndex.setText(SWTComponentsProviderMessages.SWTChartsComponentProvider_SHARED_SEND_SELECTION_TO_INDEX);
155
		//	    sendToIndex.setImage(IImageKeys.getImage(IImageKeys.ACTION_INDEX));
156
		//	    sendToIndex.addSelectionListener(new ProgressionSelectionListener(editor, BaseSelectionListener.SEND_TO_INDEX));
157
		//
158
		//	    // send to concordance
159
		//		MenuItem sendToConcordance = new MenuItem(menu.getItem(0).getMenu(), SWT.CASCADE);
160
		//	    sendToConcordance.setText(SWTComponentsProviderMessages.SWTChartsComponentProvider_SHARED_SEND_SELECTION_TO_CONCORDANCE);
161
		//	    sendToConcordance.setImage(IImageKeys.getImage(IImageKeys.ACTION_CONCORDANCES));
162
		//	    sendToConcordance.addSelectionListener(new ProgressionSelectionListener(editor, BaseSelectionListener.SEND_TO_CONCORDANCE));
163
		//	    
164
		//	    // send to cooccurrence
165
		//		MenuItem sendToCoorccurrence = new MenuItem(menu.getItem(0).getMenu(), SWT.CASCADE);
166
		//	    sendToCoorccurrence.setText(SWTComponentsProviderMessages.SWTChartsComponentProvider_SHARED_SEND_SELECTION_TO_COOCCURRENCE);
167
		//	    sendToCoorccurrence.setImage(IImageKeys.getImage(IImageKeys.ACTION_COOCCURRENCE));
168
		//	    sendToCoorccurrence.addSelectionListener(new ProgressionSelectionListener(editor, BaseSelectionListener.SEND_TO_COOCCURRENCE));
169
		//	    //*****************************************************
170

  
171

  
169 172
		try {
170 173

  
171 174
			monostyle = this.getBooleanParameterValue(ProgressionPreferences.CHART_MONO_STYLE);
172 175
			cumulative = this.getBooleanParameterValue(ProgressionPreferences.CHART_CUMULATIVE);
173 176

  
174 177
			// System.out.println(parent.getLayout());
175
			FormLayout mainlayout = new FormLayout();
176 178
			Composite mainPanel = this.getCommandParametersGroup();
177
			mainPanel.setLayout(mainlayout);
178 179
			GridData gridData = new GridData(GridData.FILL, GridData.FILL, true, true);
179 180
			mainPanel.setLayoutData(gridData);
181
			GridLayout glayout = new GridLayout(2, false);
182
			glayout.marginBottom = glayout.marginTop = glayout.marginHeight = glayout.verticalSpacing = 0;
183
			mainPanel.setLayout(glayout);
180 184

  
181 185
			Composite paramPanel = new Composite(mainPanel, SWT.NONE);
186
			glayout = new GridLayout(3, false);
187
			glayout.marginBottom = glayout.marginTop = glayout.marginHeight = glayout.verticalSpacing = 0;
188
			paramPanel.setLayout(glayout);
189
			paramPanel.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false));
182 190

  
183
			FormData paramPanelData = new FormData();
184
			paramPanelData.top = new FormAttachment(0);
185
			paramPanelData.left = new FormAttachment(0);
186
			paramPanelData.right = new FormAttachment(100);
187
			paramPanel.setLayoutData(paramPanelData);
188

  
189

  
190
			paramPanel.setLayout(new GridLayout(3, true));
191
			
192 191
			// controls
193 192
			// graph param
194 193
			Label typeLabel = new Label(paramPanel, SWT.NONE);
......
198 197
			cumuButton = new Button(paramPanel, SWT.RADIO);
199 198
			cumuButton.setText(ProgressionUIMessages.ProgressionDialog_2);
200 199
			cumuButton.setSelection(cumulative);
200
			cumuButton.addSelectionListener(new SelectionListener() {
201
				
202
				@Override
203
				public void widgetSelected(SelectionEvent e) {
204
					bandeField.setEnabled(densityButton.getSelection());
205
				}
206
				
207
				@Override
208
				public void widgetDefaultSelected(SelectionEvent e) { }
209
			});
201 210

  
202
			Button densityButton = new Button(paramPanel, SWT.RADIO);
211
			densityButton = new Button(paramPanel, SWT.RADIO);
203 212
			densityButton.setText(ProgressionUIMessages.ProgressionDialog_3);
204 213
			densityButton.setSelection(!cumulative);
214
			densityButton.addSelectionListener(new SelectionListener() {
215
				
216
				@Override
217
				public void widgetSelected(SelectionEvent e) {
218
					bandeField.setEnabled(densityButton.getSelection());
219
				}
220
				
221
				@Override
222
				public void widgetDefaultSelected(SelectionEvent e) { }
223
			});
205 224

  
206 225
			//Bande size
207 226
			typeLabel = new Label(paramPanel, SWT.NONE);
......
209 228
			typeLabel.setAlignment(SWT.CENTER);
210 229

  
211 230
			bandeField = new Text(paramPanel, SWT.BORDER);
231
			bandeField.setEnabled(densityButton.getSelection());
212 232
			bandeField.setText("" + this.getResultData().getBandeMultiplier()); //$NON-NLS-1$
213 233
			bandeField.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true, 2, 1));
214
			
234

  
215 235
			// Structural units
216
//			Group displayParam = new Group(paramPanel, SWT.BORDER);
217
//			displayParam.setText(ProgressionUIMessages.ProgressionDialog_13);
218
//			displayParam.setLayout(new GridLayout(3, true));
219
//			displayParam.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true, 3, 1));
236
			//			Group displayParam = new Group(paramPanel, SWT.BORDER);
237
			//			displayParam.setText(ProgressionUIMessages.ProgressionDialog_13);
238
			//			displayParam.setLayout(new GridLayout(3, true));
239
			//			displayParam.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true, 3, 1));
220 240

  
221 241
			Label structLabel = new Label(paramPanel, SWT.NONE);
222 242
			structLabel.setText(ProgressionUIMessages.ProgressionDialog_4);
......
235 255
					getSite().getShell().getDisplay().syncExec(new Runnable() {
236 256
						@Override
237 257
						public void run() {
238
							
258

  
239 259
							StructuralUnit su = null;
240 260
							if(structuralUnitsCombo.getSelectionIndex() != 0)	{
241 261
								su = structuralUnits.get(structuralUnitsCombo.getSelectionIndex() - 1);
242 262
							}
243
							
263

  
244 264
							// skip if no change
245 265
							if(su == getResultData().getStructure())	{
246 266
								return;
247 267
							}
248
							
268

  
249 269
							reloadSUProperties();
250 270
							getResultData().setStructuralUnit(su);
251 271
							compute(true);
......
254 274
				}
255 275
			});
256 276

  
257
			
277

  
258 278
			int selectedSUIndex = 0;
259 279
			// get
260 280
			try {
......
271 291
				e.printStackTrace();
272 292
			}
273 293
			structuralUnitsCombo.select(selectedSUIndex);
274
			
294

  
275 295
			// Structural unit properties
276 296
			Label propLabel = new Label(paramPanel, SWT.NONE);
277 297
			propLabel.setText(TXMCoreMessages.PROPERTY_1);
......
280 300
			propertyCombo = new Combo(paramPanel, SWT.READ_ONLY);
281 301
			propertyCombo.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true, 2, 1));
282 302
			reloadSUProperties();
283
			
303

  
284 304
			propertyCombo.addSelectionListener(new SelectionListener() {
285 305
				@Override
286 306
				public void widgetDefaultSelected(SelectionEvent e) {
......
296 316
					compute(true);
297 317
				}
298 318
			});
299
			
300
			
301
			
319

  
320

  
321

  
302 322
			// property value field
303 323
			Label regexLabel = new Label(paramPanel, SWT.NONE);
304 324
			regexLabel.setText(ProgressionUIMessages.ProgressionDialog_7);
......
309 329
			if(this.getResultData().getPropertyRegex() != null)	{
310 330
				regexValue.setText(getResultData().getPropertyRegex());
311 331
			}
312
			
332

  
313 333
			//spacer
314 334
			styleButton = new Button(paramPanel, SWT.CHECK);
315 335
			styleButton.setText(ProgressionUIMessages.ProgressionDialog_14);
......
320 340
			repeatButton.setText(ProgressionUIMessages.ProgressionDialog_15);
321 341
			repeatButton.setSelection(this.getResultData().isRepeatingValues());
322 342
			repeatButton.addSelectionListener(new SelectionListener() {
323
				
343

  
324 344
				@Override
325 345
				public void widgetSelected(SelectionEvent e) {
326 346
					//getResultData().setRepeatValues(repeatButton.getSelection());
327 347
					compute(true);
328 348
				}
329
				
349

  
330 350
				@Override
331 351
				public void widgetDefaultSelected(SelectionEvent e) {
332 352
					// TODO Auto-generated method stub
333
					
353

  
334 354
				}
335 355
			});
336
			
337
			
356

  
357

  
338 358
			// Queries
339 359
			sc1 = new ScrolledComposite(mainPanel, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
340
			sc1.setLayout(new GridLayout(1, true));
360
			glayout = new GridLayout(1, true);
361
			glayout.marginBottom = glayout.marginTop = glayout.marginHeight = glayout.verticalSpacing = 0;
362
			sc1.setLayout(glayout);
341 363
			sc1.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));
342 364
			sc1.setExpandHorizontal(true);
343 365
			sc1.setExpandVertical(true);
344 366
			sc1.setMinSize(0, 120);
345
			
346
			FormData queriesPanelData = new FormData();
347
			queriesPanelData.top = new FormAttachment(paramPanel);
348
			queriesPanelData.left = new FormAttachment(0);
349
			queriesPanelData.right = new FormAttachment(100);
350
			queriesPanelData.bottom = new FormAttachment(100);
351
			sc1.setLayoutData(queriesPanelData);
352 367

  
353 368
			queriesFocusComposite = new Composite(sc1, SWT.NONE);
354
			queriesFocusComposite.setLayout(new GridLayout(1, true));
369
			glayout = new GridLayout(1, true);
370
			glayout.marginBottom = glayout.marginTop = glayout.marginHeight = glayout.verticalSpacing = 0;
371
			queriesFocusComposite.setLayout(glayout);
355 372
			sc1.setContent(queriesFocusComposite);
356
			
373

  
357 374
			// queries parameters
358
			Label focusLabel = new Label(queriesFocusComposite, SWT.NONE);
359
			focusLabel.setText(ProgressionUIMessages.ProgressionDialog_8);
360
			focusLabel.setAlignment(SWT.CENTER);
375
//			Label focusLabel = new Label(queriesFocusComposite, SWT.NONE);
376
//			focusLabel.setText(ProgressionUIMessages.ProgressionDialog_8);
377
//			focusLabel.setAlignment(SWT.CENTER);
361 378

  
362 379
			// add query button
363 380
			Button plusButton = new Button(queriesFocusComposite, SWT.NONE);
364
			plusButton.setLayoutData(new GridData(GridData.FILL, GridData.FILL,
365
					true, true));
381
			plusButton.setLayoutData(new GridData(GridData.FILL, GridData.CENTER,
382
					true, false));
366 383
			plusButton.setText(ProgressionUIMessages.ProgressionDialog_9);
367
			
384

  
368 385
			plusButton.addListener(SWT.Selection, new Listener() {
369 386
				@Override
370 387
				public void handleEvent(Event event) {
......
378 395
				}
379 396
			});
380 397

  
398
			// fill fields from result data
399
			queries = this.getResultData().getQueries();
400
			if (queries == null) {
401
				addFocusQueryField();
402
			}
403
			else {
404
				for (Query q : queries) {
405
					addFocusQueryField().setQuery(q.getQueryString());
406
				}
407
			}
408

  
409

  
410
		} catch (Exception e) {
411
			Log.printStackTrace(e);
412
		}
413

  
414

  
415
	}
416

  
417
	public class QueryField extends Composite {
418

  
419
		protected AssistedQueryWidget focusTextBox;
420
		
421
		public QueryField(Composite parent, int style) {
422
			super(parent, style);
423

  
424
			GridLayout glayout = new GridLayout(2, false);
425
			glayout.marginBottom = glayout.marginTop = glayout.marginHeight = glayout.verticalSpacing = 0;
426
			
427
			this.setLayout(glayout);
428
			
429
			queryWidgets.add(this);
430
			
431
			focusTextBox = new AssistedQueryWidget(this, SWT.BORDER, getResultData().getCorpus());
432
			focusTextBox.setFocus();
433
			focusTextBox.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
434

  
435
			focusTextBox.addKeyListener(new KeyListener() {
436
				@Override
437
				public void keyPressed(KeyEvent e) {
438
					// System.out.println("key pressed : "+e.keyCode);
439
					if (e.keyCode == SWT.CR || e.keyCode == SWT.KEYPAD_CR) {
440
						updateResultFromEditor();
441
						compute(false);
442
					}
443
				}
444

  
445
				@Override
446
				public void keyReleased(KeyEvent e) {
447
				}
448
			});
449

  
381 450
			// delete query button
382
			Button minusButton = new Button(queriesFocusComposite, SWT.NONE);
383
			minusButton.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));
384
			minusButton.setText(ProgressionUIMessages.ProgressionDialog_5);
451
			Button minusButton = new Button(this, SWT.NONE);
452
			minusButton.setLayoutData(new GridData(GridData.CENTER, GridData.CENTER, false, false));
453
			minusButton.setImage(IImageKeys.getImage(IImageKeys.ACTION_DELETE));
385 454
			minusButton.addListener(SWT.Selection, new Listener() {
386 455
				@Override
387 456
				public void handleEvent(Event event) {
388 457
					if (queryWidgets.size() > 0) {
389 458
						// System.out.println("remove field");
390
						AssistedQueryWidget lastwidget = queryWidgets.get(queryWidgets.size() - 1);
459
						QueryField lastwidget = QueryField.this;
391 460
						lastwidget.setSize(200, 30);
392
						queryWidgets.remove(queryWidgets.size() - 1);
461
						queryWidgets.remove(QueryField.this);
393 462
						lastwidget.dispose();
394 463
						sc1.layout(true);
395 464
						queriesFocusComposite.layout(true);
......
397 466
					}
398 467
				}
399 468
			});
469
		}
400 470

  
401
			// fill fields from result data
402
			queries = this.getResultData().getQueries();
403
			if (queries == null) {
404
				addFocusQueryField();
405
			}
406
			else {
407
				for (Query q : queries) {
408
					addFocusQueryField().setText(q.getQueryString());
409
				}
410
			}
411
			
412
			
413
		} catch (Exception e) {
414
			Log.printStackTrace(e);
471
		public void setQuery(String query) {
472

  
415 473
		}
416 474
		
417
		
475
		public Query getQuery() {
476
			return focusTextBox.getQuery();
477
		}
478

  
479
		public void memorize() {
480
			focusTextBox.memorize();
481
		}
418 482
	}
419
	
483

  
420 484
	/**
421 485
	 * Reloads the properties of the current selected structural unit.
422 486
	 */
423 487
	// FIXME: mutualize this method, its used for some other editors
424 488
	private void reloadSUProperties() {
425
		
489

  
426 490
		propertyCombo.removeAll();
427 491
		propertyCombo.add("    "); //$NON-NLS-1$
428 492

  
429 493
		int selectedSUPIndex = 0;
430
		
494

  
431 495
		if (structuralUnitsCombo.getSelectionIndex() > 0) {
432 496
			selectedStructuralUnit = structuralUnits.get(structuralUnitsCombo.getSelectionIndex() - 1);
433 497
			structuralUnitsProperties = selectedStructuralUnit.getOrderedProperties();
434
			
498

  
435 499
			for(int i = 0; i < structuralUnitsProperties.size(); i++) {
436 500
				propertyCombo.add(structuralUnitsProperties.get(i).getName());
437 501
				if(getResultData().getProperty() == structuralUnitsProperties.get(i))	{
......
443 507
			propertyCombo.select(selectedSUPIndex);
444 508
		}
445 509
	}
446
	
510

  
447 511
	/**
448 512
	 * Adds a query field.
449 513
	 *
450 514
	 * @return the assisted query widget
451 515
	 */
452
	private AssistedQueryWidget addFocusQueryField(String text) {
453
		AssistedQueryWidget focusTextBox = new AssistedQueryWidget(queriesFocusComposite, SWT.BORDER, this.getResultData().getCorpus());
516
	private QueryField addFocusQueryField(String text) {
517
		QueryField queryField = new QueryField(queriesFocusComposite, SWT.NONE);
454 518
		GridData gridData = new GridData(GridData.FILL, GridData.FILL, true, false);
455
		focusTextBox.setLayoutData(gridData);
456
		focusTextBox.setFocus();
457
		queryWidgets.add(focusTextBox);
458
		
459
		focusTextBox.addKeyListener(new KeyListener() {
460
			@Override
461
			public void keyPressed(KeyEvent e) {
462
				// System.out.println("key pressed : "+e.keyCode);
463
				if (e.keyCode == SWT.CR || e.keyCode == SWT.KEYPAD_CR) {
464
					updateResultFromEditor();
465
					compute(false);
466
				}
467
			}
519
		queryField.setLayoutData(gridData);
468 520

  
469
			@Override
470
			public void keyReleased(KeyEvent e) {
471
			}
472
		});
473

  
474
		
475
		return focusTextBox;
521
		return queryField;
476 522
	}
477 523

  
478 524
	/**
479 525
	 * Adds an empty query field.
480 526
	 * @return
481 527
	 */
482
	private AssistedQueryWidget addFocusQueryField() {
528
	private QueryField addFocusQueryField() {
483 529
		return this.addFocusQueryField("");
484 530
	}
485 531

  
486
	
487
	
532

  
533

  
488 534
	@Override
489 535
	public void updateResultFromEditor() {
490
		
536

  
491 537
		Display.getDefault().syncExec(new Runnable() {
492 538
			@Override
493 539
			public void run() {
494 540

  
495 541
				queries = new ArrayList<Query>();
496
				for (AssistedQueryWidget wid : queryWidgets) {
497
					if (!wid.getQueryString().equals("\"\"")) { //$NON-NLS-1$
498
						queries.add(new Query(wid.getQueryString()));
542
				for (QueryField wid : queryWidgets) {
543
					if (!wid.getQuery().isEmpty()) { //$NON-NLS-1$
544
						queries.add(wid.getQuery());
499 545
						wid.memorize();
500 546
					}
501 547
				}
......
547 593
		});
548 594

  
549 595
	}
550
	
596

  
551 597
}
tmp/org.txm.progression.rcp/src/org/txm/progression/rcp/messages/messages_ru.properties (revision 606)
1 1

  
2
ProgressionDialog_0  = Параметры прогрессии 
3
ProgressionDialog_1  = Тип графа: 
4
ProgressionDialog_10 = Прогрессия: некорректное регулярное выражение: 
5
ProgressionDialog_11 = Масштаб полос
6
ProgressionDialog_13 = Опции вида
7
ProgressionDialog_14 = Различные стили строк
8
ProgressionDialog_15 = Повторять идентичные значения
9
ProgressionDialog_16 = Ч/Б
10
ProgressionDialog_17 = Ошибка: мультипликатор полосы: 
11
ProgressionDialog_2  = кумулятивный
12
ProgressionDialog_3  = плотность
13
ProgressionDialog_4  = Структурная единица: 
14
ProgressionDialog_5  = удалить
15
ProgressionDialog_7  = Рег. Выр.: 
16
ProgressionDialog_8  = Запросы: 
17
ProgressionDialog_9  = добавить
2
ProgressionDialog_0 = \u041F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B \u043F\u0440\u043E\u0433\u0440\u0435\u0441\u0441\u0438\u0438 
18 3

  
19
ProgressionPreferencePage_3 = Кумулятивный граф прогрессии
20
ProgressionPreferencePage_5 = Линии в одном стиле
21
ProgressionPreferencePage_6 = Повторять значения с свойств структур
22
ProgressionPreferencePage_7 = Масштаб границ структур
4
ProgressionDialog_1 = \u0422\u0438\u043F \u0433\u0440\u0430\u0444\u0430: 
5

  
6
ProgressionDialog_10 = \u041F\u0440\u043E\u0433\u0440\u0435\u0441\u0441\u0438\u044F: \u043D\u0435\u043A\u043E\u0440\u0440\u0435\u043A\u0442\u043D\u043E\u0435 \u0440\u0435\u0433\u0443\u043B\u044F\u0440\u043D\u043E\u0435 \u0432\u044B\u0440\u0430\u0436\u0435\u043D\u0438\u0435: 
7

  
8
ProgressionDialog_11 = \u041C\u0430\u0441\u0448\u0442\u0430\u0431 \u043F\u043E\u043B\u043E\u0441
9

  
10
ProgressionDialog_13 = \u041E\u043F\u0446\u0438\u0438 \u0432\u0438\u0434\u0430
11

  
12
ProgressionDialog_14 = \u0420\u0430\u0437\u043B\u0438\u0447\u043D\u044B\u0435 \u0441\u0442\u0438\u043B\u0438 \u0441\u0442\u0440\u043E\u043A
13

  
14
ProgressionDialog_15 = \u041F\u043E\u0432\u0442\u043E\u0440\u044F\u0442\u044C \u0438\u0434\u0435\u043D\u0442\u0438\u0447\u043D\u044B\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F
15

  
16
ProgressionDialog_16 = \u0427/\u0411
17

  
18
ProgressionDialog_17 = \u041E\u0448\u0438\u0431\u043A\u0430: \u043C\u0443\u043B\u044C\u0442\u0438\u043F\u043B\u0438\u043A\u0430\u0442\u043E\u0440 \u043F\u043E\u043B\u043E\u0441\u044B: 
19

  
20
ProgressionDialog_2 = \u043A\u0443\u043C\u0443\u043B\u044F\u0442\u0438\u0432\u043D\u044B\u0439
21

  
22
ProgressionDialog_3 = \u043F\u043B\u043E\u0442\u043D\u043E\u0441\u0442\u044C
23

  
24
ProgressionDialog_4 = \u0421\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u043D\u0430\u044F \u0435\u0434\u0438\u043D\u0438\u0446\u0430: 
25

  
26
ProgressionDialog_5 = \u0443\u0434\u0430\u043B\u0438\u0442\u044C
27

  
28
ProgressionDialog_7 = \u0420\u0435\u0433. \u0412\u044B\u0440.: 
29

  
30
ProgressionDialog_8 = \u0417\u0430\u043F\u0440\u043E\u0441\u044B: 
31

  
32
ProgressionDialog_9 = \u0434\u043E\u0431\u0430\u0432\u0438\u0442\u044C query
33

  
34
ProgressionPreferencePage_3 = \u041A\u0443\u043C\u0443\u043B\u044F\u0442\u0438\u0432\u043D\u044B\u0439 \u0433\u0440\u0430\u0444 \u043F\u0440\u043E\u0433\u0440\u0435\u0441\u0441\u0438\u0438
35

  
36
ProgressionPreferencePage_5 = \u041B\u0438\u043D\u0438\u0438 \u0432 \u043E\u0434\u043D\u043E\u043C \u0441\u0442\u0438\u043B\u0435
37

  
38
ProgressionPreferencePage_6 = \u041F\u043E\u0432\u0442\u043E\u0440\u044F\u0442\u044C \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F \u0441 \u0441\u0432\u043E\u0439\u0441\u0442\u0432 \u0441\u0442\u0440\u0443\u043A\u0442\u0443\u0440
39

  
40
ProgressionPreferencePage_7 = \u041C\u0430\u0441\u0448\u0442\u0430\u0431 \u0433\u0440\u0430\u043D\u0438\u0446 \u0441\u0442\u0440\u0443\u043A\u0442\u0443\u0440
tmp/org.txm.progression.rcp/src/org/txm/progression/rcp/messages/messages_fr.properties (revision 606)
14 14
ProgressionDialog_5  = supprimer
15 15
ProgressionDialog_7  = Exp. Rég. : 
16 16
ProgressionDialog_8  = Requêtes : 
17
ProgressionDialog_9  = ajouter
17
ProgressionDialog_9  = ajouter une requête
18 18

  
19 19
ProgressionPreferencePage_3 = Graphe de progression cumulatif
20 20
ProgressionPreferencePage_5 = Style de ligne unique
tmp/org.txm.progression.rcp/src/org/txm/progression/rcp/messages/messages.properties (revision 606)
1 1

  
2
ProgressionDialog_0  = Progression Parameters
3
ProgressionDialog_1  = Graph type:
2
ProgressionDialog_0 = Progression Parameters
3

  
4
ProgressionDialog_1 = Graph type:
5

  
4 6
ProgressionDialog_10 = Progression dialog: wrong regular expression:
7

  
5 8
ProgressionDialog_11 = Bandewidth multiplier:
9

  
6 10
ProgressionDialog_13 = Display options
11

  
7 12
ProgressionDialog_14 = Single line style
13

  
8 14
ProgressionDialog_15 = Repeat same values
15

  
9 16
ProgressionDialog_16 = Monochrome
17

  
10 18
ProgressionDialog_17 = Strip multiplier error:
11
ProgressionDialog_2  = cumulative
12
ProgressionDialog_3  = density
13
ProgressionDialog_4  = Structural Unit:
14
ProgressionDialog_5  = delete
15
ProgressionDialog_7  = Regex:
16
ProgressionDialog_8  = Queries:
17
ProgressionDialog_9  = add
18 19

  
20
ProgressionDialog_2 = cumulative
21

  
22
ProgressionDialog_3 = density
23

  
24
ProgressionDialog_4 = Structural Unit:
25

  
26
ProgressionDialog_5 = delete
27

  
28
ProgressionDialog_7 = Regex:
29

  
30
ProgressionDialog_8 = Queries:
31

  
32
ProgressionDialog_9 = add a query
33

  
19 34
ProgressionPreferencePage_3 = Default graph type is cumulative
35

  
20 36
ProgressionPreferencePage_5 = Single line style
37

  
21 38
ProgressionPreferencePage_6 = Repeat the values of the structure properties
39

  
22 40
ProgressionPreferencePage_7 = Bande size multiplier
tmp/org.txm.progression.core/src/org/txm/progression/core/functions/Progression.java (revision 606)
198 198
	
199 199
	@Override
200 200
	public boolean canCompute() {
201
		// FIXME: not yet implemented
202
		System.err.println("Progression.canCompute(): partially implemented."); //$NON-NLS-1$
203 201
		
204 202
		if(this.corpus == null)	{
205 203
			System.err.println("Progression.canCompute(): can not compute with no corpus."); //$NON-NLS-1$
206 204
			return false;
207 205
		}
208 206

  
209
		if(this.queries == null)	{
207
		if (this.queries == null || this.queries.size() == 0)	{
210 208
			System.err.println("Progression.canCompute(): can not compute with no query."); //$NON-NLS-1$
211 209
			return false;
212 210
		}
tmp/org.txm.concordance.rcp/src/org/txm/concordance/rcp/editors/ConcordanceEditor.java (revision 606)
146 146
 * 
147 147
 * @author mdecorde.
148 148
 */
149
public class ConcordanceEditor extends TXMEditorPart {
149
public class ConcordanceEditor extends TXMEditorPart<Concordance> {
150 150

  
151 151
	public static final String ID = ConcordanceEditor.class.getName();
152 152

  
......
375 375
	 * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
376 376
	 */
377 377
	@Override
378
	public void createPartControl(Composite parent) {
379
		super.createPartControl(parent); // create the top toolbar, display area and bottom toolbar
378
	public void _createPartControl(Composite parent) {
379
//		super.createPartControl(parent); // create the top toolbar, display area and bottom toolbar
380 380

  
381 381
		Composite controlArea = getCommandParametersGroup();
382 382

  
tmp/org.txm.referencer.rcp/src/org/txm/rcp/editors/referencer/ReferencerEditor.java (revision 606)
239 239
	 * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
240 240
	 */
241 241
	@Override
242
	public void createPartControl(Composite parent) {
243
		super.createPartControl(parent);
242
	public void _createPartControl(Composite parent) {
243
//		super.createPartControl(parent);
244 244
		
245 245
		parent.setLayout(new GridLayout(1,true));
246 246
		Composite paramArea = getCommandParametersGroup();
tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/ReferencePattern.java (revision 606)
176 176
		
177 177
		String title = ""; //$NON-NLS-1$
178 178
		for (Property p : this.properties) {
179
			if (p == null) continue;
179 180
			if (p instanceof StructuralUnitProperty)
180 181
			{
181 182
				StructuralUnitProperty sp = (StructuralUnitProperty)p;
tmp/org.txm.cah.rcp/src/org/txm/cah/rcp/editors/AHCChartEditor.java (revision 606)
42 42

  
43 43

  
44 44
	@Override
45
	public void createPartControl(Composite parent) {
45
	public void _createPartControl(Composite parent) {
46 46

  
47
		super.createPartControl(parent);
47
		super._createPartControl(parent);
48 48

  
49 49
		// Extend the chart editor tool bar
50 50
		ToolItem separator = new ToolItem(this.topToolBar, SWT.SEPARATOR);
tmp/org.txm.lexicaltable.core/src/org/txm/lexicaltable/core/functions/LexicalTableFactory.java (revision 606)
32 32
		List<Lexicon> lexicons = new ArrayList<Lexicon>();
33 33
		// Set<String> allLexiconEntry = new HashSet<String>();
34 34
		for (int i = 0; i < partition.getNPart(); i++) {
35
			Lexicon l = Lexicon.getLexicon(partition.getParts().get(i), analysisProperty);
35
			Lexicon l = new Lexicon(partition.getParts().get(i));
36
			l.setProperty(analysisProperty);
37
			l.compute(null);
36 38
			lexicons.add(l);
37 39
		}
38 40
		//System.out.println("time lexicon build "+(System.currentTimeMillis()-time));
39 41
		//time = System.currentTimeMillis();
40 42
		// String[] entries = allLexiconEntry.toArray(new String[]{});
41 43
		Corpus c = partition.getCorpus();
42
		Lexicon ll = Lexicon.getLexicon(c, analysisProperty);
44
		Lexicon ll = new Lexicon(c);
45
		ll.setProperty(analysisProperty);
46
		ll.compute(null);
43 47

  
44 48
		ArrayList<String> filteredForms = new ArrayList<String>();
45 49
		//create a copy and filter line with Fmin;
tmp/org.txm.lexicaltable.core/src/org/txm/lexicaltable/core/functions/LexicalTable.java (revision 606)
197 197
		List<Lexicon> lexicons = new ArrayList<Lexicon>();
198 198
		// Set<String> allLexiconEntry = new HashSet<String>();
199 199
		for (int i = 0; i < partition.getNPart(); i++) {
200
			Lexicon l = Lexicon.getLexicon(partition.getParts().get(i), this.pProperty);
200
			Lexicon l = new Lexicon(partition.getParts().get(i));
201
			l.setProperty(this.pProperty);
202
			l.compute(null);
201 203
			lexicons.add(l);
202 204
		}
203 205
		//System.out.println("time lexicon build "+(System.currentTimeMillis()-time));
204 206
		//time = System.currentTimeMillis();
205 207
		// String[] entries = allLexiconEntry.toArray(new String[]{});
206
		Lexicon ll = Lexicon.getLexicon(partition.getCorpus(), this.pProperty);
208
		Lexicon ll = new Lexicon(partition.getCorpus());
209
		ll.setProperty(this.pProperty);
210
		ll.compute(null);
207 211

  
208 212
		ArrayList<String> filteredForms = new ArrayList<String>();
209 213
		//create a copy and filter line with Fmin;
......
354 358
			
355 359
			Subcorpus subcorpus = (Subcorpus) this.parent;
356 360
			Corpus parentCorpus = subcorpus.getMotherCorpus();
357
			this.statsData = new LexicalTableImpl(getNextName(), new Lexicon(parentCorpus), new Lexicon(subcorpus));
361
			Lexicon l1 = new Lexicon(parentCorpus);
362
			l1.setProperty(pProperty);
363
			l1.compute(null);
364
			Lexicon l2 = new Lexicon(subcorpus);
365
			l2.setProperty(pProperty);
366
			l2.compute(null);
367
			this.statsData = new LexicalTableImpl(getNextName(), l1, l2);
358 368
		}
359 369
		else if (this.parent instanceof Partition) {
360 370
			
tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages_ru.properties (revision 606)
758 758
ProgressionDialog_5  = удалить
759 759
ProgressionDialog_7  = Рег. Выр.: 
760 760
ProgressionDialog_8  = Запросы: 
761
ProgressionDialog_9  = добавить
761
ProgressionDialog_9  = добавить query
762 762

  
763 763
ProgressionEditorInput_0 = PROGRESSION NAME
764 764

  
tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages_fr.properties (revision 606)
745 745
ProgressionDialog_5  = supprimer
746 746
ProgressionDialog_7  = Exp. Rég. : 
747 747
ProgressionDialog_8  = Requêtes : 
748
ProgressionDialog_9  = ajouter
748
ProgressionDialog_9  = ajouter une requête
749 749

  
750 750
ProgressionEditorInput_0 = PROGRESSION NAME
751 751

  
tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/SVGGraphicEditor.java (revision 606)
147 147
	 * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
148 148
	 */
149 149
	@Override
150
	public void createPartControl(Composite parent) {
150
	public void _createPartControl(Composite parent) {
151 151
		this.parent = parent;
152 152

  
153 153
		svgComp = new SVGComposite(parent, SWT.EMBEDDED | SWT.NO_BACKGROUND);
tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditorPart.java (revision 606)
59 59
	 * The editor main tool bar, positioned at the top of the editor.
60 60
	 */
61 61
	protected TXMEditorToolBar topToolBar;
62
	
62

  
63 63
	protected Composite displayArea;
64
	
64

  
65 65
	/**
66 66
	 * The editor bottom tool bar, positioned at the bottom of the editor.
67 67
	 */
68 68
	protected TXMEditorToolBar bottomToolBar;
69
	
69

  
70 70
	/**
71 71
	 * the parameters groups are added to this composite
72 72
	 */
73 73
	private Composite parametersGroupsComposite;
74
	
74

  
75 75
	/**
76 76
	 * The command parameters composite that can be hidden. To add main parameters.
77 77
	 */
......
80 80
	Composite parent;
81 81

  
82 82
	private Composite topToolBarContainer;
83
	
83

  
84 84
	/**
85 85
	 * State value to create or not the computing parameters area and tool bar button.
86 86
	 */
......
89 89
	 * contains the bottom toolbars
90 90
	 */
91 91
	protected Composite bottomToolBarContainer;
92
	
93
	
92

  
93

  
94 94
	@Override
95 95
	public void init(IEditorSite site, IEditorInput input) throws PartInitException {
96 96
		this.setSite(site);
......
100 100
		// so it seems better to use Adapters if it's possible
101 101
		this.setPartName(input.getName());
102 102
	}
103
	
103

  
104 104
	/**
105 105
	 * Creates the default toolbar (empty) and default result area (empty).
106 106
	 * 
107 107
	 */
108 108
	@Override
109
	public void createPartControl(Composite parent) {
110
		
109
	public final void createPartControl(Composite parent) {
110

  
111 111
		try {
112 112
			this.parent = parent;
113
			
113

  
114 114
			// to hide and display the command parameters composite
115 115
			this.initParentLayout(parent, 1);
116 116

  
......
120 120
			RowLayout rl = new RowLayout(SWT.HORIZONTAL);
121 121
			rl.marginTop = rl.marginHeight = rl.marginWidth = rl.marginBottom = 0;
122 122
			this.topToolBarContainer.setLayout(rl);
123
			
123

  
124 124
			this.topToolBar = new TXMEditorToolBar(this, SWT.FLAT | SWT.RIGHT, "top");
125
			
125

  
126

  
126 127
			this.parametersGroupsComposite = new Composite(parent, SWT.NONE);
127 128
			GridLayout gl = new GridLayout(1, true);
128 129
			gl.marginBottom = gl.marginHeight = gl.marginWidth = gl.marginTop = 0;
......
140 141
				}
141 142
				this.computingParametersGroup = this.topToolBar.installGroup("Computing parameters", "Show/Hide command parameters", "icons/show_computing_parameters.png", showComputingParameters);
142 143
			}
143
			
144

  
144 145
			// display main area
145 146
			this.displayArea = new Composite(parent, SWT.NONE);
146 147
			this.displayArea.setLayoutData(new GridData(GridData.FILL_BOTH));
147
			
148

  
148 149
			// create the top tool bar
149 150
			this.bottomToolBarContainer = new Composite(parent, SWT.NONE);
150 151
			this.bottomToolBarContainer.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
151 152
			rl = new RowLayout(SWT.HORIZONTAL);
152 153
			rl.marginTop = rl.marginHeight = rl.marginWidth = rl.marginBottom = 0;
153 154
			this.bottomToolBarContainer.setLayout(rl);
154
			
155

  
155 156
			// bottom tool bar
156 157
			this.bottomToolBar = new TXMEditorToolBar(this, SWT.FLAT, "bottom");
158
			
159
			this._createPartControl(parent); // child editor create its parameters and display widgets
160

  
161
			if (!getResultData().isDirty()) {
162
				topToolBar.setComputingParametersVisible(false);
163
			}
164
			
165
			// remove empty toolbars
166
			if (bottomToolBar.getChildren().length > 0) {
167
				bottomToolBar.dispose();
168
			}
157 169
		}
158 170
		catch(Exception e) {
159 171
			System.err.println("TXMEditorPart.createPartControl(): can not create the editor.");
160 172
			e.printStackTrace();
161 173
		}
162 174
	}
163
	
175

  
176
	public abstract void _createPartControl(Composite parent);
177

  
164 178
	public Composite getTopToolBarContainer() {
165 179
		return topToolBarContainer;
166 180
	}
167
	
181

  
168 182
	public Composite getBottomToolBarContainer() {
169 183
		return bottomToolBarContainer;
170 184
	}
171
	
185

  
172 186
	public TXMEditorToolBar getTopToolbar() {
173 187
		return topToolBar;
174 188
	}
......
206 220
	public Composite getCommandParametersGroup() {
207 221
		return this.computingParametersGroup;
208 222
	}
209
	
223

  
210 224
	@Override
211 225
	public void doSave(IProgressMonitor monitor) {
212
//		if (!getResultData().saveParameters()) { // ?
213
//			
214
//		}
226
		//		if (!getResultData().saveParameters()) { // ?
227
		//			
228
		//		}
215 229
	}
216 230

  
217 231
	@Override
......
225 239
			// if the result has never been computed, the editor is not dirty ->  no * shown
226 240
			return this.getResultData().isDirty() && this.getResultData().getHasBeenComputedOnce();
227 241
		}
228
		
242

  
229 243
		return false;
230 244
	}
231 245

  
......
239 253
	public void setFocus() {
240 254
		// TODO Auto-generated method stub
241 255
	}
242
	
256

  
243 257
	@Override
244 258
	public TXMResultEditorInput<T> getEditorInput() {
245
        return (TXMResultEditorInput) super.getEditorInput();
246
    }
247
	
259
		return (TXMResultEditorInput) super.getEditorInput();
260
	}
261

  
248 262
	/**
249 263
	 * Returns the result object associated with the editor through its editor input.
250 264
	 * @return
......
280 294
		return this.getEditorInput().getResult().getDoubleParameterValue(key);
281 295
	}
282 296

  
283
	
297

  
284 298
	/**
285 299
	 * Gets the value of the specified key in parameters, local result node or default preferences nodes.
286 300
	 * @param key
......
298 312
	public long getLongParameterValue(String key)	{
299 313
		return this.getEditorInput().getResult().getLongParameterValue(key);
300 314
	}
301
	
315

  
302 316
	/**
303 317
	 * Gets the value of the specified key in parameters, local result node or default preferences nodes.
304 318
	 * @param key
......
308 322
		return this.getEditorInput().getResult().getStringParameterValue(key);
309 323
	}
310 324

  
311
//// TODO commented for now ?	
312
//	/**
313
//	 * Computes the result stored in the specified editor input and opens an editor specified by its id.
314
//	 * @param editorInput
315
//	 * @param editorPartId
316
//	 * @return
317
//	 */
318
//	public static void openEditor(TXMResultEditorInput editorInput, String editorPartId)	{
319
//		compute(editorInput, editorPartId, false, null);
320
//	}
321
	
325
	//// TODO commented for now ?	
326
	//	/**
327
	//	 * Computes the result stored in the specified editor input and opens an editor specified by its id.
328
	//	 * @param editorInput
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff