Index: tmp/org.txm.rcp/plugin.xml
===================================================================
--- tmp/org.txm.rcp/plugin.xml	(revision 1519)
+++ tmp/org.txm.rcp/plugin.xml	(revision 1520)
@@ -2560,10 +2560,10 @@
             id="org.txm.rcp.commands.function.ExportResult"
             name="%command.name.24">
       </command>
-            <command
-                  defaultHandler="org.txm.rcp.handlers.export.ExportResultParameters"
-                  id="org.txm.rcp.handlers.export.ExportResultParameters"
-                  name="%command.name.35">
+      <command
+            defaultHandler="org.txm.rcp.handlers.export.ExportResultParameters"
+            id="org.txm.rcp.handlers.export.ExportResultParameters"
+            name="%command.name.35">
       </command>
       <command
             defaultHandler="org.txm.rcp.handlers.export.ExportSVG"
@@ -2571,11 +2571,6 @@
             name="%command.name.34">
       </command>
       <command
-            defaultHandler="org.txm.rcp.handlers.export.ImportResultParameters"
-            id="org.txm.rcp.handlers.export.ImportResultParameters"
-            name="%command.name.38">
-      </command>
-      <command
             defaultHandler="org.txm.rcp.handlers.export.ImportResult"
             id="org.txm.rcp.handlers.export.ImportResult"
             name="%command.name.39">
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/InfosSection.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/InfosSection.java	(revision 1519)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/InfosSection.java	(revision 1520)
@@ -24,14 +24,13 @@
 	
 	private static final int SECTION_SIZE = 2;
 	Label corpusNameLabel; // color change if the corpus name is malformed
-	Text corpusText;
 	private Text descText;
 	
 	public InfosSection(FormToolkit toolkit2, ScrolledForm form2, Composite parent, int style) {
 		super(toolkit2, form2, parent, style);
 		
 		//this = toolkit.createSection(form.getBody(), ExpandableComposite.TITLE_BAR|ExpandableComposite.TWISTIE);
-		this.section.setText(TXMUIMessages.generalInformations);
+		this.section.setText(TXMUIMessages.description);
 		section.setExpanded(true);
 		
 		TableWrapLayout layout = new TableWrapLayout();
@@ -46,23 +45,18 @@
 
 		Composite sectionClient = toolkit.createComposite(this.section);
 		TableWrapLayout slayout = new TableWrapLayout();
-		slayout.numColumns = 2;
+		slayout.numColumns = 1;
 		sectionClient.setLayout(slayout);
 		this.section.setClient(sectionClient);
 
-		corpusNameLabel = toolkit.createLabel(sectionClient, TXMUIMessages.corpusNameOnlyCapsAndNoDigitAtBeginning, SWT.WRAP);
+//		corpusNameLabel = toolkit.createLabel(sectionClient, TXMUIMessages.corpusNameOnlyCapsAndNoDigitAtBeginning, SWT.WRAP);
+//		TableWrapData gdata = new TableWrapData();
+//		corpusNameLabel.setLayoutData(gdata);
+//
+		Label label = toolkit.createLabel(sectionClient, TXMUIMessages.completeNameAuthorDateLicenseComment, SWT.WRAP);
 		TableWrapData gdata = new TableWrapData();
-		corpusNameLabel.setLayoutData(gdata);
-
-		Label label = toolkit.createLabel(sectionClient, TXMUIMessages.descriptionHTMLCompleteNameAuthorDateLicenseComment, SWT.WRAP);
-		gdata = new TableWrapData();
 		label.setLayoutData(gdata);
 
-		corpusText = toolkit.createText(sectionClient, "", SWT.BORDER); //$NON-NLS-1$
-		gdata = new TableWrapData(TableWrapData.FILL, TableWrapData.TOP);
-		corpusText.setLayoutData(gdata);
-		corpusText.setEnabled(false);
-
 		descText = toolkit.createText(sectionClient, "", SWT.BORDER | SWT.MULTI | SWT.V_SCROLL); //$NON-NLS-1$
 		gdata = new TableWrapData(TableWrapData.FILL, TableWrapData.FILL);
 		gdata.heightHint = 50;
@@ -72,10 +66,8 @@
 
 	@Override
 	public void update(Project project) {
-		section.setText(NLS.bind(TXMUIMessages.corpusInfosP0, project.getSrcdir())); //$NON-NLS-1$
+		section.setText(NLS.bind(TXMUIMessages.descriptionOfTheP0CorpusP1, project.getName(), project.getSrcdir())); //$NON-NLS-1$
 		
-		corpusText.setText(project.getName());
-		
 		String descContent = project.getDescription(); //$NON-NLS-1$
 		descContent = descContent.replace("<pre><br/>", ""); //$NON-NLS-1$ //$NON-NLS-2$
 		descContent = descContent.replace("</pre>", ""); //$NON-NLS-1$ //$NON-NLS-2$
@@ -87,20 +79,6 @@
 
 	@Override
 	public boolean save(Project project) {
-		System.out.println("");
-		
-		if (corpusText.getText().trim().length() == 0) {
-			System.out.println(TXMUIMessages.corpusNameIsMandatory);
-			return false;
-		}
-		
-		if (!corpusText.getText().matches("[A-Z][-A-Z0-9]{1,20}")) { //$NON-NLS-1$
-			System.out.println(NLS.bind(TXMUIMessages.importStoppedColonCorpusNameDoesNotMatchesTheAZAZ09120PatternColonP0, corpusText.getText()));
-			return false;
-		}
-		
-		project.setName(corpusText.getText());
-		
 		project.setDescription("<pre><br/>"+descText.getText().replace("\n", "<br/>")+"</pre>"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		
 		return true;
@@ -108,17 +86,6 @@
 
 	@Override
 	public boolean checkFields() {
-		String corpusname = corpusText.getText();
-		Log.warning("Checking corpus name validity with '[A-Z][-A-Z0-9]+': "+corpusname);
-		if (!corpusname.matches("[A-Z][-A-Z0-9]+")) { //$NON-NLS-1$
-			System.out.println(NLS.bind(TXMUIMessages.importStoppedColonCorpusNameDoesNotMatchesTheAZAZ09120PatternColonP0, corpusname));
-
-			Device device = Display.getCurrent ();
-			Color red = new Color (device, 255, 0, 0);
-			corpusNameLabel.setBackground(red);
-
-			return false;
-		}
 		corpusNameLabel.setBackground(corpusNameLabel.getParent().getBackground());
 		return true;
 	}
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/CorpusPage.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/CorpusPage.java	(revision 1519)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/CorpusPage.java	(revision 1520)
@@ -1088,6 +1088,8 @@
 	//	}
 	//
 	public String getRootDir() {
+		if (project == null) return null;
+		if (project.getSrcdir() == null) return null;
 		return project.getSrcdir().getAbsolutePath();
 	}
 }
\ No newline at end of file
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/MetadataPage.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/MetadataPage.java	(revision 1519)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/MetadataPage.java	(revision 1520)
@@ -479,6 +479,7 @@
 		//viewer2.setInput(null);
 		//viewer2.refresh();
 		if (main.getRootDir() == null) return;
+		
 		metadataFile = Metadatas.findMetadataFile(new File(main.getRootDir())); //$NON-NLS-1$
 		Metadatas temp = null;
 		if (metadataFile.exists()) {//if their is a metadata file OK
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/dialog/QueryAssistDialog.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/dialog/QueryAssistDialog.java	(revision 1519)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/dialog/QueryAssistDialog.java	(revision 1520)
@@ -48,6 +48,7 @@
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Spinner;
 import org.eclipse.swt.widgets.Text;
 import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
 import org.txm.searchengine.cqp.corpus.CQPCorpus;
@@ -56,33 +57,34 @@
 import org.txm.searchengine.cqp.corpus.WordProperty;
 import org.txm.rcp.IImageKeys;
 import org.txm.rcp.messages.TXMUIMessages;
+import org.txm.rcp.swt.GLComposite;
 // TODO: Auto-generated Javadoc
 /**
  * build a query with the help of simple questions @ author mdecorde.
  */
 public class QueryAssistDialog extends Dialog {
-	
+
 	/** The self. */
 	QueryAssistDialog self;
-	
+
 	/** The parent. */
 	Composite parent;
-	
+
 	/** The main panel. */
 	Composite mainPanel;
-	
+
 	/** The parent shell. */
 	Shell parentShell;
 
 	/** The query. */
 	String query;
-	
+
 	/** The nbwords. */
 	int nbwords = 0;
-	
+
 	/** The wordfields. */
 	List<WordField> wordfields = new ArrayList<WordField>();
-	
+
 	/** The linkfields. */
 	List<LinkField> linkfields = new ArrayList<LinkField>();
 
@@ -91,7 +93,7 @@
 
 	/** The cherche label. */
 	Label chercheLabel;
-	
+
 	/** The wordcontainer. */
 	Composite wordcontainer;
 
@@ -103,6 +105,8 @@
 
 	private ScrolledComposite scrollComposite;
 
+	private Spinner withinN;
+
 	/**
 	 * Instantiates a new query assist dialog.
 	 *
@@ -140,7 +144,7 @@
 			this.self = this;
 			this.parent = p;
 			// System.out.println(parent.getLayout());
-			GridLayout mainlayout = new GridLayout(1, false);
+			GridLayout mainlayout = new GridLayout(2, false);
 			mainPanel = new Composite(parent, SWT.NONE);
 			mainPanel.setLayout(mainlayout);
 			GridData gridData = new GridData(GridData.FILL, GridData.FILL, true, true);
@@ -149,14 +153,14 @@
 			// directory
 			chercheLabel = new Label(mainPanel, SWT.NONE);
 			chercheLabel.setAlignment(SWT.CENTER);
-			chercheLabel.setLayoutData(new GridData(GridData.BEGINNING, GridData.FILL, true, false));
+			chercheLabel.setLayoutData(new GridData(GridData.BEGINNING, GridData.FILL, true, false, 2 , 1));
 			chercheLabel.setText(TXMUIMessages.imLookingForColon);
-			
+
 			scrollComposite = new ScrolledComposite(mainPanel, SWT.V_SCROLL);
-			scrollComposite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));
+			scrollComposite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true, 2, 1));
 
 			wordcontainer = new Composite(scrollComposite, SWT.NONE);
-			wordcontainer.setLayout(new GridLayout(1, true));
+			wordcontainer.setLayout(new GridLayout(1, false));
 
 			scrollComposite.setContent(wordcontainer);
 			scrollComposite.setExpandVertical(true);
@@ -172,32 +176,51 @@
 			addWordField();
 
 			Composite withinComposite = new Composite(mainPanel, SWT.NONE);
-			withinComposite.setLayout(new GridLayout(2, false));
+			withinComposite.setLayout(new GridLayout(3, false));
+			withinComposite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false, 2, 1));
 			withinButton = new Button(withinComposite, SWT.CHECK);
-			withinButton.setText(TXMUIMessages.withinStructure); //"within structure: "
+			withinButton.setText(TXMUIMessages.withinAContextOf); //"within structure: "
 			withinButton.setToolTipText("Check to add structure contraint");
 			withinButton.addSelectionListener(new SelectionListener() {
 				@Override
 				public void widgetSelected(SelectionEvent e) {
 					structsCombo.setEnabled(withinButton.getSelection());
+					withinN.setEnabled(withinButton.getSelection());
 				}
-				
+
 				@Override
 				public void widgetDefaultSelected(SelectionEvent e) { }
 			});
+			
+			withinN = new Spinner(withinComposite, SWT.CHECK);
+			withinN.setToolTipText("context size");
+			withinN.setMinimum(1);
+			withinN.setMaximum(200);
+			
 			structsCombo = new Combo(withinComposite, SWT.READ_ONLY);
-			structsCombo.setToolTipText("The available structures");
+			structsCombo.setToolTipText("The available contexts");
 			structsCombo.setEnabled(false);
-			int iText = 0;
+			structsCombo.add("<word>");
+			
+			int iText = -1;
+			int iP = -1;
 			List<StructuralUnit> sus = corpus.getOrderedStructuralUnits();
 			for (int i = 0 ; i < sus.size() ; i++) {
 				StructuralUnit su = sus.get(i);
 				if (su.getName().equals("txmcorpus")) continue;
 				structsCombo.add(su.getName());
+				
 				if (su.getName().equals("text")) iText = i;
+				if (su.getName().equals("p")) iP = i;
 			}
-			if (structsCombo.getItemCount() > 0) structsCombo.select(iText);
-			
+			if (structsCombo.getItemCount() > 0) {
+				if (iP >= 0) {
+					structsCombo.select(iP+1);
+				} else {
+					structsCombo.select(iText+1);
+				}
+			}
+
 			Button addwordButton = new Button(mainPanel, SWT.PUSH);
 			addwordButton.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
 			addwordButton.setText(TXMUIMessages.addAWord);
@@ -222,6 +245,33 @@
 				}
 			});
 
+			//			Button removeWordButton = new Button(mainPanel, SWT.PUSH);
+			//			removeWordButton.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
+			//			removeWordButton.setText(TXMUIMessages.removeTheLastWord);
+			//			removeWordButton.addSelectionListener(new SelectionListener() {
+			//				@Override
+			//				public void widgetSelected(SelectionEvent e) {
+			//					if (nbwords > 1) {
+			//						removeWordField();
+			//						removeLinkField();
+			//						
+			//						parent.layout(true);
+			//						mainPanel.layout(true);
+			//						wordcontainer.layout(true);
+			//						scrollComposite.layout(true);
+			//						mainPanel.update();
+			//						wordcontainer.update();
+			//						Rectangle r = scrollComposite.getClientArea();
+			//						scrollComposite.setMinSize(wordcontainer.computeSize(r.width, SWT.DEFAULT));
+			//						updateShell();
+			//					}
+			//				}
+			//
+			//				@Override
+			//				public void widgetDefaultSelected(SelectionEvent e) {
+			//				}
+			//			});
+
 		} catch (Exception e) {
 			org.txm.rcp.utils.Logger.printStackTrace(e);
 		}
@@ -241,12 +291,38 @@
 	private void addWordField() {
 		nbwords++;
 		WordField wf = new WordField(wordcontainer, SWT.NONE, nbwords);
+		GridData gd = new GridData(GridData.FILL, GridData.CENTER, false, false);
+		gd.minimumWidth = 200;
+		wf.setLayoutData(gd);
 		wordfields.add(wf);
 
 		wordcontainer.update();
 		mainPanel.update();
 	}
 
+	/**
+	 * remove the last link field.
+	 */
+	protected void removeLinkField() {
+		if (linkfields.size() > 0) {
+			linkfields.remove(linkfields.size()-1).dispose();	
+		}
+	}
+
+	/**
+	 * remove the last word field.
+	 */
+	private void removeWordField() {
+		if (nbwords == 0) return;
+
+		nbwords--;
+
+		wordfields.remove(nbwords).dispose();
+
+		wordcontainer.update();
+		mainPanel.update();
+	}
+
 	/* (non-Javadoc)
 	 * @see org.eclipse.jface.dialogs.Dialog#okPressed()
 	 */
@@ -261,9 +337,17 @@
 			query += lf.getQuery();
 			query += wf.getQuery();
 		}
-		
+
 		if (withinButton != null && withinButton.getSelection() && structsCombo.getText().length() > 0) {
-			query += " within "+structsCombo.getText(); //$NON-NLS-1$
+			query += " within ";
+			
+			if (withinN.getSelection() > 1) {
+				query += ""+withinN.getSelection()+" "; //$NON-NLS-1$
+			}
+			
+			if (!structsCombo.getText().equals("<word>")) {
+				query += structsCombo.getText(); //$NON-NLS-1$
+			}
 		}
 
 		super.okPressed();
@@ -285,23 +369,17 @@
 		return this.query;
 	}
 
-	/**
-	 * The Class WordField.
-	 */
-	public class WordField extends Composite {
-		
+	public class WordPropertyField extends GLComposite {
+
+
 		/** The prop combo. */
 		Combo propCombo;
-		
+
 		/** The test combo. */
 		Combo testCombo;
-		
+
 		/** The value t. */
 		Text valueT;
-		
-		Button targetButton;
-		
-		Button removeButton;
 
 		/**
 		 * Instantiates a new word field.
@@ -310,16 +388,11 @@
 		 * @param style the style
 		 * @param no the no
 		 */
-		public WordField(Composite parent, int style, int no) {
-			super(parent, style);
+		public WordPropertyField(Composite parent, int style, int no) {
+			super(parent, style, ""+no);
 
-			this.setLayout(new GridLayout(5, false));
+			this.getLayout().numColumns = 3;
 
-			Label titleL = new Label(this, SWT.NONE);
-			titleL.setText(NLS.bind(TXMUIMessages.aWordWithItsProperty, no));
-			GridData datalayout = new GridData(GridData.FILL, GridData.CENTER, true, false);
-			titleL.setLayoutData(datalayout);
-
 			propCombo = new Combo(this, SWT.READ_ONLY | SWT.SINGLE);
 			propCombo.setToolTipText("Property to test");
 			if (properties != null) {
@@ -342,11 +415,90 @@
 			gdata.widthHint = 150;
 			gdata.minimumWidth = 150;
 			valueT.setLayoutData(gdata);
-			
+		}
+	}
+
+	/**
+	 * The Class WordField.
+	 */
+	public class WordField extends Composite {
+
+		ArrayList<QueryAssistDialog.WordPropertyField> propertyFields = new ArrayList<QueryAssistDialog.WordPropertyField>();
+//		Combo propertiesAllOrOne;
+
+		Button targetButton;
+
+		Button removeButton;
+		GLComposite propertiesFieldComposite;
+		private Label titleL;
+		private int no;
+
+
+		/**
+		 * Instantiates a new word field.
+		 *
+		 * @param parent the parent
+		 * @param style the style
+		 * @param no the no
+		 */
+		public WordField(Composite parent, int style, int no) {
+			super(parent, style);
+			this.no = no;
+			this.setLayout(new GridLayout(8, false));
+
+			titleL = new Label(this, SWT.NONE);
+
+			GridData datalayout = new GridData(GridData.FILL, GridData.CENTER, true, false);
+			titleL.setLayoutData(datalayout);
+
+			GridData buttonLayout = new GridData(GridData.FILL, GridData.CENTER, false, false);
+			buttonLayout.widthHint=25;
+
+			Button addPropertyButton = new Button(this, SWT.PUSH);
+			addPropertyButton.setLayoutData(buttonLayout);
+			addPropertyButton.setText("+");
+			addPropertyButton.setToolTipText("add a property test");
+			addPropertyButton.addSelectionListener(new SelectionListener() {
+				@Override
+				public void widgetSelected(SelectionEvent e) {
+					addProperty();
+				}
+
+				@Override
+				public void widgetDefaultSelected(SelectionEvent e) { }
+			});
+
+			Button removePropertyButton = new Button(this, SWT.PUSH);
+			removePropertyButton.setLayoutData(buttonLayout);
+			removePropertyButton.setText("-");
+			removePropertyButton.setToolTipText("remove the last property test");
+			removePropertyButton.addSelectionListener(new SelectionListener() {
+				@Override
+				public void widgetSelected(SelectionEvent e) {
+					removeProperty();
+				}
+
+				@Override
+				public void widgetDefaultSelected(SelectionEvent e) { }
+			});
+
+			propertiesFieldComposite = new GLComposite(this, SWT.NONE, "properties");
+			GridData propertiesvlayout = new GridData(GridData.FILL, GridData.CENTER, true, false);
+			propertiesFieldComposite.setLayoutData(propertiesvlayout);
+			propertiesFieldComposite.getLayout().numColumns = 2;
+
+//			propertiesAllOrOne = new Combo(this, SWT.SINGLE-SWT.READ_ONLY);
+//			propertiesAllOrOne.setToolTipText("ALL=all properties test must match / ONE=one property match is enough");
+//			propertiesAllOrOne.add("ALL");
+//			propertiesAllOrOne.add("ONE");
+//			propertiesAllOrOne.select(0);
+//			propertiesAllOrOne.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false));
+
+			addProperty();
+
 			targetButton = new Button(this, SWT.CHECK);
 			targetButton.setToolTipText("Check to target the word in the query");
 			targetButton.addSelectionListener(new SelectionListener() {
-				
 				@Override
 				public void widgetSelected(SelectionEvent e) {
 					if (targetButton.getSelection()) {
@@ -356,46 +508,80 @@
 						targetButton.setSelection(true);
 					}
 				}
-				
+
 				@Override
 				public void widgetDefaultSelected(SelectionEvent e) { }
 			});
-			
-			
-//			removeButton = new Button(this, SWT.PUSH);
-//			removeButton.setImage(IImageKeys.getImage(IImageKeys.ACTION_DELETE));
-//			removeButton.addSelectionListener(new SelectionListener() {
-//				
-//				@Override
-//				public void widgetSelected(SelectionEvent e) {
-//					
-//					int idx = QueryAssistDialog.this.wordfields.indexOf(WordField.this);
-//					System.out.println("field: "+idx);
-//					System.out.println(QueryAssistDialog.this.linkfields);
-//					if (QueryAssistDialog.this.linkfields.size() > 0) {
-//						if (idx > 0) idx--;
-//						LinkField field = QueryAssistDialog.this.linkfields.remove(idx);
-//						field.dispose();
-//					}
-//					QueryAssistDialog.this.wordfields.remove(WordField.this);
-//					QueryAssistDialog.this.nbwords--;
-//					WordField.this.dispose();
-//					
-//					wordcontainer.update();
-//					mainPanel.update();
-//					
-//
-//					QueryAssistDialog.this.parent.layout(true);
-//					QueryAssistDialog.this.mainPanel.layout(true);
-//					QueryAssistDialog.this.wordcontainer.layout(true);
-//					QueryAssistDialog.this.scrollComposite.layout(true);
-//				}
-//				
-//				@Override
-//				public void widgetDefaultSelected(SelectionEvent e) { }
-//			});
+
+
+			removeButton = new Button(this, SWT.PUSH);
+			removeButton.setImage(IImageKeys.getImage(IImageKeys.ACTION_DELETE));
+			removeButton.addSelectionListener(new SelectionListener() {
+
+				@Override
+				public void widgetSelected(SelectionEvent e) {
+					if (nbwords < 2) return;
+
+					int idx = QueryAssistDialog.this.wordfields.indexOf(WordField.this);
+					//					System.out.println("field: "+idx);
+					//					System.out.println(QueryAssistDialog.this.linkfields);
+					if (QueryAssistDialog.this.linkfields.size() > 0) {
+						if (idx > 0) idx--;
+						LinkField field = QueryAssistDialog.this.linkfields.remove(idx);
+						field.dispose();
+					}
+					QueryAssistDialog.this.wordfields.remove(WordField.this);
+					QueryAssistDialog.this.nbwords--;
+					WordField.this.dispose();
+
+					wordcontainer.update();
+					mainPanel.update();
+
+					QueryAssistDialog.this.parent.layout(true);
+					QueryAssistDialog.this.mainPanel.layout(true);
+					QueryAssistDialog.this.wordcontainer.layout(true);
+					QueryAssistDialog.this.scrollComposite.layout(true);
+				}
+
+				@Override
+				public void widgetDefaultSelected(SelectionEvent e) { }
+			});
 		}
 
+		private void addProperty() {
+			WordPropertyField pField = new WordPropertyField(propertiesFieldComposite, SWT.NONE, propertyFields.size());
+			pField.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false, 2, 1));
+			propertyFields.add(pField);
+			updateWidgets();
+		}
+
+		private void removeProperty() {
+			if (propertyFields.size() > 0) {
+				WordPropertyField pField = propertyFields.remove(propertyFields.size()-1);
+				pField.dispose();
+			}
+			updateWidgets();
+		}
+
+		private void updateWidgets() {
+//			propertiesAllOrOne.setEnabled(propertyFields.size() > 1);
+//			propertiesAllOrOne.setVisible(propertyFields.size() > 1);
+//			((GridData)propertiesAllOrOne.getLayoutData()).exclude = propertyFields.size() < 2;
+			if (propertyFields.size() == 0) {
+				titleL.setText(TXMUIMessages.aWord);
+			} else if (propertyFields.size() == 1) {
+				titleL.setText(NLS.bind(TXMUIMessages.aWordWithItsProperty, no));
+			} else {
+				titleL.setText(NLS.bind(TXMUIMessages.aWordWithItsProperties, no));
+			}
+			propertiesFieldComposite.layout();
+			//	this.layout(true);
+			//mainPanel.layout(true);
+			wordcontainer.layout();
+			wordcontainer.update();
+			//mainPanel.update();
+		}
+
 		/**
 		 * Gets the query.
 		 *
@@ -407,15 +593,29 @@
 				query += "@";
 			}
 			query += "["; //$NON-NLS-1$
-			query += propCombo.getItem(propCombo.getSelectionIndex());
-			if (testCombo.getSelectionIndex() == 0)// equals
-				query += "=\"" + valueT.getText().replace("\"", "\\\"") + "\""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-			else if (testCombo.getSelectionIndex() == 1)// starts with
-				query += "=\"" + valueT.getText().replace("\"", "\\\"") + ".*\""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-			else if (testCombo.getSelectionIndex() == 2)// ends with
-				query += "=\".*" + valueT.getText().replace("\"", "\\\"") + "\""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-			else if (testCombo.getSelectionIndex() == 3)// contains
-				query += "=\".*" + valueT.getText().replace("\"", "\\\"") + ".*\""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+
+			int nField = 0;
+			for (WordPropertyField f : propertyFields) {
+				Combo propCombo = f.propCombo;
+				Combo testCombo = f.testCombo;
+				Text valueT = f.valueT;
+				if (nField > 0) {
+					//query += " "+(propertiesAllOrOne.getText().equals("ALL")?"&":"|")+" ";
+					query += " & ";
+				}
+
+				query += propCombo.getItem(propCombo.getSelectionIndex());
+				if (testCombo.getSelectionIndex() == 0)// equals
+					query += "=\"" + valueT.getText().replace("\"", "\\\"") + "\""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+				else if (testCombo.getSelectionIndex() == 1)// starts with
+					query += "=\"" + valueT.getText().replace("\"", "\\\"") + ".*\""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+				else if (testCombo.getSelectionIndex() == 2)// ends with
+					query += "=\".*" + valueT.getText().replace("\"", "\\\"") + "\""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+				else if (testCombo.getSelectionIndex() == 3)// contains
+					query += "=\".*" + valueT.getText().replace("\"", "\\\"") + ".*\""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+
+				nField++;
+			}
 			return query + "]"; //$NON-NLS-1$
 		}
 	}
@@ -424,7 +624,7 @@
 	 * The Class LinkField.
 	 */
 	public class LinkField extends Composite {
-		
+
 		/** The link combo. */
 		Combo linkCombo;
 
@@ -455,9 +655,9 @@
 			if (linkCombo.getSelectionIndex() == 0) // followed
 				return ""; //$NON-NLS-1$
 			else if (linkCombo.getSelectionIndex() == 1)// at least 0 word
-				return "[]{0,50}"; //$NON-NLS-1$
+				return "[]{0,50} "; //$NON-NLS-1$
 			else if (linkCombo.getSelectionIndex() == 2)// at least 1 word
-				return "[]{1, 50}"; //$NON-NLS-1$
+				return "[]{1, 50} "; //$NON-NLS-1$
 			return ""; //$NON-NLS-1$
 		}
 	}
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/corpuswizard/SourceDirectoryPage.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/corpuswizard/SourceDirectoryPage.java	(revision 1519)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/corpuswizard/SourceDirectoryPage.java	(revision 1520)
@@ -13,15 +13,20 @@
 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.graphics.Device;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.DirectoryDialog;
+import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Text;
+import org.txm.rcp.messages.TXMUIMessages;
 import org.txm.rcp.preferences.RCPPreferences;
 import org.txm.utils.AsciiUtils;
+import org.txm.utils.logger.Log;
 
 public class SourceDirectoryPage extends WizardPage {
 	private Text corpusName;
@@ -29,7 +34,7 @@
 	//    private Text descriptionText;
 
 	private Composite container;
-	private Label newOrEdit;
+	private Label newOrEdit, corpusNameLabel;
 
 	public SourceDirectoryPage() {
 		super("Select source directory");
@@ -112,6 +117,9 @@
 		newOrEdit = new Label(container, SWT.NONE);
 		newOrEdit.setLayoutData(GridDataFactory.fillDefaults().span(3, 1).create());
 
+		corpusNameLabel = new Label(container, SWT.NONE);
+		corpusNameLabel.setLayoutData(GridDataFactory.fillDefaults().span(3, 1).create());
+		
 		//        label1 = new Label(container, SWT.NONE);
 		//        label1.setText("Description");
 		//        
@@ -138,6 +146,13 @@
 			} else {
 				newOrEdit.setText(NLS.bind("The ''{0}'' corpus will be created.", getCorpusName()));
 			}
+			
+			String corpusname = corpusName.getText();
+			Log.warning("Checking corpus name validity with '[A-Z][-A-Z0-9]+': "+corpusname);
+			if (!corpusname.matches("[A-Z][-A-Z0-9]+")) { //$NON-NLS-1$
+				newOrEdit.setText(NLS.bind(TXMUIMessages.corpusNameDoesNotMatchesTheAZAZ09120PatternColonP0, corpusname));
+				return false;
+			}
 		}
 
 		return getCorpusName().length() > 0 && getSourcePath().length() > 0;
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages/messages.properties
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages/messages.properties	(revision 1519)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages/messages.properties	(revision 1520)
@@ -90,7 +90,7 @@
 folderP0ShouldNotBeDeleted=Folder {0} should not be deleted
 errorColonElementNotRegistered=** Error\: element not registered
 nextSessionNumber=Next session number
-importStoppedColonCorpusNameDoesNotMatchesTheAZAZ09120PatternColonP0=Import canceled\: the corpus name does not conform to the syntax ''[AZ] [- A-Z0-9] {1,20}''\: {0}.
+corpusNameDoesNotMatchesTheAZAZ09120PatternColonP0=The corpus name does not conform to the syntax ''[AZ] [- A-Z0-9] {1,20}''\: {0}.
 metadataPreview=Metadata preview
 savingImportParameters=Saving import parameters…
 goToParentFolder=Go to parent folder
@@ -144,7 +144,7 @@
 thisDirectorySeemsToContainABinaryCorpus=This folder seems to contain a binary corpus
 theCorpusAndTheCorpusP0WillBeDeleted=The corpus {0} will be deleted.
 addingToSelection=Add to selection
-descriptionHTMLCompleteNameAuthorDateLicenseComment=Description - HTML (complete name, author, date, license, comment…)
+completeNameAuthorDateLicenseComment=Complete name, author, date, license, comment…
 iAcceptTheLicenceAndIUndertakeToCiteTXMForAcknowledgingMyUseOfTXMInMyResearchWorkSeeTheCitationSectionOfTheInfhttpColontextometrieenslyonfrspipphprubrique61SupPage=I accept the licence and I undertake to cite TXM for acknowledging my use of TXM in my research work \n(see the Citation section of the <http\://textometrie.ens-lyon.fr/spip.php?rubrique61> page).
 saveScriptBeforeExecution=Save script before execution
 saveBeforeExecution=Save before execution ?
@@ -475,4 +475,10 @@
 displayInFullText=Display in full text…
 showHideCommandParameters=Show/Hide command parameters
 startsWith=starts with
-withinStructure=within structure
\ No newline at end of file
+withinStructure=within structure
+description=Description
+descriptionOfTheP0CorpusP1=Description of the {0} corpus ({1})
+aWord=a word
+aWordWithItsProperties=a word with properties
+removeTheLastWord=Remove the last word
+withinAContextOf=within a context of
\ No newline at end of file
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages/messages_fr.properties
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages/messages_fr.properties	(revision 1519)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages/messages_fr.properties	(revision 1520)
@@ -92,7 +92,7 @@
 errorColonElementNotRegistered=** Erreur \: élément non enregistré 
 nextSessionNumber=Numéro de session suivant
 metadataPreview=Aperçu des métadonnées
-importStoppedColonCorpusNameDoesNotMatchesTheAZAZ09120PatternColonP0=Importation annulée \: le nom du corpus n'est pas conforme à la syntaxe ‘''[AZ] [- A-Z0-9] {1,20}''\: {0}.
+corpusNameDoesNotMatchesTheAZAZ09120PatternColonP0=Le nom du corpus n'est pas conforme à la syntaxe ‘''[AZ] [- A-Z0-9] {1,20}''\: {0}.
 goToParentFolder=Aller au dossier parent
 savingImportParameters=Sauvegarde des paramètres d'importation…
 leftContextSize=Taille du contexte gauche
@@ -145,7 +145,7 @@
 thisDirectorySeemsToContainABinaryCorpus=Ce dossier semble contenir un corpus au format binaire
 theCorpusAndTheCorpusP0WillBeDeleted=Le corpus {0} va être supprimé.
 addingToSelection=Ajouter à la sélection
-descriptionHTMLCompleteNameAuthorDateLicenseComment=Description - HTML (nom complet, auteur, date, licence, commentaire…)
+completeNameAuthorDateLicenseComment=Nom complet, auteur, date, licence, commentaire…
 iAcceptTheLicenceAndIUndertakeToCiteTXMForAcknowledgingMyUseOfTXMInMyResearchWorkSeeTheCitationSectionOfTheInfhttpColontextometrieenslyonfrspipphprubrique61SupPage=J'accepte la licence et je m'engage à citer TXM dans mes travaux de recherche \n(voir la section 'Citation de TXM' de la page <http\://textometrie.ens-lyon.fr/spip.php?rubrique61>)
 saveScriptBeforeExecution=Enregistrer le script avant l'exécution
 saveBeforeExecution=Enregistrer avant l'exécution ?
@@ -476,4 +476,10 @@
 displayInFullText=Afficher en plein texte…
 showHideCommandParameters=Afficher/Masquer les paramètres de commande
 startsWith=commence par
-withinStructure=limité aux structures
\ No newline at end of file
+withinStructure=limité aux structures
+description=Description
+descriptionOfTheP0CorpusP1=Description du corpus {0} ({1})
+aWord=un mot
+aWordWithItsProperties=un mot avec les propriétés
+removeTheLastWord=Retirer le dernier mot
+withinAContextOf=dans un context de
\ No newline at end of file
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages/TXMUIMessages.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages/TXMUIMessages.java	(revision 1519)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages/TXMUIMessages.java	(revision 1520)
@@ -223,8 +223,8 @@
 	public static String deleteParameter; 
 	public static String generalInformations; 
 	public static String corpusNameOnlyCapsAndNoDigitAtBeginning; 
-	public static String importStoppedColonCorpusNameDoesNotMatchesTheAZAZ09120PatternColonP0; 
-	public static String descriptionHTMLCompleteNameAuthorDateLicenseComment; 
+	public static String corpusNameDoesNotMatchesTheAZAZ09120PatternColonP0; 
+	public static String completeNameAuthorDateLicenseComment; 
 	public static String newFileColonP0; 
 	public static String newFolderColonP0; 
 	public static String macroName; 
@@ -549,9 +549,30 @@
 
 
 
-	public static String withinStructure; 
+	public static String withinStructure;
 
 
+
+	public static String description;
+
+
+
+	public static String descriptionOfTheP0CorpusP1;
+
+
+
+	public static String aWord;
+	public static String aWordWithItsProperties;
+
+
+
+	public static String removeTheLastWord;
+
+
+
+	public static String withinAContextOf; 
+
+
 	
 	static {
 		// initialize resource bundle
Index: tmp/org.txm.core/src/java/org/txm/objects/Workspace.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/objects/Workspace.java	(revision 1519)
+++ tmp/org.txm.core/src/java/org/txm/objects/Workspace.java	(revision 1520)
@@ -236,7 +236,7 @@
 				rcpProject.open(new LogMonitor());
 			}
 			
-			Project.loadProjectsFromProjectScope(rcpProject);
+			Project.loadProjectFromProjectScope(rcpProject);
 			
 			Project b = this.getProject(binCorpusDir.getName());
 			
@@ -375,7 +375,7 @@
 		for (IProject project : projects) {
 			try {
 				project.open(monitor);
-				Project.loadProjectsFromProjectScope(project);
+				Project.loadProjectFromProjectScope(project);
 			} catch (CoreException e) {
 				// TODO Auto-generated catch block
 				e.printStackTrace();
Index: tmp/org.txm.core/src/java/org/txm/objects/Project.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/objects/Project.java	(revision 1519)
+++ tmp/org.txm.core/src/java/org/txm/objects/Project.java	(revision 1520)
@@ -388,7 +388,7 @@
 				String className = TXMPreferences.preferencesRootNode.node(parametersNodePath).get("class", ""); //$NON-NLS-1$
 
 				// Skip Project object
-				if(className.equals(Project.class.getName()))	{
+				if(className.equals(Project.class.getName()))	{ // already loaded in loadProjectFromProjectScope
 					continue;
 				}
 
@@ -1152,7 +1152,7 @@
 	 * 
 	 * @param rcpProject
 	 */
-	public static void loadProjectsFromProjectScope(IProject rcpProject) {
+	public static void loadProjectFromProjectScope(IProject rcpProject) {
 		//IScopeContext projectScope = new ProjectScope(projects[i]);
 		ArrayList<String> resultNodePaths = TXMPreferences.getAllResultsNodePaths("/project/" + rcpProject.getName() + "/");
 
@@ -1172,8 +1172,7 @@
 
 				String className = TXMPreferences.preferencesRootNode.node(parametersNodePath).get("class", ""); //$NON-NLS-1$
 
-				if(!className.equals(Project.class.getName()))	{ // already constructed
-					//	Log.finest("Toolbox.initialize(): not a project, result skipped (classame = " + className + ").");
+				if(!className.equals(Project.class.getName()))	{ // only load Project class
 					continue;
 				}
 
