Révision 3635

TXM/trunk/org.txm.analec.rcp/META-INF/MANIFEST.MF (revision 3635)
174 174
Bundle-SymbolicName: org.txm.annotation.urs.rcp;singleton:=true
175 175
Bundle-Version: 1.0.0.qualifier
176 176
Bundle-Name: %Bundle-Name.0
177
Bundle-ClassPath: .
178 177
Require-Bundle: org.eclipse.ui;visibility:=reexport,org.eclipse.core.r
179 178
 untime;visibility:=reexport,org.eclipse.jface;visibility:=reexport,or
180 179
 g.eclipse.swt;visibility:=reexport,org.eclipse.core.expressions;bundl
......
192 191
Bundle-RequiredExecutionEnvironment: JavaSE-16
193 192
Bundle-Vendor: %Bundle-Vendor
194 193
Automatic-Module-Name: org.txm.annotation.urs.rcp
195

  
194
Eclipse-BundleShape: dir
TXM/trunk/org.txm.analec.rcp/src/org/txm/annotation/urs/view/ElementPropertiesView.java (revision 3635)
1 1
package org.txm.annotation.urs.view;
2 2

  
3 3
import java.util.ArrayList;
4
import java.util.HashMap;
4 5
import java.util.LinkedHashMap;
5 6

  
6 7
import org.eclipse.osgi.util.NLS;
7 8
import org.eclipse.swt.SWT;
9
import org.eclipse.swt.custom.ScrolledComposite;
8 10
import org.eclipse.swt.events.DisposeEvent;
9 11
import org.eclipse.swt.events.DisposeListener;
10 12
import org.eclipse.swt.events.SelectionEvent;
......
17 19
import org.eclipse.swt.widgets.Composite;
18 20
import org.eclipse.swt.widgets.Control;
19 21
import org.eclipse.swt.widgets.Display;
22
import org.eclipse.swt.widgets.Label;
20 23
import org.eclipse.swt.widgets.ToolBar;
21 24
import org.eclipse.swt.widgets.ToolItem;
22 25
import org.eclipse.ui.IWorkbenchPage;
......
26 29
import org.txm.annotation.urs.URSCorpora;
27 30
import org.txm.annotation.urs.toolbar.URSAnnotationToolbar;
28 31
import org.txm.rcp.IImageKeys;
32
import org.txm.rcp.swt.GLComposite;
29 33
import org.txm.utils.logger.Log;
30 34

  
31 35
import visuAnalec.Message;
......
85 89
	private org.txm.searchengine.cqp.corpus.CQPCorpus corpus;
86 90

  
87 91
	private ToolItem applyButton;
92

  
93
	private ScrolledComposite sc1;
94

  
95
	private GridLayout glayoutFields;
88 96
	
89 97
	//	private KeyListener allControlsKeyListener;
90 98
	
......
209 217
			public void widgetDefaultSelected(SelectionEvent e) { }
210 218
		});
211 219
		
220
		sc1 = new ScrolledComposite(parent, SWT.V_SCROLL);
221
		GridLayout glayout = new GridLayout(1, true);
222
		glayout.marginBottom = glayout.marginTop = glayout.marginHeight = glayout.verticalSpacing = 0;
223
		sc1.setLayout(glayout);
224
		sc1.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));
225
		sc1.setExpandHorizontal(true);
226
		sc1.setExpandVertical(true);
227
		sc1.setMinSize(0, 120);
212 228
		
213
		fields = new Composite(parent, SWT.NONE);
229
		fields = new Composite(sc1, SWT.NONE);
214 230
		GridData fields_gdata = new GridData(GridData.FILL, GridData.FILL, true, true);
215 231
		fields.setLayoutData(fields_gdata);
216
		fields.setLayout(new RowLayout());
232
		glayoutFields = new GridLayout();
233
		glayoutFields.numColumns = 1;
234
		fields.setLayout(glayoutFields);
235
		sc1.setContent(fields);
236
		fields.addListener( SWT.Resize, event -> {
237
			sc1.setMinSize(fields.computeSize(sc1.getParent().getSize().x, SWT.DEFAULT));
238
			} );
217 239
		this.setPartName("Element");
218 240
		
219 241
		// GridDatas to use when a new field is added
......
292 314
		//if (this.element == null || (!this.element.getType().equals(newElement.getType()))) { // no need to rebuild the widgets
293 315
		//clear(); // remove all previous widgets
294 316
		String[][] props = vue.getChamps(newElement.getClass(), newElement.getType());
317
		HashMap<String, Integer> niveaux = vue.getNiveauxChampsAVoir(newElement.getClass(), newElement.getType());
318
		HashMap<String, Integer> ordres = vue.getPositionsChampsAVoir(newElement.getClass(), newElement.getType());
319
		int ncol = 0;
320
		int nline = props.length;
295 321
		for (int l = 0 ; l < props.length ; l++) {
322
			if (ncol < props[l].length) ncol = props[l].length;
323
			
324
		}
325
		for (int l = 0 ; l < nline ; l++) {
326
			
327
			Composite lineComposite = new Composite(fields, SWT.NONE);
328
			//lineComposite.getLayout().numColumns = props[l].length;
329
			lineComposite.setLayout(new RowLayout());
330
			lineComposite.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
331
			
296 332
			for (String p : props[l]) { // the first is the prop names
333
				
297 334
				PropertyField c = null;
298 335
				if (textWidgets.containsKey(p)) {
299 336
					c = textWidgets.get(p);
300 337
				} else {
301
					c = new PropertyField(fields, SWT.NONE, p, this);
338
					c = new PropertyField(lineComposite, SWT.NONE, p, this);
302 339
					
303 340
					c.setLayoutData(cData);
304 341
					c.setLayout(new GridLayout(2, false));
......
307 344
				
308 345
				c.setItems(c, newElement);
309 346
			}
347

  
310 348
		}
311 349
		
350
		//glayoutFields.numColumns = ncol;
312 351
		fields.layout();
313 352
		fields.getParent().layout();
314 353
		
TXM/trunk/org.txm.analec.rcp/src/org/txm/annotation/urs/messages_fr.properties (revision 3635)
199 199

  
200 200
SaveCorpus_0 = La sélection n''est pas un corpus racine ({0})
201 201

  
202
SaveCorpus_3 = Enregistrement des annotations URS ({0})
202
SaveCorpus_3 = Enregistrement des annotations URS ({0}, {1})
203 203

  
204 204
SaveCorpus_5 = Erreur lors de l'enregistrement  du corpus.
205 205

  
TXM/trunk/org.txm.analec.rcp/src/org/txm/annotation/urs/commands/SaveCorpus.java (revision 3635)
80 80
		
81 81
		File binaryCorpusDirectory = mainCorpus.getProjectDirectory();
82 82
		File fichierCorpus = URSCorpora.getECFile(mainCorpus);
83
		File fichierVueCorpus = URSCorpora.getECVFile(mainCorpus);
83 84
		
84
		Log.info(NLS.bind(Messages.SaveCorpus_3, fichierCorpus));
85
		Log.info(NLS.bind(Messages.SaveCorpus_3, fichierCorpus, fichierVueCorpus));
85 86
		if (!URSCorpora.saveCorpus(mainCorpus)) {
86 87
			Log.warning(Messages.SaveCorpus_5);
87 88
			return false;
TXM/trunk/org.txm.analec.rcp/src/org/txm/annotation/urs/messages.properties (revision 3635)
199 199

  
200 200
SaveCorpus_0 = Selection is not a main corpus ({0})
201 201

  
202
SaveCorpus_3 = Saving the annotations ({0})
202
SaveCorpus_3 = Saving the annotations ({0}, {1})
203 203

  
204 204
SaveCorpus_5 = Error while saving the corpus.
205 205

  
TXM/trunk/org.txm.analec.rcp/build.properties (revision 3635)
1
jars.compile.order = .
2
source.. = src/
3 1
output.. = bin/
4 2
bin.includes = META-INF/,\
3
				.,\
5 4
               icons/,\
6 5
               plugin.xml,\
7 6
               libs/,\
8 7
               OSGI-INF/,\
9 8
               OSGI-INF/l10n/bundle.properties
9
source..=src/
10 10
#qualifier=svn

Formats disponibles : Unified diff