Index: tmp/org.txm.edition.rcp/src/org/txm/edition/rcp/editors/SearchEditionToolbar.java
===================================================================
--- tmp/org.txm.edition.rcp/src/org/txm/edition/rcp/editors/SearchEditionToolbar.java	(revision 0)
+++ tmp/org.txm.edition.rcp/src/org/txm/edition/rcp/editors/SearchEditionToolbar.java	(revision 3019)
@@ -0,0 +1,138 @@
+package org.txm.edition.rcp.editors;
+
+import java.util.List;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.txm.objects.Match;
+import org.txm.rcp.IImageKeys;
+import org.txm.rcp.swt.widget.AssistedChoiceQueryWidget;
+import org.txm.rcp.swt.widget.NewNavigationWidget;
+import org.txm.searchengine.core.IQuery;
+import org.txm.searchengine.core.Selection;
+import org.txm.searchengine.cqp.corpus.MainCorpus;
+import org.txm.searchengine.cqp.corpus.QueryResult;
+import org.txm.searchengine.cqp.corpus.query.CQLQuery;
+import org.txm.utils.logger.Log;
+
+public class SearchEditionToolbar {
+	
+	private GridData searchGdata;
+	
+	private AssistedChoiceQueryWidget searchText;
+	
+	/**
+	 * search result
+	 */
+	protected Selection searchResult;
+	
+	/**
+	 * search result index
+	 */
+	protected int searchIndex;
+	
+	private NewNavigationWidget searchNagigation;
+	
+	private GridData searchGdata2;
+	
+	Composite lowerControlsArea;
+	
+	MainCorpus mcorpus;
+	
+	SynopticEditionEditor editor;
+	
+	public void init(Composite lowerControlsArea, MainCorpus mcorpus, SynopticEditionEditor editor) {
+		
+		this.lowerControlsArea = lowerControlsArea;
+		this.mcorpus = mcorpus;
+		this.editor = editor;
+		
+		Button searchButton = new Button(lowerControlsArea, SWT.PUSH);
+		searchButton.setImage(IImageKeys.getImage(IImageKeys.ACTION_SEARCH));
+		searchButton.addSelectionListener(new SelectionListener() {
+			
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				if (searchGdata.widthHint == 0) {
+					searchGdata.minimumWidth = searchGdata.widthHint = 250;
+					searchGdata2.minimumWidth = searchGdata2.widthHint = 250;
+					lowerControlsArea.layout();
+				}
+				else if (searchText.getQuery() != null) {
+					Log.info("Searching " + searchText.getQuery());
+					IQuery q = searchText.getQuery();
+					try {
+						Selection tmp = q.getSearchEngine().query(mcorpus, q, "SEARCH", false);
+						if (tmp.getNMatch() > 0) {
+							searchResult = tmp;
+							
+							searchIndex = 0;
+							String wordid = editor.getEditionPanel(0).getCurrentPage().getWordId();
+							String text = editor.getEditionPanel(0).getCurrentPage().getEdition().getText().getName();
+							if (wordid != null && text != null) {
+								QueryResult rez2 = mcorpus.query(new CQLQuery("[_.text_id=\"" + text + "\" & id=\"" + wordid + "\"]"), "SEARCHINIT", false);
+								if (rez2.getNMatch() > 0) {
+									int p = rez2.getMatch(0).getStart();
+									List<? extends Match> matches = searchResult.getMatches();
+									for (int i = 0; i < matches.size(); i++) {
+										if (p < matches.get(i).getStart()) {
+											searchIndex = i - 1; // previous index was the one
+											break;
+										}
+									}
+								}
+							}
+							searchNagigation.setEnabled(true);
+							searchNagigation.setCurrentPosition(searchIndex);
+							searchNagigation.setMinPosition(1);
+							searchNagigation.setMaxPosition(tmp.getNMatch());
+							searchNagigation.refresh();
+							Log.info("" + searchResult.getNMatch() + " matches.");
+						}
+					}
+					catch (Exception e1) {
+						// TODO Auto-generated catch block
+						e1.printStackTrace();
+					}
+				}
+			}
+			
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {}
+		});
+		
+		searchText = new AssistedChoiceQueryWidget(lowerControlsArea, SWT.NONE, mcorpus);
+		searchGdata = new GridData(GridData.CENTER, GridData.FILL, false, false);
+		searchGdata.minimumWidth = 0;
+		searchGdata.widthHint = 0;
+		searchText.setLayoutData(searchGdata);
+		
+		searchNagigation = new NewNavigationWidget(lowerControlsArea, SWT.NONE) {
+			
+			@Override
+			public void refresh() {
+				super.refresh();
+				searchIndex = this.getCurrentPosition();
+				showCurrentSearchMatch();
+				// Log.info("showing the " + index + " match.");
+			}
+		};
+		searchGdata2 = new GridData(GridData.CENTER, GridData.FILL, false, false);
+		searchGdata2.minimumWidth = 0;
+		searchGdata2.widthHint = 0;
+		searchNagigation.setLayoutData(searchGdata2);
+		searchNagigation.setEnabled(false);
+	}
+	
+	protected void showCurrentSearchMatch() {
+		if (searchResult != null && searchIndex >= 0) {
+			String text = "";
+			String wordid = "";
+			editor.getEditionPanel(0).backToText(editor.getResult().getProject().getText(text), wordid);
+		}
+	}
+}

Property changes on: tmp/org.txm.edition.rcp/src/org/txm/edition/rcp/editors/SearchEditionToolbar.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.edition.rcp/src/org/txm/edition/rcp/editors/SynopticEditionEditor.java
===================================================================
--- tmp/org.txm.edition.rcp/src/org/txm/edition/rcp/editors/SynopticEditionEditor.java	(revision 3018)
+++ tmp/org.txm.edition.rcp/src/org/txm/edition/rcp/editors/SynopticEditionEditor.java	(revision 3019)
@@ -115,7 +115,7 @@
 	private Button editionsChooser;
 	
 	// private Label editionsLabel;
-	private GLComposite controlsArea;
+	private GLComposite lowerControlsArea;
 	
 	// private GLComposite annotationWidgetsArea;
 	// private TXMEditorToolBar supplementaryButtonToolbar;
@@ -374,7 +374,7 @@
 	// }
 	
 	public Composite getLowerToolbarArea() {
-		return controlsArea;
+		return lowerControlsArea;
 	}
 	
 	@Override
@@ -385,10 +385,10 @@
 		
 		editionsArea = getResultArea();
 		
-		controlsArea = getBottomToolbar().installGLComposite(EditionUIMessages.controls, 15, false);
-		controlsArea.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
+		lowerControlsArea = getBottomToolbar().installGLComposite(EditionUIMessages.controls, 15, false);
+		lowerControlsArea.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
 		// spacer
-		new Label(controlsArea, SWT.NONE).setText("  "); //$NON-NLS-1$
+		new Label(lowerControlsArea, SWT.NONE).setText("  "); //$NON-NLS-1$
 		
 		// annotationWidgetsArea = new GLComposite(getBetweenTopToolbarsAndResultComposite(), SWT.NONE, "Edition annotation area");
 		// this.annotationWidgetsArea.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
@@ -396,7 +396,7 @@
 		// supplementaryButtonToolbar = new TXMEditorToolBar(this, getTopToolbarContainer(), annotationWidgetsArea, SWT.NONE, "annotation urs");
 		
 		// Edition names label
-		editionsChooser = new Button(controlsArea, SWT.PUSH);
+		editionsChooser = new Button(lowerControlsArea, SWT.PUSH);
 		editionsChooser.setText(StringUtils.join(editionNames, " | ")); //$NON-NLS-1$
 		
 		if (mainCorpus.getProject().getBuiltEditionNames().size() > 1) {
@@ -441,7 +441,7 @@
 		}
 		
 		// Navigation buttons
-		GLComposite pageNavigationComposite = new GLComposite(controlsArea, SWT.NONE, EditionUIMessages.pageButtons);
+		GLComposite pageNavigationComposite = new GLComposite(lowerControlsArea, SWT.NONE, EditionUIMessages.pageButtons);
 		pageNavigationComposite.getLayout().numColumns = 6;
 		pageNavigationComposite.getLayout().horizontalSpacing = 1;
 		Button first = new Button(pageNavigationComposite, SWT.FLAT | SWT.PUSH);
@@ -452,7 +452,7 @@
 		Button last = new Button(pageNavigationComposite, SWT.FLAT | SWT.PUSH);
 		pageNavigationComposite.setLayoutData(new GridData(GridData.CENTER, GridData.FILL, true, false));
 		
-		GLComposite textNavigationComposite = new GLComposite(controlsArea, SWT.NONE, EditionUIMessages.textButtons);
+		GLComposite textNavigationComposite = new GLComposite(lowerControlsArea, SWT.NONE, EditionUIMessages.textButtons);
 		textNavigationComposite.getLayout().numColumns = 7;
 		textNavigationComposite.getLayout().horizontalSpacing = 1;
 		Button firstText = new Button(textNavigationComposite, SWT.FLAT);
@@ -754,7 +754,7 @@
 			// e1.printStackTrace();
 			// }
 			
-			controlsArea.layout();
+			lowerControlsArea.layout();
 			return;
 		}
 	}
Index: tmp/org.txm.core/src/java/org/txm/core/results/TXMResult.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/core/results/TXMResult.java	(revision 3018)
+++ tmp/org.txm.core/src/java/org/txm/core/results/TXMResult.java	(revision 3019)
@@ -1388,10 +1388,21 @@
 	
 	/**
 	 * Deletes the object from its parent, also deletes the children. The <code>TXMResult.clean()</code> methods of this result and children results are applied before the deletion.
+	 * default behavior is not silent
 	 * 
 	 * @return
 	 */
 	public final boolean delete() {
+		return delete(false);
+	}
+	
+	/**
+	 * Deletes the object from its parent, also deletes the children. The <code>TXMResult.clean()</code> methods of this result and children results are applied before the deletion.
+	 * 
+	 * @param silent no info message if silent is true
+	 * @return
+	 */
+	public final boolean delete(boolean silent) {
 		
 		try {
 			// FIXME: debug
@@ -1402,7 +1413,7 @@
 			// remove children and clean resources
 			while (this.children.size() > 0) {
 				TXMResult c = this.children.get(0);
-				c.delete(); // should call parent.removeResult(child)
+				c.delete(silent); // should call parent.removeResult(child)
 				this.children.remove(c); // but should be done already...
 			}
 			this.children.clear();
@@ -1414,9 +1425,9 @@
 			// specific cleaning
 			this.clean();
 			
-			
 			// log
-			if (this.isVisible() || Log.isLoggingFineLevel()) {
+			if ((this.isVisible()
+					&& !silent) || Log.isLoggingFineLevel()) {
 				Log.info(TXMCoreMessages.bind(TXMCoreMessages.info_p0P1Deleted, this.getResultType(), this.getSimpleName()));
 			}
 			
