Index: TXM/trunk/bundles/org.txm.treesearch.rcp/OSGI-INF/l10n/bundle.properties
===================================================================
--- TXM/trunk/bundles/org.txm.treesearch.rcp/OSGI-INF/l10n/bundle.properties	(revision 3744)
+++ TXM/trunk/bundles/org.txm.treesearch.rcp/OSGI-INF/l10n/bundle.properties	(revision 3745)
@@ -3,9 +3,9 @@
 
 category.name = Syntactic annotations
 
-command.label  = Send To Syntactic tree
+command.label  = See the Syntactic Tree
 command.name   = Syntactic Tree
-command.name.0 = Syntactic Tree concordance link
+command.name.0 = See the Syntactic Tree
 
 editor.name = Syntactic Tree
 
Index: TXM/trunk/bundles/org.txm.treesearch.rcp/OSGI-INF/l10n/bundle_fr.properties
===================================================================
--- TXM/trunk/bundles/org.txm.treesearch.rcp/OSGI-INF/l10n/bundle_fr.properties	(revision 3744)
+++ TXM/trunk/bundles/org.txm.treesearch.rcp/OSGI-INF/l10n/bundle_fr.properties	(revision 3745)
@@ -3,9 +3,9 @@
 
 category.name = Annotations syntaxiques
 
-command.label  = Envoyer vers l'arbre syntaxique
+command.label  = Afficher l'arbre syntaxique
 command.name   = Syntactic Tree
-command.name.0 = Lien vers l'arbre syntaxique
+command.name.0 = Afficher l'arbre syntaxique
 
 editor.name = Arbre syntaxique
 
Index: TXM/trunk/bundles/org.txm.rcp/src/main/java/org/txm/rcp/actions/CreateSubcorpusDialog.java
===================================================================
--- TXM/trunk/bundles/org.txm.rcp/src/main/java/org/txm/rcp/actions/CreateSubcorpusDialog.java	(revision 3744)
+++ TXM/trunk/bundles/org.txm.rcp/src/main/java/org/txm/rcp/actions/CreateSubcorpusDialog.java	(revision 3745)
@@ -51,6 +51,7 @@
 import org.txm.rcp.swt.widget.ComplexSubcorpusPanel;
 import org.txm.rcp.swt.widget.QueryWidget;
 import org.txm.rcp.swt.widget.structures.SimpleSubcorpusPanel;
+import org.txm.searchengine.cqp.CQPSearchEngine;
 import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
 import org.txm.searchengine.cqp.corpus.CQPCorpus;
 import org.txm.searchengine.cqp.corpus.StructuralUnit;
@@ -196,7 +197,7 @@
 		advancedPartLabel.setText(TXMUIMessages.ampQuery);
 		advancedPartLabel.setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false));
 		
-		queryText = new QueryWidget(compositeForAdvanced, SWT.DROP_DOWN, corpus.getProject(), null);
+		queryText = new QueryWidget(compositeForAdvanced, SWT.DROP_DOWN, corpus.getProject(), CQPSearchEngine.getEngine());
 		queryText.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
 		GridData gridData = new GridData(GridData.FILL, GridData.CENTER, true, false);
 		gridData.widthHint = convertHeightInCharsToPixels(20);
Index: TXM/trunk/bundles/org.txm.rcp/src/main/java/org/txm/rcp/actions/CreatePartitionDialog.java
===================================================================
--- TXM/trunk/bundles/org.txm.rcp/src/main/java/org/txm/rcp/actions/CreatePartitionDialog.java	(revision 3744)
+++ TXM/trunk/bundles/org.txm.rcp/src/main/java/org/txm/rcp/actions/CreatePartitionDialog.java	(revision 3745)
@@ -65,6 +65,7 @@
 import org.txm.rcp.messages.TXMUIMessages;
 import org.txm.rcp.swt.widget.PartitionComposer;
 import org.txm.rcp.swt.widget.QueryWidget;
+import org.txm.searchengine.cqp.CQPSearchEngine;
 import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
 import org.txm.searchengine.cqp.corpus.CQPCorpus;
 import org.txm.searchengine.cqp.corpus.Partition;
@@ -524,7 +525,7 @@
 		partNames.add(advancedPartLabel);
 		
 		final QueryWidget queryText;
-		queryText = new QueryWidget(compositeForAdvanced, SWT.DROP_DOWN, corpus.getProject(), null);
+		queryText = new QueryWidget(compositeForAdvanced, SWT.DROP_DOWN, corpus.getProject(), CQPSearchEngine.getEngine());
 		queryText.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
 		GridData gridData = new GridData(GridData.FILL, GridData.FILL, true, false);
 		// gridData.widthHint = convertHeightInCharsToPixels(20);
Index: TXM/trunk/bundles/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/QueryOptionsDialog.java
===================================================================
--- TXM/trunk/bundles/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/QueryOptionsDialog.java	(revision 3744)
+++ TXM/trunk/bundles/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/QueryOptionsDialog.java	(revision 3745)
@@ -51,6 +51,7 @@
 import org.eclipse.swt.widgets.Shell;
 import org.txm.rcp.swt.provider.SimpleLabelProvider;
 import org.txm.searchengine.core.SearchEngine;
+import org.txm.searchengine.core.SearchEnginesManager;
 import org.txm.searchengine.cqp.corpus.CQPCorpus;
 
 /**
@@ -77,7 +78,7 @@
 	private SearchEngine selectedEngine;
 	
 	/** The default value. */
-	private String defaultValue;
+	private SearchEngine defaultValue;
 	
 	/** The title. */
 	private String title;
@@ -93,7 +94,7 @@
 
 	private Group optionsGroup;
 	
-	public QueryOptionsDialog(Shell parentShell, CQPCorpus corpus, List<SearchEngine> engines2, String defaultValue) {
+	public QueryOptionsDialog(Shell parentShell, CQPCorpus corpus, List<SearchEngine> engines2, SearchEngine defaultValue) {
 		super(parentShell);
 		
 		this.corpus = corpus;
@@ -126,7 +127,13 @@
 	protected void configureShell(Shell newShell) {
 		super.configureShell(newShell);
 		newShell.setText(title);
+		newShell.setSize(400, 400);
 	}
+	
+	@Override
+	protected boolean isResizable() {
+	    return true;
+	}
 
 	/* (non-Javadoc)
 	 * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
@@ -145,7 +152,7 @@
 		l.setText("Select between the following engines");
 		l.setLayoutData(new GridData(GridData.BEGINNING, GridData.CENTER, false, false, 1, 1));
 		combo = new ComboViewer(new Combo(p, SWT.READ_ONLY | SWT.SINGLE));
-		combo.getCombo().setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true, 1, 1));
+		combo.getCombo().setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false, 1, 1));
 		//combo.setItems(values.toArray(new String[] {}));
 		combo.getCombo().addSelectionListener(new SelectionListener() {
 			
@@ -185,6 +192,7 @@
 			selectValue(defaultValue);
 		}
 		
+		
 		updateOptions();
 		
 		return p;
@@ -213,20 +221,23 @@
 			for (final SearchEngine se : options.get(selectedEngine.getName())) {
 				Button option = new Button(optionsGroup, SWT.RADIO);
 				option.setText(se.getOptionNameForSearchengine()+ " : " + se.getOptionDescriptionForSearchengine());
-				if (se.getName().equals(defaultValue)) {
+				if (se.equals(defaultValue)) {
 					option.setSelection(true);
-					option.addSelectionListener(new SelectionListener() {
-						
-						@Override
-						public void widgetSelected(SelectionEvent e) {
-							selectedEngine = se;
-						}
-						
-						@Override
-						public void widgetDefaultSelected(SelectionEvent e) { }
-					});
 					noneOption.setSelection(false);
+					selectedEngine = defaultValue;
 				}
+				
+				option.addSelectionListener(new SelectionListener() {
+					
+					@Override
+					public void widgetSelected(SelectionEvent e) {
+						selectedEngine = se;
+					}
+					
+					@Override
+					public void widgetDefaultSelected(SelectionEvent e) { }
+				});
+				
 			}
 		}
 		optionsGroup.layout();
@@ -246,11 +257,17 @@
 	 *
 	 * @param string the string
 	 */
-	public void selectValue(String string) {
-		for (int i = 0; i < values.size(); i++)
-			if (values.get(i).getName().equals(string)) {
-				combo.setSelection(new StructuredSelection(values.get(i)));
-				break;
+	public void selectValue(SearchEngine e) {
+		
+		if (values.contains(e)) {
+			combo.setSelection(new StructuredSelection(e));
+		} else {
+			SearchEngine optionedengine = SearchEnginesManager.getSearchEngine(e.getOptionForSearchengine());
+			if (optionedengine != null) {
+				combo.setSelection(new StructuredSelection(optionedengine));
+			} else {
+				System.out.println("ERROR: engine not found: "+e.getOptionForSearchengine());
 			}
+		}
 	}
 }
Index: TXM/trunk/bundles/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/QueryWidget.java
===================================================================
--- TXM/trunk/bundles/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/QueryWidget.java	(revision 3744)
+++ TXM/trunk/bundles/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/QueryWidget.java	(revision 3745)
@@ -69,6 +69,9 @@
 		
 		super(parent, style);
 		this.se = se;
+		if (se == null) {
+			System.out.println("WARNING");
+		}
 		this.project = project;
 
 		loadHistory();
Index: TXM/trunk/bundles/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/NamedAssistedQueryWidget.java
===================================================================
--- TXM/trunk/bundles/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/NamedAssistedQueryWidget.java	(revision 3744)
+++ TXM/trunk/bundles/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/NamedAssistedQueryWidget.java	(revision 3745)
@@ -42,6 +42,7 @@
 import org.txm.rcp.IImageKeys;
 import org.txm.rcp.messages.TXMUIMessages;
 import org.txm.rcp.swt.dialog.QueryAssistDialog;
+import org.txm.searchengine.cqp.CQPSearchEngine;
 import org.txm.searchengine.cqp.corpus.CQPCorpus;
 
 
@@ -92,15 +93,13 @@
 				if (d.open() == Window.OK) {
 					querywidget.setText(d.getQuery());
 				}
-
 			}
 
 			@Override
-			public void widgetDefaultSelected(SelectionEvent e) {
-			}
+			public void widgetDefaultSelected(SelectionEvent e) { }
 		});
 		
-		querywidget = new QueryWidget(this, style, corpus.getProject(), null);
+		querywidget = new QueryWidget(this, style, corpus.getProject(), CQPSearchEngine.getEngine());
 		querywidget.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, true));
 	}
 
Index: TXM/trunk/bundles/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/QueryField.java
===================================================================
--- TXM/trunk/bundles/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/QueryField.java	(revision 3744)
+++ TXM/trunk/bundles/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/QueryField.java	(revision 3745)
@@ -8,12 +8,14 @@
 import org.kohsuke.args4j.NamedOptionDef;
 import org.txm.rcp.swt.widget.QueryWidget;
 import org.txm.searchengine.core.IQuery;
+import org.txm.searchengine.cqp.CQPSearchEngine;
 
 public class QueryField extends ParameterField {
 	QueryWidget w;
 	
 	public QueryField(Composite parent, int style, NamedOptionDef parameter) {
 		super(parent, style, parameter);
+		
 		this.setLayout(new GridLayout(2, false));
 		this.setLayoutData(new GridData(GridData.FILL, GridData.BEGINNING, true, false));
 
@@ -25,7 +27,7 @@
 		gd.widthHint = 100;
 		l.setLayoutData(gd);
 
-		w = new QueryWidget(this, SWT.BORDER, null, null);
+		w = new QueryWidget(this, SWT.BORDER, null, CQPSearchEngine.getEngine());
 		w.setLayoutData(new GridData(SWT.FILL, SWT.LEFT, true, false));
 		resetToDefault();
 	}
Index: TXM/trunk/bundles/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/AssistedChoiceQueryWidget.java
===================================================================
--- TXM/trunk/bundles/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/AssistedChoiceQueryWidget.java	(revision 3744)
+++ TXM/trunk/bundles/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/AssistedChoiceQueryWidget.java	(revision 3745)
@@ -133,7 +133,7 @@
 				@Override
 				public void widgetSelected(SelectionEvent e) {
 
-					QueryOptionsDialog dialog = new QueryOptionsDialog(e.display.getActiveShell(), corpus, engines, querywidget.getSearchEngine().getName()); //$NON-NLS-1$
+					QueryOptionsDialog dialog = new QueryOptionsDialog(e.display.getActiveShell(), corpus, engines, querywidget.getSearchEngine()); //$NON-NLS-1$
 					if (dialog.open() == ComboDialog.OK) {
 						SearchEngine se = dialog.getSelectedEngine();
 						if (se != null && !se.getName().equals(querywidget.getSearchEngine().getName())) {
Index: TXM/trunk/bundles/org.txm.rcp/src/main/java/org/txm/rcp/views/cmdparameters/TXMResultParametersView.java
===================================================================
--- TXM/trunk/bundles/org.txm.rcp/src/main/java/org/txm/rcp/views/cmdparameters/TXMResultParametersView.java	(revision 3744)
+++ TXM/trunk/bundles/org.txm.rcp/src/main/java/org/txm/rcp/views/cmdparameters/TXMResultParametersView.java	(revision 3745)
@@ -66,6 +66,7 @@
 import org.txm.rcp.swt.widget.QueryWidget;
 import org.txm.rcp.swt.widget.ReferencePatternSelector;
 import org.txm.searchengine.core.IQuery;
+import org.txm.searchengine.cqp.CQPSearchEngine;
 import org.txm.searchengine.cqp.ReferencePattern;
 import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
 import org.txm.searchengine.cqp.corpus.CQPCorpus;
@@ -281,7 +282,7 @@
 				c = sp;
 			}
 			else if (clazz.equals(IQuery.class)) {
-				final QueryWidget qw = new QueryWidget(panel, SWT.NONE, null, null);
+				final QueryWidget qw = new QueryWidget(panel, SWT.NONE, result.getProject(), CQPSearchEngine.getEngine());
 				if (value != null) {
 					qw.setText(((IQuery) value).getQueryString());
 				}
@@ -297,7 +298,6 @@
 							}
 						}
 						catch (Exception e1) {
-							// TODO Auto-generated catch block
 							e1.printStackTrace();
 						}
 					}
@@ -320,7 +320,6 @@
 							}
 						}
 						catch (Exception e1) {
-							// TODO Auto-generated catch block
 							e1.printStackTrace();
 						}
 					}
@@ -379,14 +378,9 @@
 										activated.compute(false);
 									}
 								}
-								catch (IllegalArgumentException e1) {
-									// TODO Auto-generated catch block
+								catch (Exception e1) {
 									e1.printStackTrace();
 								}
-								catch (IllegalAccessException e1) {
-									// TODO Auto-generated catch block
-									e1.printStackTrace();
-								}
 							}
 						}
 					}
@@ -480,14 +474,9 @@
 					try {
 						f.set(result, p);
 					}
-					catch (IllegalArgumentException e1) {
-						// TODO Auto-generated catch block
+					catch (Exception e1) {
 						e1.printStackTrace();
 					}
-					catch (IllegalAccessException e1) {
-						// TODO Auto-generated catch block
-						e1.printStackTrace();
-					}
 					activated.compute(false);
 				}
 			}
@@ -520,7 +509,6 @@
 						f.set(result, selected);
 					}
 					catch (Exception e1) {
-						// TODO Auto-generated catch block
 						e1.printStackTrace();
 					}
 					activated.compute(false);
@@ -553,7 +541,6 @@
 						f.set(result, selected);
 					}
 					catch (Exception e1) {
-						// TODO Auto-generated catch block
 						e1.printStackTrace();
 					}
 					activated.compute(false);
@@ -605,7 +592,6 @@
 			updateEditorParameters();
 		}
 		catch (Exception e) {
-			// TODO Auto-generated catch block
 			e.printStackTrace();
 		}
 	}
@@ -616,10 +602,12 @@
 		if (part == null)
 			return;
 		// System.out.println("partActivated: "+part);
-		if (part instanceof TXMEditor)
+		if (part instanceof TXMEditor) {
 			activated = (TXMEditor) part;
-		if (activated == null)
+		}
+		if (activated == null) {
 			return;
+		}
 		activated.addPropertyListener(this);
 		recompute.setEnabled(true);
 		// activated.addPartPropertyListener(this);
@@ -627,7 +615,6 @@
 			updateEditorParameters();
 		}
 		catch (Exception e) {
-			// TODO Auto-generated catch block
 			e.printStackTrace();
 		}
 	}
@@ -635,22 +622,23 @@
 	@Override
 	public void partBroughtToTop(IWorkbenchPart part) {
 		
-		if (part == null)
+		if (part == null) {
 			return;
+		}
 	}
 	
 	@Override
 	public void partClosed(IWorkbenchPart part) {
 		
-		if (part == null)
+		if (part == null) {
 			return;
+		}
 		if (part == activated) {
 			activated = null;
 			try {
 				updateEditorParameters();
 			}
 			catch (Exception e) {
-				// TODO Auto-generated catch block
 				e.printStackTrace();
 			}
 		}
