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 1491)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/dialog/QueryAssistDialog.java	(revision 1492)
@@ -171,30 +171,32 @@
 
 			addWordField();
 
-//			Composite withinComposite = new Composite(mainPanel, SWT.NONE);
-//			withinComposite.setLayout(new GridLayout(2, false));
-//			withinButton = new Button(withinComposite, SWT.CHECK);
-//			withinButton.setText("within structure: ");
-//			withinButton.addSelectionListener(new SelectionListener() {
-//				@Override
-//				public void widgetSelected(SelectionEvent e) {
-//					structsCombo.setEnabled(withinButton.getSelection());
-//				}
-//				
-//				@Override
-//				public void widgetDefaultSelected(SelectionEvent e) { }
-//			});
-//			structsCombo = new Combo(withinComposite, SWT.READ_ONLY);
-//			structsCombo.setEnabled(false);
-//			int iText = 0;
-//			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 (structsCombo.getItemCount() > 0) structsCombo.select(iText);
+			Composite withinComposite = new Composite(mainPanel, SWT.NONE);
+			withinComposite.setLayout(new GridLayout(2, false));
+			withinButton = new Button(withinComposite, SWT.CHECK);
+			withinButton.setText("within structure: ");
+			withinButton.setToolTipText("Check to add structure contraint");
+			withinButton.addSelectionListener(new SelectionListener() {
+				@Override
+				public void widgetSelected(SelectionEvent e) {
+					structsCombo.setEnabled(withinButton.getSelection());
+				}
+				
+				@Override
+				public void widgetDefaultSelected(SelectionEvent e) { }
+			});
+			structsCombo = new Combo(withinComposite, SWT.READ_ONLY);
+			structsCombo.setToolTipText("The available structures");
+			structsCombo.setEnabled(false);
+			int iText = 0;
+			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 (structsCombo.getItemCount() > 0) structsCombo.select(iText);
 			
 			Button addwordButton = new Button(mainPanel, SWT.PUSH);
 			addwordButton.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
@@ -253,11 +255,11 @@
 		this.query = ""; //$NON-NLS-1$
 		this.query = wordfields.get(0).getQuery();
 		for (int i = 1; i < wordfields.size(); i++) {
+			query += " "; //$NON-NLS-1$
 			LinkField lf = linkfields.get(i - 1);
 			WordField wf = wordfields.get(i);
 			query += lf.getQuery();
 			query += wf.getQuery();
-			query += " "; //$NON-NLS-1$
 		}
 		
 		if (withinButton != null && withinButton.getSelection() && structsCombo.getText().length() > 0) {
@@ -297,6 +299,8 @@
 		/** The value t. */
 		Text valueT;
 		
+		Button targetButton;
+		
 		Button removeButton;
 
 		/**
@@ -313,11 +317,11 @@
 
 			Label titleL = new Label(this, SWT.NONE);
 			titleL.setText(NLS.bind(TXMUIMessages.aWordWithItsProperty, no));
-			GridData datalayout = new GridData(GridData.FILL, GridData.CENTER,
-					true, false);
+			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) {
 				for (Property p : properties)
 					propCombo.add(p.getName());
@@ -325,6 +329,7 @@
 			}
 
 			testCombo = new Combo(this, SWT.READ_ONLY | SWT.SINGLE);
+			testCombo.setToolTipText("Test to do");
 			testCombo.add(TXMUIMessages.equalsTo);
 			testCombo.add(TXMUIMessages.startsWith);
 			testCombo.add(TXMUIMessages.endsWith);
@@ -332,10 +337,31 @@
 			testCombo.select(0);
 
 			valueT = new Text(this, SWT.SINGLE | SWT.BORDER);
+			valueT.setToolTipText("The word property value");
 			GridData gdata = new GridData(GridData.FILL, GridData.FILL, false, false);
 			gdata.widthHint = 150;
 			gdata.minimumWidth = 150;
 			valueT.setLayoutData(gdata);
+			
+			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()) {
+						for (WordField wf : wordfields) {
+							wf.targetButton.setSelection(false);
+						}
+						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() {
@@ -376,7 +402,11 @@
 		 * @return the query
 		 */
 		public String getQuery() {
-			String query = "["; //$NON-NLS-1$
+			String query = "";
+			if (targetButton.getSelection()) {
+				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$
