Index: tmp/org.txm.analec.rcp/src/org/txm/annotation/urs/toolbar/UnitToolbar.java
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/annotation/urs/toolbar/UnitToolbar.java	(revision 3224)
+++ tmp/org.txm.analec.rcp/src/org/txm/annotation/urs/toolbar/UnitToolbar.java	(revision 3225)
@@ -794,14 +794,17 @@
 			editor.addHighlightWordsById(selected_unit_color, previousSelectedUnitIDS);
 			editor.addFontWeightWordsById(EditionPanel.WEIGHT_BOLD, previousSelectedUnitIDS);
 			
-			if (previousSelectedUnitIDS.size() > 0 && focus) editor.setFocusedWordID(previousSelectedUnitIDS.get(0));
+			if (previousSelectedUnitIDS.size() > 0 && focus) {
+				editor.setFocusedWordID(previousSelectedUnitIDS.get(0));
+			}
+			Page cp = panel.getCurrentPage();
 			// System.out.println("Word page= "+p+" current="+panel.getCurrentPage());
-			if (panel.getCurrentText() != newText) { // text changed
+			if (!panel.getCurrentText().equals(newText)) { // text changed
 				// System.out.println("TEXT CHANGED");
 				editor.setText(newText, false); // don't refresh right now
 				editor.goToPage(p.getName());
 			}
-			else if (panel.getCurrentPage() != p) { // do we need to change page ?
+			else if (!cp.equals(p)) { // do we need to change page ?
 				editor.goToPage(p.getName());
 			}
 			else { // just reload the page to highlight words
@@ -1095,7 +1098,7 @@
 			
 			Unite unite = unites[iUnite];
 			int offset = start - unite.getDeb(); // to select the right page when the unit words overlap with 2 pages
-			highlightUnite(unite, true, offset);
+			highlightUnite(unite, false, offset);
 			
 			updatePropertiesView(unite);
 			
Index: tmp/org.txm.analec.rcp/src/org/txm/annotation/urs/search/URSSearchEngine.java
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/annotation/urs/search/URSSearchEngine.java	(revision 3224)
+++ tmp/org.txm.analec.rcp/src/org/txm/annotation/urs/search/URSSearchEngine.java	(revision 3225)
@@ -61,22 +61,24 @@
 	@Override
 	public Selection query(CorpusBuild corpus, IQuery query, String name, boolean saveQuery) throws Exception {
 		
-		ArrayList<Element> elements = findAllInCorpus(0, URSCorpora.getCorpus(corpus), corpus, Unite.class, query.getQueryString());
+		ArrayList<Element> elements = findAllInCorpus(0, URSCorpora.getCorpus(corpus), corpus, query.getQueryString());
 		ArrayList<URSMatch> matches = new ArrayList<URSMatch>();
 		for (Element e : elements) {
-			matches.add(new URSMatch(e.getUnite0().getDeb(), e.getUnite0().getFin()));
+			matches.add(new URSMatch(e, e.getUnite0().getDeb(), e.getUnite0().getFin()));
 		}
 		return new URSSelection(query, matches);
 	}
 	
 	static String[] getFilterParameters(String URSQL) {
 		
+		String clazz = "U";
 		String type = "";
 		String prop = "";
 		String value = "";
 
 		if (URSQL == null) return new String[] {type, prop, value};
 		
+		int clazzidx = URSQL.indexOf("/"); //TODO parse query to find out which URS Element use (U/R/S/E)
 		int atidx = URSQL.indexOf("@");
 		int equalidx = URSQL.indexOf("=");
 
@@ -94,17 +96,30 @@
 			type = URSQL;
 		}
 		//	println(["'"+type+"'", "'"+prop+"'", "'"+value+"'"])
-
-		return new String[] {type, prop, value};
+		Boolean mustmatch  = equalidx <= 0 ||  '!' != URSQL.charAt(equalidx-1);
+ 		
+		return new String[] {clazz, type, mustmatch.toString(), prop, value};
 	}
 	
-	static ArrayList<Element> findAllInCorpus(int debug, Corpus analecCorpus, CorpusBuild corpus, Class elemClazz, String URSQL) {
+	static ArrayList<Element> findAllInCorpus(int debug, Corpus analecCorpus, CorpusBuild corpus, String URSQL) {
 		String[] params = getFilterParameters(URSQL);
 		if (debug >= 2) Log.finer("PARAMS=$params");
-		return findAllInCorpus(debug, analecCorpus, corpus, elemClazz, params[0], params[1], params[2]);
+		return findAllInCorpus(debug, analecCorpus, corpus, params[0], params[1], params[2], Boolean.parseBoolean(params[3]), params[4]);
 	}
+	
+	static ArrayList<Element> findAllInCorpus(int debug, Corpus analecCorpus, CorpusBuild corpus, String clazzString, String typeRegex, String propName, boolean valueMustMatch, String valueRegex) {
+		Class<? extends Element> clazz = Unite.class;
+		if ("R".equals(clazzString)) {
+			clazz = Relation.class;
+		} else if ("S".equals(clazzString)) {
+			clazz = Schema.class;
+		}  else if ("E".equals(clazzString)) {
+			clazz = Element.class;
+		}
+		return findAllInCorpus(debug, analecCorpus, corpus, clazz, typeRegex, propName, valueMustMatch, valueRegex);
+	}
 
-	static ArrayList<Element> findAllInCorpus(int debug, Corpus analecCorpus, CorpusBuild corpus, Class elemClazz, String typeRegex, String propName, String valueRegex) {
+	static ArrayList<Element> findAllInCorpus(int debug, Corpus analecCorpus, CorpusBuild corpus, Class<? extends Element> elemClazz, String typeRegex, String propName, boolean valueMustMatch, String valueRegex) {
 		ArrayList<Element> allElements = new ArrayList<Element>();
 
 		if (elemClazz != null) {
@@ -120,7 +135,7 @@
 			allElements.addAll(analecCorpus.getTousSchemas());
 		}
 
-		return filterElements(debug, allElements, corpus, typeRegex, propName, valueRegex);
+		return filterElements(debug, allElements, corpus, typeRegex, propName, valueMustMatch, valueRegex);
 	}
 	
 	/**
@@ -206,8 +221,8 @@
 		return selectedUnits;
 	}
 	
-	static ArrayList<Element> filterElements(int debug, ArrayList<Element> allElements, CorpusBuild corpus, String typeRegex, String propName, String valueRegex) {
-		if (debug >= 2) Log.finer("filtering "+allElements.size()+" elements with typeRegex='$typeRegex' propName='$propName' and valueRegex='$valueRegex'");
+	static ArrayList<Element> filterElements(int debug, ArrayList<Element> allElements, CorpusBuild corpus, String typeRegex, String propName, boolean valueMustMatch, String valueRegex) {
+		if (debug >= 2) Log.finer("filtering "+allElements.size()+" elements with typeRegex='$typeRegex' propName='$propName' and valueRegex"+(valueMustMatch?"":"!")+"='$valueRegex'");
 		
 		if (corpus != null) {
 			allElements = filterUniteByInclusion(debug, allElements, corpus.getMatches(), true, 0);
@@ -225,14 +240,14 @@
 			allElements = filteredElements;
 		}
 		if (debug >= 2) Log.finer(" type step result: "+allElements.size());
-
+		
 		if (propName != null && propName.length() > 0) {
 			ArrayList<Element> filteredElements = new ArrayList<Element>();
 			if (valueRegex != null && valueRegex.length() > 0) {  // select only elements with the prop&value
 				Pattern pattern = Pattern.compile(valueRegex);
 				for (Element element : allElements) {
 					String value = element.getProp(propName);
-					if (value != null && pattern.matcher(value).matches()) {
+					if (value != null && pattern.matcher(value).matches() == valueMustMatch) {
 						filteredElements.add(element);
 					}
 				}
@@ -262,14 +277,17 @@
 
 	@Override
 	public String getValueForProperty(Match match, SearchEngineProperty property) {
-		// TODO Auto-generated method stub
+		if (match instanceof URSMatch) {
+			return ((URSMatch) match).getValue(property.getName());
+		}
 		return null;
 	}
 
 	@Override
 	public List<String> getValuesForProperty(Match match, SearchEngineProperty property) {
-		// TODO Auto-generated method stub
-		return null;
+		ArrayList<String> a = new ArrayList<String>();
+		a.add(getValueForProperty(match, property));
+		return a;
 	}
 
 }
Index: tmp/org.txm.analec.rcp/src/org/txm/annotation/urs/search/URSMatch.java
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/annotation/urs/search/URSMatch.java	(revision 3224)
+++ tmp/org.txm.analec.rcp/src/org/txm/annotation/urs/search/URSMatch.java	(revision 3225)
@@ -2,10 +2,19 @@
 
 import org.txm.objects.Match2P;
 
+import visuAnalec.elements.Element;
+
 public class URSMatch extends Match2P {
 
-	public URSMatch(int start, int end) {
+	Element element;
+	
+	public URSMatch(Element element, int start, int end) {
 		super(start, end);
+		this.element = element;
 	}
 	
+	public String getValue(String property) {
+		return this.element.getProp(property);
+	}
+	
 }
Index: tmp/org.txm.analec.rcp/src/org/txm/annotation/urs/view/ElementPropertiesView.java
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/annotation/urs/view/ElementPropertiesView.java	(revision 3224)
+++ tmp/org.txm.analec.rcp/src/org/txm/annotation/urs/view/ElementPropertiesView.java	(revision 3225)
@@ -1,30 +1,21 @@
 package org.txm.annotation.urs.view;
 
-import java.text.Collator;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.LinkedHashMap;
-import java.util.Locale;
 
-import org.eclipse.jface.bindings.keys.KeyStroke;
-import org.eclipse.jface.fieldassist.ComboContentAdapter;
-import org.eclipse.jface.fieldassist.TXMAutoCompleteField;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.DisposeEvent;
 import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.KeyListener;
 import org.eclipse.swt.events.SelectionEvent;
 import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Color;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.layout.RowData;
 import org.eclipse.swt.layout.RowLayout;
-import org.eclipse.swt.widgets.Combo;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.ToolBar;
 import org.eclipse.swt.widgets.ToolItem;
 import org.eclipse.ui.IWorkbenchPage;
@@ -46,13 +37,15 @@
 import visuAnalec.vue.Vue;
 
 public class ElementPropertiesView extends ViewPart {
-
+	
 	public static final String ID = ElementPropertiesView.class.getName();
-
-	private LinkedHashMap<Combo, String> textWidgets = new LinkedHashMap<Combo, String>();
+	
+	private LinkedHashMap<String, PropertyField> textWidgets = new LinkedHashMap<String, PropertyField>();
+	private String[][] properties;
+	
 	Element element;
 	URSAnnotationToolbar toolbar;
-
+	
 	private ToolBar buttons;
 	private Composite fields;
 	private ToolItem firstButton;
@@ -60,9 +53,7 @@
 	private ToolItem nextButton;
 	private ToolItem lastButton;
 	RowData cData = new RowData();
-	private GridData lData;
-	private GridData tData;
-
+	
 	private Corpus analecCorpus;
 	private Vue vue;
 	private CorpusListener corpusListener = new CorpusListener() {
@@ -76,32 +67,35 @@
 					if (fields == null || fields.isDisposed()) return;
 					
 					if (e.getType() == TypeMessage.MODIF_STRUCTURE) {
-						needUpdate = true;
 						loadElement(corpus, analecCorpus, element, toolbar);
+					} else if (e.getType() == TypeMessage.CORPUS_SAVED) {
+						for (PropertyField c : textWidgets.values()) {
+							if (c.isDisposed()) continue;
+							c.setForeground(null);
+							c.update();
+						}
 					}
 				}
 			});
 			
 		}
 	};
-
-	private boolean needUpdate = false;
-
+	
 	private org.txm.searchengine.cqp.corpus.CQPCorpus corpus;
-
-//	private KeyListener allControlsKeyListener;
-
+	
+	//	private KeyListener allControlsKeyListener;
+	
 	public static void closeView() {
 		try {
 			IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
 			ElementPropertiesView view = (ElementPropertiesView) page.findView(ElementPropertiesView.ID);
-
+			
 			// close Element View if opened
 			if (view != null) {
 				view = (ElementPropertiesView) page.showView(ElementPropertiesView.ID);
 				page.hideView(view);
 			}
-
+			
 			return;
 		} catch (PartInitException e1) {
 			System.out.println("Part initialisation error: "+e1.getLocalizedMessage());
@@ -129,10 +123,10 @@
 		}
 		return null;
 	}
-
+	
 	@Override
 	public void createPartControl(Composite parent) {
-				
+		
 		GridLayout layout = new GridLayout();
 		parent.setLayout(layout);
 		
@@ -190,7 +184,7 @@
 			@Override
 			public void widgetDefaultSelected(SelectionEvent e) { }
 		});
-
+		
 		fields = new Composite(parent, SWT.NONE);
 		GridData fields_gdata = new GridData(GridData.FILL, GridData.FILL, true, true);
 		fields.setLayoutData(fields_gdata);
@@ -199,36 +193,29 @@
 		
 		// GridDatas to use when a new field is added
 		cData.width = 325;
-		lData = new GridData(GridData.FILL, GridData.CENTER, false, false);
-		lData.minimumWidth = 75;
-		lData.widthHint = 75;
-		tData = new GridData(GridData.FILL, GridData.FILL, true, false);
-		tData.minimumWidth = 150;
-		tData.widthHint = 150;
-
+		
 		parent.addDisposeListener(new DisposeListener() {
 			@Override
 			public void widgetDisposed(DisposeEvent e) {
 				try {
 					if (element != null) { // save previous unit changes
-						for (Combo t : new ArrayList<Combo>(textWidgets.keySet())) {
-							if (!t.isDisposed()) {
-								saveFieldValue(t);
-							}
+						
+						for (PropertyField c : textWidgets.values()) {
+							if (c.isDisposed()) continue;
+							saveFieldValue(c);
 						}
 					}
 				} catch(Exception ex) { ex.printStackTrace();}
 			}
-		});
+		});		
 	}
-
+	
 	public void unloadElement(Corpus analecCorpus, URSAnnotationToolbar toolbar) {
-
+		
 		if (this.element != null) { // save previous unit changes
-			for (Combo t : new ArrayList<Combo>(textWidgets.keySet())) {
-				if (!t.isDisposed()) {
-					saveFieldValue(t);
-				}
+			for (PropertyField c : textWidgets.values()) {
+				if (c.isDisposed()) continue;
+				saveFieldValue(c);
 			}
 		}
 		
@@ -237,94 +224,63 @@
 		}
 		
 		clear();
-		this.needUpdate = true;
 		this.setPartName("Element");
 		this.setContentDescription("No annotation selected");
 	}
 	
 	public synchronized void loadElement(org.txm.searchengine.cqp.corpus.CQPCorpus corpus, Corpus analecCorpus, Element newElement, URSAnnotationToolbar toolbar) {
-
+		
 		if (this.element != null) { // save previous unit changes
-			ArrayList<Combo> widgets = new ArrayList<>(textWidgets.keySet()); // vue.setValue will modify this list if an Analec event is fired
-			for (Combo t : widgets) {
-				if (!t.isDisposed()) saveFieldValue(t);
-				if (!t.isDisposed()) t.setText("");
+			
+			for (PropertyField c : textWidgets.values()) {
+				if (c.isDisposed()) continue;
+				if (!c.isDisposed()) saveFieldValue(c);
 			}
 		}
-
+		
 		if (this.analecCorpus != null) { // remove corpus listener from previous corpus
 			this.analecCorpus.removeEventListener(corpusListener);
 		}
-
+		
+		clear();
+		
 		this.corpus = corpus;
 		this.analecCorpus = analecCorpus;
 		this.analecCorpus.addEventListener(corpusListener);
 		this.vue = URSCorpora.getVue(analecCorpus);
-
-		if (this.needUpdate  || this.element == null || (!this.element.getType().equals(newElement.getType()))) { // no need to rebuild the widgets
-			needUpdate = false;
-			clear(); // remove all previous widgets
-
-			String[][] props = vue.getChamps(newElement.getClass(), newElement.getType());
-			for (int l = 0 ; l < props.length ; l++)
-				for (String p : props[l]) { // the first is the prop names
-
-					Composite c = new Composite(fields, SWT.NONE);
-					c.setLayoutData(cData);
-					c.setLayout(new GridLayout(2, false));
-					Label label = new Label(c, SWT.None);
-					label.setText(p);
-					label.setLayoutData(lData);
-
-					Combo t = new Combo(c, SWT.BORDER);
-					t.setLayoutData(tData);
-					textWidgets.put(t, p);
-					setItems(t, newElement);
-					t.addSelectionListener(new SelectionListener() {
-						@Override
-						public void widgetSelected(SelectionEvent e) {
-							if (!(e.widget instanceof Combo)) return;
-							
-//							System.out.println("w:"+e.widget+" selected.");
-							saveFieldValue((Combo)e.widget);
-						}
-
-						@Override
-						public void widgetDefaultSelected(SelectionEvent e) {
-							
-						}
-					});
-				//	t.addKeyListener(allControlsKeyListener);
-					t.addKeyListener(new KeyListener() {
-						@Override
-						public void keyReleased(KeyEvent e) {
-							if (!(e.widget instanceof Combo)) return;
-							if (e.keyCode == SWT.CR || e.keyCode == SWT.KEYPAD_CR) {
-//								System.out.println("w:"+e.widget+" key pressed2.");
-								
-								saveFieldValue((Combo)e.widget);
-							}
-//							else if (e.keyCode == SWT.DEL) {
-//								String value =((Combo) e.widget).getText();
-//								System.out.println("DEL prop="+textWidgets.get(e.widget)+" value="+value);
-//							}
-						}
-
-						@Override
-						public void keyPressed(KeyEvent e) { }
-					});
-					
-				}
-			fields.layout();
-			fields.getParent().layout();
+		
+		//if (this.element == null || (!this.element.getType().equals(newElement.getType()))) { // no need to rebuild the widgets
+		//clear(); // remove all previous widgets
+		String[][] props = vue.getChamps(newElement.getClass(), newElement.getType());
+		for (int l = 0 ; l < props.length ; l++) {
+			for (String p : props[l]) { // the first is the prop names
+				
+				PropertyField c = new PropertyField(fields, SWT.NONE, p, this);
+				
+				c.setLayoutData(cData);
+				c.setLayout(new GridLayout(2, false));
+				c.setItems(c, newElement);
+				
+				textWidgets.put(p, c);
+			}
 		}
-
+		
+		fields.layout();
+		fields.getParent().layout();
+		
+		//}
+		
 		Log.fine("Refreshing unit properties view with: "+newElement);
 		this.toolbar = toolbar;
 		this.element = newElement;
-		for (Combo t : new ArrayList<Combo>(textWidgets.keySet())) {
-			if (newElement.getProps().get(textWidgets.get(t)) != null) {
-				t.setText(newElement.getProps().get(textWidgets.get(t)));
+		for (PropertyField t : new ArrayList<PropertyField>(textWidgets.values())) {
+			if (newElement.getProps().get(t.getToolTipText()) != null) {
+				String newValue = newElement.getProps().get(t.getToolTipText());
+				String oldValue = t.getText();
+				//System.out.println("new="+newValue+" old="+oldValue+" differs? "+(!newValue.equals(t.getText())));
+				if (!newValue.equals(oldValue)) {
+					t.setText(newValue);
+				}
 			}
 		}
 		
@@ -342,49 +298,49 @@
 		}
 		this.setContentDescription("");
 	}
-
-	protected void saveFieldValue(Combo t) {
-		if (toolbar == null || toolbar.isDisposed()) return;
+	
+	protected void saveFieldValue(PropertyField c) {
+		if (toolbar == null || toolbar.isDisposed() || c.isDisposed()) return;
 		
-		String newVal = t.getText().trim();
-		String v = ElementPropertiesView.this.vue.getValeurChamp(ElementPropertiesView.this.element, textWidgets.get(t));
+		String newVal = c.getCombo().getText().trim();
+		String v = ElementPropertiesView.this.vue.getValeurChamp(ElementPropertiesView.this.element, c.getToolTipText());
 		if (!v.equals(newVal) && v != null) {
-			ElementPropertiesView.this.vue.setValeurChamp(ElementPropertiesView.this.element, textWidgets.get(t), newVal);
+			
+			
+			
+			ElementPropertiesView.this.vue.setValeurChamp(ElementPropertiesView.this.element, c.getProperty(), newVal);
 			ElementPropertiesView.this.analecCorpus.isModifie();
-			if (toolbar != null && !toolbar.isDisposed()) this.toolbar.fireIsDirty();
+			if (toolbar != null && !toolbar.isDisposed()) this.toolbar.fireIsDirty(); // the Analec corpus should be saved
+			
+			if (!c.isDisposed()) {
+				c.setBackground(new Color(c.getDisplay(), 255,0,0));
+				c.update();
+			}
 		}
 	}
 	
-	private void setItems(Combo t, Element newElement) {
-		String[] items = vue.getValeursChamp(newElement.getClass(), newElement.getType(), textWidgets.get(t));
-		String lang = null;
-		
-		Arrays.sort(items, Collator.getInstance(Locale.getDefault()));
-		t.setItems(items);
-		KeyStroke keys = KeyStroke.getInstance(SWT.CONTROL, SWT.SPACE);
-		new TXMAutoCompleteField(t, new ComboContentAdapter(), items, keys);
-	}
+	
 	public Element getCurrentElement() {
 		return element;
 	}
-
+	
 	public Corpus getCurrentAnalecCorpus() {
 		return analecCorpus;
 	}
-
+	
 	public void setFocusOnProperty() {
-		for (Combo w : textWidgets.keySet()) {
+		for (PropertyField w : textWidgets.values()) {
 			w.setFocus();
 			return;
 		}
 	}
-
+	
 	public void clear() {
 		Control[] children = fields.getChildren();
 		for (int i = 0 ; i < children.length ; i++) { 
 			children[i].dispose();
 		}
-		textWidgets.clear();
+		if (textWidgets != null) textWidgets.clear();
 		fields.layout();
 	}
 	@Override
@@ -392,4 +348,8 @@
 		// TODO Auto-generated method stub
 		
 	}
+	public Vue getAnalecVue() {
+		
+		return vue;
+	}
 }
\ No newline at end of file
Index: tmp/org.txm.analec.rcp/src/org/txm/annotation/urs/view/PropertyField.java
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/annotation/urs/view/PropertyField.java	(revision 0)
+++ tmp/org.txm.analec.rcp/src/org/txm/annotation/urs/view/PropertyField.java	(revision 3225)
@@ -0,0 +1,151 @@
+package org.txm.annotation.urs.view;
+
+import java.text.Collator;
+import java.util.Arrays;
+import java.util.Locale;
+
+import org.eclipse.jface.bindings.keys.KeyStroke;
+import org.eclipse.jface.fieldassist.ComboContentAdapter;
+import org.eclipse.jface.fieldassist.TXMAutoCompleteField;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.KeyListener;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+
+import visuAnalec.elements.Element;
+
+public class PropertyField extends Composite {
+	
+	String property;
+	ElementPropertiesView view;
+	boolean first = true;
+	
+	public void reinitialiseModify() {
+		first = true;
+	}
+	
+	public PropertyField(Composite parent, int style, String property, ElementPropertiesView view) {
+		
+		super(parent, style);
+		this.property = property;
+		this.view = view;
+		
+		label = new Label(this, SWT.None);
+		label.setText(property);
+		
+		GridData lData = new GridData(GridData.FILL, GridData.CENTER, false, false);
+		lData.minimumWidth = 75;
+		lData.widthHint = 75;
+		label.setLayoutData(lData);
+		
+		t = new Combo(this, SWT.BORDER);
+		t.setToolTipText(property);
+		GridData tData = new GridData(GridData.FILL, GridData.FILL, true, false);
+		tData.minimumWidth = 150;
+		tData.widthHint = 150;
+		t.setLayoutData(tData);
+		
+		t.addModifyListener(new ModifyListener() {
+			
+			@Override
+			public void modifyText(ModifyEvent e) {
+				if (e.widget.isDisposed()) return;
+				if (first) {
+					first = false;
+					return;
+				}
+				
+				t.setBackground(new Color(t.getDisplay(),255,0,0));
+			}
+		});
+		t.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				if (!(e.widget instanceof Combo)) return;
+				view.saveFieldValue(PropertyField.this);
+			}
+			
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+				
+			}
+		});
+		//	t.addKeyListener(allControlsKeyListener);
+		t.addKeyListener(new KeyListener() {
+			@Override
+			public void keyReleased(KeyEvent e) {
+				if (!(e.widget instanceof Combo)) return;
+				if (e.keyCode == SWT.CR || e.keyCode == SWT.KEYPAD_CR) {
+					//								System.out.println("w:"+e.widget+" key pressed2.");
+					
+					view.saveFieldValue(PropertyField.this);
+					
+				}
+				//							else if (e.keyCode == SWT.DEL) {
+				//								String value =((Combo) e.widget).getText();
+				//								System.out.println("DEL prop="+textWidgets.get(e.widget)+" value="+value);
+				//							}
+			}
+			
+			@Override
+			public void keyPressed(KeyEvent e) { }
+		});
+	}
+	Label label;
+	Combo t;
+	
+	public void setItems(PropertyField t, Element newElement) {
+		
+		String[] items = view.getAnalecVue().getValeursChamp(newElement.getClass(), newElement.getType(), t.getToolTipText());
+		
+		Arrays.sort(items, Collator.getInstance(Locale.getDefault()));
+		t.getCombo().setItems(items);
+		KeyStroke keys = KeyStroke.getInstance(SWT.CONTROL, SWT.SPACE);
+		new TXMAutoCompleteField(t.getCombo(), new ComboContentAdapter(), items, keys);
+	}
+	
+	public String getToolTipText() {
+		return t.getToolTipText();
+	}
+	
+	public void setText(String value) {
+		t.setText(value);
+	}
+	
+	public boolean setFocus() {
+		return t.setFocus();
+	}
+	
+	public void update() {
+		super.update();
+		label.update();
+		t.update();
+	}
+	
+	public void setToolTipText(String title) {
+		this.getCombo().setToolTipText(title);
+	}
+	
+	public Combo getCombo() {
+		return t;
+	}
+
+	public String getProperty() {
+		
+		return property;
+	}
+
+	public String getText() {
+		
+		return t.getText();
+	}
+	
+}

Property changes on: tmp/org.txm.analec.rcp/src/org/txm/annotation/urs/view/PropertyField.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

