Index: tmp/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/concordance/WordAnnotationToolbar.java
===================================================================
--- tmp/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/concordance/WordAnnotationToolbar.java	(revision 3091)
+++ tmp/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/concordance/WordAnnotationToolbar.java	(revision 3092)
@@ -818,7 +818,7 @@
 		
 		Button closeButton = new Button(annotationArea, SWT.PUSH);
 		closeButton.setToolTipText(KRAnnotationUIMessages.closeTheToolbarWithoutSaving);
-		closeButton.setImage(IImageKeys.getImage(IImageKeys.ACTION_REMOVE));
+		closeButton.setImage(IImageKeys.getImage(IImageKeys.ACTION_DELETE));
 		
 		closeButton.addSelectionListener(new SelectionListener() {
 			
Index: tmp/org.txm.annotation.rcp/src/org/txm/annotation/rcp/editor/AnnotationArea.java
===================================================================
--- tmp/org.txm.annotation.rcp/src/org/txm/annotation/rcp/editor/AnnotationArea.java	(revision 3091)
+++ tmp/org.txm.annotation.rcp/src/org/txm/annotation/rcp/editor/AnnotationArea.java	(revision 3092)
@@ -43,19 +43,8 @@
 	public abstract boolean install(TXMEditor<? extends TXMResult> editor, AnnotationExtension extension, Composite parent, int position) throws Exception;
 	
 	/**
-	 * use this to dispose your extension widgets (and save eventually)
-	 * 
-	 * @return
+	 * extra close steps
 	 */
-	public boolean close() {
-		if (annotationArea != null && !annotationArea.isDisposed()) {
-			annotationArea.dispose();
-		}
-		_close();
-		
-		return true;
-	}
-	
 	protected abstract void _close();
 	
 	/**
Index: tmp/org.txm.annotation.rcp/src/org/txm/annotation/rcp/editor/AnnotationExtension.java
===================================================================
--- tmp/org.txm.annotation.rcp/src/org/txm/annotation/rcp/editor/AnnotationExtension.java	(revision 3091)
+++ tmp/org.txm.annotation.rcp/src/org/txm/annotation/rcp/editor/AnnotationExtension.java	(revision 3092)
@@ -24,6 +24,7 @@
 import org.txm.rcp.IImageKeys;
 import org.txm.rcp.commands.workspace.UpdateCorpus;
 import org.txm.rcp.editors.TXMEditorExtension;
+import org.txm.rcp.editors.TXMEditorToolBar;
 import org.txm.rcp.utils.JobHandler;
 import org.txm.rcp.views.corpora.CorporaView;
 import org.txm.searchengine.cqp.corpus.MainCorpus;
@@ -115,14 +116,18 @@
 			
 			@Override
 			public void widgetSelected(SelectionEvent e) {
-				if (editor.getTopToolbar().isVisible(GROUP_NAME)) {
-					if (annotationAreas.size() == 0) {
-						openDefaultAnnotationMode(e);
-					}
+				// if (editor.getTopToolbar().isVisible(GROUP_NAME)) {
+				// if (annotationAreas.size() == 0) {
+				// openDefaultAnnotationMode(e);
+				// }
+				// }
+				// else {
+				// annotationAreas.clear();
+				// }
+				
+				if (annotationAreas.size() == 0) { // if no annotation mode is opened, opens the default mode
+					openDefaultAnnotationMode(e);
 				}
-				else {
-					annotationAreas.clear();
-				}
 			}
 			
 			@Override
@@ -158,22 +163,20 @@
 		saveButton.setEnabled(false);
 	}
 	
+	public void closeAreasPanel() {
+		editor.getTopToolbar().setVisible(GROUP_NAME, false);
+		editor.getTopToolbar().getOpenCloseButton().setSelection(false);
+	}
+	
 	public void openAnnotationMode(AnnotationArea aa, int position) throws Exception {
 		// AnnotationArea aa = (AnnotationArea)o;
 		if (!aa.allowMultipleAnnotations()) {
-			for (AnnotationArea a : annotationAreas) {
-				a.close();
-			}
+			closeAllAreas(null);
 			annotationAreas.clear();
 		}
 		else { // close the other annotation modes
 			ArrayList<AnnotationArea> removed = new ArrayList<>();
-			for (AnnotationArea a : annotationAreas) {
-				if (!a.getClass().equals(aa.getClass())) {
-					a.close();
-					removed.add(a);
-				}
-			}
+			removed.addAll(closeAllAreas(aa.getClass()));
 			annotationAreas.removeAll(removed);
 		}
 		
@@ -186,6 +189,24 @@
 		editor.refresh(false); // refresh the concordance display
 	}
 	
+	/**
+	 * 
+	 * @param areaToAvoid
+	 * @return the closed areas
+	 */
+	private ArrayList<AnnotationArea> closeAllAreas(Class<? extends AnnotationArea> areaToAvoid) {
+		ArrayList<AnnotationArea> removed = new ArrayList<>();
+		for (int i = 0; i < annotationAreas.size(); i++) {
+			AnnotationArea a = annotationAreas.get(i);
+			if (!a.getClass().equals(areaToAvoid)) {
+				closeArea(a, false);
+				removed.add(a);
+				i--; // since annotationAreas was reduced
+			}
+		}
+		return removed;
+	}
+	
 	public void removeAnnotationArea(AnnotationArea aa) {
 		annotationAreas.remove(aa);
 		aa._close();
@@ -331,4 +352,16 @@
 		h.add(Text.class);
 		return h;
 	}
+	
+	public void closeArea(AnnotationArea area, boolean closeExtensionIfEmpty) {
+		if (area != null && !area.getAnnotationArea().isDisposed()) {
+			area.getAnnotationArea().dispose();
+		}
+		area._close();
+		
+		this.annotationAreas.remove(area);
+		if (this.annotationAreas.size() == 0 && closeExtensionIfEmpty) {
+			this.closeAreasPanel();
+		}
+	}
 }
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 3091)
+++ tmp/org.txm.analec.rcp/src/org/txm/annotation/urs/toolbar/UnitToolbar.java	(revision 3092)
@@ -64,202 +64,233 @@
 import visuAnalec.elements.Unite;
 
 public class UnitToolbar extends URSAnnotationToolbar {
-
-	//boolean AnalecUnitLimitCorrectionScheme = TxmPreferences.getBoolean(AnalecPreferencePage.ANALEC_LIMIT_CORRECTION_SCHEME); // use Analec scheme to fix unit limits or TXM's
-
+	
+	// boolean AnalecUnitLimitCorrectionScheme = TxmPreferences.getBoolean(AnalecPreferencePage.ANALEC_LIMIT_CORRECTION_SCHEME); // use Analec scheme to fix unit limits or TXM's
+	
 	public RGBA highlighted_unit_color = new RGBA(183, 191, 237, 0.7f);
+	
 	public RGBA selected_unit_color = new RGBA(255, 255, 0, 0.5f);
-
+	
 	private Button createButton;
+	
 	private Button deleteButton;
+	
 	private Button editButton;
-
+	
 	private KeyListener editorKeyListener;
+	
 	private MouseListener editorMouseListener;
+	
 	private int fixingAnnotationLimits = 0;
+	
 	private NavigationField navigationField;
+	
 	private Label l;
+	
 	private MenuListener menuListener;
+	
 	private List<String> previousSelectedTypeUnitIDS;
-
+	
 	private List<String> previousSelectedUnitIDS;
+	
 	protected boolean startFixingUnitLimit;
+	
 	private Combo typeCombo;
+	
 	private Unite[] unites;
+	
 	private String[] typesUnitesAVoir;
+	
 	private int maxCorpusPosition;
-
+	
 	private DragDetectListener dragDetectListener;
-
+	
 	private Button drop_b;
+	
 	private Button editLeftButton;
+	
 	private Button editRightButton;
-
-	public UnitToolbar() { }
-
+	
+	public UnitToolbar() {}
+	
 	@Override
 	public boolean install(TXMEditor<? extends TXMResult> txmeditor, AnnotationExtension extension, Composite parent, int position) throws Exception {
 		super.install(txmeditor, extension, parent, position);
 		
-		annotationArea.getLayout().numColumns = 10;
+		annotationArea.getLayout().numColumns = 11;
 		annotationArea.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
-
+		
 		String color_palette = URSPreferences.getInstance().getString(URSPreferences.COLOR_PALETTE);
 		if ("yellow".equals(color_palette)) { //$NON-NLS-1$
 			this.highlighted_unit_color = URSAnnotationToolbar.lightyellow;
 			this.selected_unit_color = URSAnnotationToolbar.yellow;
-		} else if ("green".equals(color_palette)) { //$NON-NLS-1$
+		}
+		else if ("green".equals(color_palette)) { //$NON-NLS-1$
 			this.highlighted_unit_color = URSAnnotationToolbar.lightgreen;
 			this.selected_unit_color = URSAnnotationToolbar.green;
-		} else { // custom palette
-			//		String highlighted_unit_color_pref = TxmPreferences.get(AnalecPreferencePage.HIGHLIGHTED_UNIT_COLOR, "255,255,176");
-			//		String selected_unit_color_pref = TxmPreferences.get(AnalecPreferencePage.SELECTED_UNIT_COLOR, "255,255,96");
-			//		this.highlighted_unit_color = new RGBA(highlighted_unit_color_pref, 0.7f);
-			//		this.selected_unit_color = new RGBA(selected_unit_color_pref, 1f);
 		}
-
+		else { // custom palette
+			// String highlighted_unit_color_pref = TxmPreferences.get(AnalecPreferencePage.HIGHLIGHTED_UNIT_COLOR, "255,255,176");
+			// String selected_unit_color_pref = TxmPreferences.get(AnalecPreferencePage.SELECTED_UNIT_COLOR, "255,255,96");
+			// this.highlighted_unit_color = new RGBA(highlighted_unit_color_pref, 0.7f);
+			// this.selected_unit_color = new RGBA(selected_unit_color_pref, 1f);
+		}
+		
 		this.button = extension.getSaveButton();
 		this.maincorpus = this.editor.getCorpus().getMainCorpus();
 		try {
 			maxCorpusPosition = maincorpus.getSize();
-		} catch (Exception e) {
+		}
+		catch (Exception e) {
 			System.out.println(NLS.bind(Messages.UnitToolbar_3, maincorpus, e.getLocalizedMessage()));
 			Log.printStackTrace(e);
 		}
 		analecCorpus.addEventListener(this);
-
-
+		
+		
 		l = new Label(annotationArea, SWT.NONE);
-		l.setText(Messages.UnitToolbar_6);	
+		l.setText(Messages.UnitToolbar_6);
 		l.setToolTipText(Messages.UnitToolbar_6);
 		l.setLayoutData(new GridData(GridData.CENTER, GridData.CENTER, false, false));
-
-		typeCombo = new Combo(annotationArea, SWT.NONE|SWT.READ_ONLY);
+		
+		typeCombo = new Combo(annotationArea, SWT.NONE | SWT.READ_ONLY);
 		typeCombo.setToolTipText(Messages.UnitToolbar_7);
 		GridData gdata = new GridData(GridData.CENTER, GridData.CENTER, false, false);
 		gdata.minimumWidth = 100;
 		gdata.widthHint = 100;
 		typeCombo.setLayoutData(gdata);
 		typeCombo.addSelectionListener(new SelectionListener() {
+			
 			@Override
 			public void widgetDefaultSelected(SelectionEvent e) {}
-
+			
 			@Override
 			public void widgetSelected(SelectionEvent e) {
 				onTypecomboSelected(e);
 			}
 		});
-
+		
 		navigationField = new NavigationField(this, SWT.NONE);
 		gdata = new GridData(GridData.FILL, GridData.CENTER, true, false);
 		navigationField.setLayoutData(gdata);
 		navigationField.addListener(SWT.Selection, new Listener() {
+			
 			@Override
 			public void handleEvent(Event event) {
 				onIdentifiantComboSelected(event);
 			}
 		});
-
-		//l = new Label(this, SWT.NONE);
-
+		
+		// l = new Label(this, SWT.NONE);
+		
 		createButton = new Button(annotationArea, SWT.PUSH);
 		createButton.setText(Messages.UnitToolbar_8);
 		gdata = new GridData(GridData.CENTER, GridData.CENTER, false, false);
 		createButton.setLayoutData(gdata);
 		createButton.addSelectionListener(new SelectionListener() {
+			
 			@Override
 			public void widgetDefaultSelected(SelectionEvent e) {}
-
+			
 			@Override
 			public void widgetSelected(SelectionEvent e) {
 				onCreateButtonSelected(e);
 			}
 		});
-
+		
 		deleteButton = new Button(annotationArea, SWT.PUSH);
 		gdata = new GridData(GridData.CENTER, GridData.CENTER, false, false);
 		deleteButton.setLayoutData(gdata);
 		deleteButton.setImage(IImageKeys.getImage("platform:/plugin/org.txm.rcp/icons/cross.png")); //$NON-NLS-1$
 		deleteButton.setToolTipText(Messages.UnitToolbar_10);
 		deleteButton.addSelectionListener(new SelectionListener() {
+			
 			@Override
 			public void widgetDefaultSelected(SelectionEvent e) {}
+			
 			@Override
 			public void widgetSelected(SelectionEvent e) {
 				onDeleteComboSelected(e);
 			}
 		});
-
+		
 		l = new Label(annotationArea, SWT.NONE);
-
+		
 		editLeftButton = new Button(annotationArea, SWT.TOGGLE);
 		gdata = new GridData(GridData.CENTER, GridData.CENTER, false, false);
 		editLeftButton.setLayoutData(gdata);
 		editLeftButton.setText("[ ↔"); //$NON-NLS-1$
 		editLeftButton.setToolTipText(Messages.UnitToolbar_12);
 		editLeftButton.addSelectionListener(new SelectionListener() {
+			
 			@Override
 			public void widgetDefaultSelected(SelectionEvent e) {}
+			
 			@Override
 			public void widgetSelected(SelectionEvent e) {
-				onEditButtonSelected(e,1);
+				onEditButtonSelected(e, 1);
 			}
 		});
-
+		
 		editButton = new Button(annotationArea, SWT.TOGGLE);
 		editButton.setText("[↔]"); //$NON-NLS-1$
 		editButton.setToolTipText(Messages.UnitToolbar_14);
 		editButton.addSelectionListener(new SelectionListener() {
+			
 			@Override
 			public void widgetDefaultSelected(SelectionEvent e) {}
+			
 			@Override
 			public void widgetSelected(SelectionEvent e) {
 				onEditButtonSelected(e);
 			}
 		});
-
+		
 		editRightButton = new Button(annotationArea, SWT.TOGGLE);
 		editRightButton.setText("↔ ]"); //$NON-NLS-1$
 		editRightButton.setToolTipText(Messages.UnitToolbar_16);
 		editRightButton.addSelectionListener(new SelectionListener() {
+			
 			@Override
 			public void widgetDefaultSelected(SelectionEvent e) {}
+			
 			@Override
 			public void widgetSelected(SelectionEvent e) {
-				onEditButtonSelected(e,2);
+				onEditButtonSelected(e, 2);
 			}
 		});
-
+		
 		annotationArea.layout();
 		annotationArea.getParent().layout(true);
 		editor.layout(true);
-
+		
 		reloadUnits(); // reloads types
 		reloadIdentifiants();
-
+		
 		createButton.setEnabled(false);
 		deleteButton.setEnabled(false);
 		editButton.setEnabled(false);
 		editLeftButton.setEnabled(false);
 		editRightButton.setEnabled(false);
-
-		//drop_b.setEnabled(false);
+		
+		// drop_b.setEnabled(false);
 		if (typesUnitesAVoir.length > 0) {
 			typeCombo.select(1);
 			onTypecomboSelected(null);
-
+			
 			testIfAwordSpanIsSelected();
 		}
-
+		
 		ElementPropertiesView.openView();
 		editor.updateWordStyles();
-
+		
 		return true;
 	}
-
+	
+	@Override
 	public void clearHighlight() {
 		if (previousSelectedUnitIDS != null) {
-			if (editor.isDisposed()){
+			if (editor.isDisposed()) {
 				editor.removeHighlightWordsById(selected_unit_color, previousSelectedUnitIDS);
 				editor.removeFontWeightWordsById(previousSelectedUnitIDS);
 			}
@@ -269,45 +300,48 @@
 			editor.removeHighlightWordsById(highlighted_unit_color, previousSelectedTypeUnitIDS);
 			previousSelectedTypeUnitIDS = null; // release memory
 		}
-
+		
 		if (!createButton.isDisposed()) createButton.setEnabled(false);
 		if (!deleteButton.isDisposed()) deleteButton.setEnabled(false);
 		if (!editButton.isDisposed()) editButton.setEnabled(false);
-		//drop_b.setEnabled(false);
+		// drop_b.setEnabled(false);
 	}
-
+	
+	@Override
 	public MouseListener getEditorClickListener() {
 		if (editorMouseListener != null) return editorMouseListener;
 		editorMouseListener = new MouseListener() {
-
+			
 			boolean dblClick = false;
+			
 			boolean debug = false;
-			private int t,x,y;
-
+			
+			private int t, x, y;
+			
 			@Override
 			public void mouseDoubleClick(MouseEvent e) {
 				if (debug) System.out.println("DOUBLE CLICK"); //$NON-NLS-1$
-				dblClick= true;
-
+				dblClick = true;
+				
 				EditionPanel panel = editor.getEditionPanel(0);
 				if (panel == null) return;
 				String[] ids = panel.getWordSelection(); // may be null
-				//System.out.println("word id="+id);
-				//				if (id != null) {
-				//					org.txm.searchengine.cqp.corpus.Corpus c = UnitToolbar.this.editor.getCorpus();
-				//					try {
-				//						if (debug)  System.out.println(" HIGHLIGHTING ANNOT IF ANY AT "+id);
-				//						tryHighlightingWord(id,c );
-				//					} catch (Exception ex) {
-				//						ex.printStackTrace();
-				//					}
-				//				}
-
+				// System.out.println("word id="+id);
+				// if (id != null) {
+				// org.txm.searchengine.cqp.corpus.Corpus c = UnitToolbar.this.editor.getCorpus();
+				// try {
+				// if (debug) System.out.println(" HIGHLIGHTING ANNOT IF ANY AT "+id);
+				// tryHighlightingWord(id,c );
+				// } catch (Exception ex) {
+				// ex.printStackTrace();
+				// }
+				// }
+				
 				if (ids != null && typeCombo.getSelectionIndex() > 0 && typeCombo.getEnabled()) {
 					createButton.setEnabled(true); // there is a text selection in the browser
 				}
 			}
-
+			
 			@Override
 			public void mouseDown(MouseEvent e) {
 				if (debug) System.out.println("MOUSE DOWN"); //$NON-NLS-1$
@@ -316,7 +350,7 @@
 				x = e.x;
 				y = e.y;
 			}
-
+			
 			@Override
 			public void mouseUp(MouseEvent e) {
 				if (dblClick) { // doucle click raised by mouseDoubleClick
@@ -326,189 +360,203 @@
 				if (debug) System.out.println("MOUSE UP"); //$NON-NLS-1$
 				EditionPanel panel = editor.getEditionPanel(0);
 				if (panel == null) return;
-
+				
 				if (typeCombo.getSelectionIndex() <= 0) {
 					createButton.setEnabled(false);
 					deleteButton.setEnabled(false);
 					editLeftButton.setEnabled(false);
 					editButton.setEnabled(false);
 					editRightButton.setEnabled(false);
-					//drop_b.setEnabled(false);
+					// drop_b.setEnabled(false);
 					return; // nothing to do with annotations
 				}
-
+				
 				// filter click that are not a left simple click (no drag)
-				//System.out.println("click count="+e.count+" button="+e.button+" time="+e.time+" diff="+(e.time-t)+" dist="+(Math.abs(e.x - x) + Math.abs(e.y - y)));
+				// System.out.println("click count="+e.count+" button="+e.button+" time="+e.time+" diff="+(e.time-t)+" dist="+(Math.abs(e.x - x) + Math.abs(e.y - y)));
 				if (e.count > 1) {
 					if (debug) System.out.println(" DOUBLE CLICK"); //$NON-NLS-1$
-					//System.out.println("not a simple click");
+					// System.out.println("not a simple click");
 					return;
 				}
-
+				
 				int dist = Math.abs(e.x - x) + Math.abs(e.y - y);
-				int deltat = (e.time-t);
-				//System.out.println("deltat ="+deltat);
+				int deltat = (e.time - t);
+				// System.out.println("deltat ="+deltat);
 				if (dist != 0 && (deltat > 120 || dist > 4)) {
-					//System.out.println(" DRAG dist="+dist+" deltat="+deltat);
-
+					// System.out.println(" DRAG dist="+dist+" deltat="+deltat);
+					
 					String[] ids = panel.getWordSelection(); // may be null
-
-					if (fixingAnnotationLimits== 3) { // fixing limit with a mouse drag an drop 
-						if (debug)  System.out.println(" EDITING ANNOTATION POSITION mode="+fixingAnnotationLimits); //$NON-NLS-1$
+					
+					if (fixingAnnotationLimits == 3) { // fixing limit with a mouse drag an drop
+						if (debug) System.out.println(" EDITING ANNOTATION POSITION mode=" + fixingAnnotationLimits); //$NON-NLS-1$
 						onFixingAnnotationLimits(ids);
 						return;
-					} else {
-
-						testIfAwordSpanIsSelected(ids);				
-
-						//panel.expandSelectionTo(ids);
+					}
+					else {
+						
+						testIfAwordSpanIsSelected(ids);
+						
+						// panel.expandSelectionTo(ids);
 						return;
 					}
 				}
 				
 				if (e.button != 1) {
 					if (debug) System.out.println(" NO LEFT"); //$NON-NLS-1$
-					//System.out.println("not a left click");
+					// System.out.println("not a left click");
 					return;
 				}
-				if ((e.time-t) > 200) {
+				if ((e.time - t) > 200) {
 					if (debug) System.out.println(" LONG"); //$NON-NLS-1$
-					//System.out.println("not a short click");
+					// System.out.println("not a short click");
 					return;
 				}
-
+				
 				String[] ids = panel.getWordSelection(); // may be null
-
+				
 				if (fixingAnnotationLimits > 0) {
-					if (debug)  System.out.println(" EDITING ANNOTATION POSITION mode="+fixingAnnotationLimits); //$NON-NLS-1$
+					if (debug) System.out.println(" EDITING ANNOTATION POSITION mode=" + fixingAnnotationLimits); //$NON-NLS-1$
 					onFixingAnnotationLimits(ids);
 					return;
 				}
-
+				
 				if (ids == null) { // clear selection
-					if (debug)  System.out.println(" NO WORD SELECTION"); //$NON-NLS-1$
+					if (debug) System.out.println(" NO WORD SELECTION"); //$NON-NLS-1$
 					navigationField.setSelectionIndex(0); // clear selection
-
+					
 					return;
 				}
-
+				
 				org.txm.searchengine.cqp.corpus.CQPCorpus c = UnitToolbar.this.editor.getCorpus();
-
+				
 				try {
-					if (debug) System.out.println(" HIGHLIGHTING ANNOT IF ANY AT "+ids[0]); //$NON-NLS-1$
-					if (tryHighlightingUnitsWord(ids[0],c )) {
+					if (debug) System.out.println(" HIGHLIGHTING ANNOT IF ANY AT " + ids[0]); //$NON-NLS-1$
+					if (tryHighlightingUnitsWord(ids[0], c)) {
 						editor.updateWordStyles();
-					} else { // a word have been clicked
-						testIfAwordSpanIsSelected(ids);		
+					}
+					else { // a word have been clicked
+						testIfAwordSpanIsSelected(ids);
 						panel.expandSelectionTo(ids);
 					}
-				} catch (Exception ex) {
+				}
+				catch (Exception ex) {
 					ex.printStackTrace();
 				}
 			}
 		};
 		return editorMouseListener;
 	}
-
+	
 	protected void testIfAwordSpanIsSelected() {
 		EditionPanel panel = editor.getEditionPanel(0);
 		if (panel == null) return;
 		String[] ids = panel.getWordSelection(); // may be null
 		testIfAwordSpanIsSelected(ids);
 	}
-
+	
 	protected void testIfAwordSpanIsSelected(String[] ids) {
-		if (ids != null && typeCombo.getItemCount() > 1  && typeCombo.getEnabled() ) {
-			//System.out.println("ids:"+Arrays.toString(ids));
+		if (ids != null && typeCombo.getItemCount() > 1 && typeCombo.getEnabled()) {
+			// System.out.println("ids:"+Arrays.toString(ids));
 			if (navigationField.getSelectionIndex() > 0) {
 				deleteButton.setEnabled(true);
 				editLeftButton.setEnabled(true);
 				editButton.setEnabled(true);
 				editRightButton.setEnabled(true);
-				//drop_b.setEnabled(true);
+				// drop_b.setEnabled(true);
 			}
-
+			
 			createButton.setEnabled(ids != null);
-		}	
+		}
 	}
-
-
-
+	
+	
+	
 	protected void onFixingAnnotationLimits(String[] ids) {
-
-		if (ids == null || ids.length == 0) { System.out.println(Messages.UnitToolbar_27);return; }
-
+		
+		if (ids == null || ids.length == 0) {
+			System.out.println(Messages.UnitToolbar_27);
+			return;
+		}
+		
 		boolean uniteFixed = false;
 		int i = navigationField.getSelectionIndex();
 		if (i > 0) {
-			Unite unite = unites[i-1];
-
+			Unite unite = unites[i - 1];
+			
 			try {
 				uniteFixed = updateUniteLimits(unite, ids, fixingAnnotationLimits);
-			} catch (CqiClientException e1) {
+			}
+			catch (CqiClientException e1) {
 				System.out.println(NLS.bind(Messages.UnitToolbar_28, ids[0]));
 				Log.printStackTrace(e1);
 			}
-
+			
 			editButton.setSelection(false);
 			editLeftButton.setSelection(false);
 			editRightButton.setSelection(false);
 			fixingAnnotationLimits = 0;
 			typeCombo.setEnabled(true);
-
+			
 			navigationField.setEnabled(true);
 			createButton.setEnabled(true);
 			deleteButton.setEnabled(true);
-
+			
 			if (uniteFixed) {
-				//button.setEnabled(analecCorpus.isModifie());
+				// button.setEnabled(analecCorpus.isModifie());
 				reloadIdentifiants();
 				highlightType();
-				//highlightUnite(unite, true);
+				// highlightUnite(unite, true);
 				navigationField.setSelectionIndex(i);
-				//updatePropertiesView(unite); // start-end may have changed
+				// updatePropertiesView(unite); // start-end may have changed
 				return;
 			}
 		}
 	}
-
-
-
+	
+	
+	
+	@Override
 	public KeyListener getEditorKeyListener() {
 		if (editorKeyListener != null) return editorKeyListener;
 		editorKeyListener = new KeyListener() {
-
+			
 			@Override
-			public void keyPressed(KeyEvent e) { }
-
+			public void keyPressed(KeyEvent e) {}
+			
 			@Override
 			public void keyReleased(KeyEvent e) {
 				int mask = SWT.CTRL;
 				if (Util.isMac()) mask = SWT.COMMAND;
-
+				
 				if (((e.stateMask & mask) == mask)) {
-					if (e.keyCode == SWT.SPACE) { 
+					if (e.keyCode == SWT.SPACE) {
 						int i = navigationField.getSelectionIndex();
 						if (i > 0) {
 							onEditButtonSelected(null);
 						}
-					} else if (e.keyCode == SWT.ARROW_LEFT) {
+					}
+					else if (e.keyCode == SWT.ARROW_LEFT) {
 						selectPrevious();
-					} else if (e.keyCode == SWT.ARROW_RIGHT) {
+					}
+					else if (e.keyCode == SWT.ARROW_RIGHT) {
 						selectNext();
-						//					} else if (e.keyCode == SWT.PAGE_UP) { // clash with Eclipse CTRL+PAGE_UP binding
-						//						select10Previous();
-						//					} else if (e.keyCode == SWT.PAGE_DOWN) { // clash with Eclipse CTRL+PAGE_DOWN binding
-						//						select10Next();
-					} else if (e.keyCode == SWT.END) {
+						// } else if (e.keyCode == SWT.PAGE_UP) { // clash with Eclipse CTRL+PAGE_UP binding
+						// select10Previous();
+						// } else if (e.keyCode == SWT.PAGE_DOWN) { // clash with Eclipse CTRL+PAGE_DOWN binding
+						// select10Next();
+					}
+					else if (e.keyCode == SWT.END) {
 						selectLast();
-					} else if (e.keyCode == SWT.HOME) {
+					}
+					else if (e.keyCode == SWT.HOME) {
 						selectFirst();
 					}
-				} else {
-					if (e.keyCode == SWT.CR || e.keyCode == SWT.KEYPAD_CR) { 
+				}
+				else {
+					if (e.keyCode == SWT.CR || e.keyCode == SWT.KEYPAD_CR) {
 						onCreateButtonSelected(null);
-					} else if (e.keyCode == SWT.DEL) { 
+					}
+					else if (e.keyCode == SWT.DEL) {
 						int i = navigationField.getSelectionIndex();
 						if (i > 0) {
 							onDeleteComboSelected(e);
@@ -519,33 +567,35 @@
 		};
 		return editorKeyListener;
 	}
-
+	
+	@Override
 	public MenuListener getMenuListener() {
-
+		
 		if (menuListener != null) return menuListener;
-
+		
 		this.menuListener = new MenuListener() {
-
-			HashSet<MenuItem> entries = new HashSet<MenuItem>();
-
+			
+			HashSet<MenuItem> entries = new HashSet<>();
+			
 			@Override
-			public void menuHidden(MenuEvent e) { }
-
+			public void menuHidden(MenuEvent e) {}
+			
 			@Override
 			public void menuShown(MenuEvent e) {
-
+				
 				EditionPanel panel = editor.getEditionPanel(0);
 				if (panel == null) return;
 				Menu menu = panel.getBrowser().getMenu();
-
-				for (MenuItem item : entries) item.dispose(); 
-
+				
+				for (MenuItem item : entries)
+					item.dispose();
+				
 				String[] ids = panel.getWordSelection();
-				//System.out.println("Word under mouse: "+id);
+				// System.out.println("Word under mouse: "+id);
 				if (ids != null && ids.length > 0) {
 					int[] startend = getSelectionStartEndWordPositions(); // get the word start end positions
-					ArrayList<Unite> unitEntries = new ArrayList<Unite>(); // stores units  covering the word
-					ArrayList<Integer> noEntries = new ArrayList<Integer>(); // stores units  covering the word
+					ArrayList<Unite> unitEntries = new ArrayList<>(); // stores units covering the word
+					ArrayList<Integer> noEntries = new ArrayList<>(); // stores units covering the word
 					int i = 1;
 					for (Unite unit : unites) {
 						if (unit.getDeb() > startend[0]) break; // don't go further
@@ -554,32 +604,36 @@
 						noEntries.add(i);
 						i++;
 					}
-
+					
 					if (unitEntries.size() > 0) {
 						MenuItem item = new MenuItem(menu, SWT.SEPARATOR);
 						entries.add(item);
 					}
-
-					for (i = 0 ; i < unitEntries.size() ; i++) {
+					
+					for (i = 0; i < unitEntries.size(); i++) {
 						final Unite unit = unitEntries.get(i);
-						final Integer unitNo = Arrays.binarySearch(unites, unit)+1;
-
+						final Integer unitNo = Arrays.binarySearch(unites, unit) + 1;
+						
 						MenuItem item = new MenuItem(menu, SWT.NONE);
 						AbstractCqiClient CQI = CQPSearchEngine.getCqiClient();
 						try {
 							if (unit.getDeb() == unit.getFin()) {
-								String[] firstWords = CQI.cpos2Str(maincorpus.getWordProperty().getQualifiedName(), new int[]{unit.getDeb()});
-								item.setText(NLS.bind(Messages.UnitToolbar_29, unit.getType()+"-"+unitNo+ ":"+firstWords[0])); //$NON-NLS-2$ //$NON-NLS-3$
-							} else {
-								String[] firstWords = CQI.cpos2Str(maincorpus.getWordProperty().getQualifiedName(), new int[]{unit.getDeb(), unit.getDeb()+1});
-								item.setText(NLS.bind(Messages.UnitToolbar_32, unit.getType()+"-"+unitNo+ "="+firstWords[0]+" "+firstWords[1])); //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+								String[] firstWords = CQI.cpos2Str(maincorpus.getWordProperty().getQualifiedName(), new int[] { unit.getDeb() });
+								item.setText(NLS.bind(Messages.UnitToolbar_29, unit.getType() + "-" + unitNo + ":" + firstWords[0])); //$NON-NLS-2$
 							}
-						} catch (Exception e1) {
+							else {
+								String[] firstWords = CQI.cpos2Str(maincorpus.getWordProperty().getQualifiedName(), new int[] { unit.getDeb(), unit.getDeb() + 1 });
+								item.setText(NLS.bind(Messages.UnitToolbar_32, unit.getType() + "-" + unitNo + "=" + firstWords[0] + " " + firstWords[1])); //$NON-NLS-2$ //$NON-NLS-3$
+							}
+						}
+						catch (Exception e1) {
 							e1.printStackTrace();
 						}
 						item.addSelectionListener(new SelectionListener() {
+							
 							@Override
-							public void widgetDefaultSelected(SelectionEvent e) { }
+							public void widgetDefaultSelected(SelectionEvent e) {}
+							
 							@Override
 							public void widgetSelected(SelectionEvent e) {
 								selectUniteInIdentifants(unit);
@@ -590,41 +644,43 @@
 				}
 			}
 		};
-
+		
 		return menuListener;
 	}
-
+	
 	public String uniteToWords(Unite unit) {
 		AbstractCqiClient CQI = CQPSearchEngine.getCqiClient();
 		String[] firstWords = null;
 		try {
 			if (unit.getDeb() == unit.getFin()) {
-				firstWords = CQI.cpos2Str(maincorpus.getWordProperty().getQualifiedName(), new int[]{unit.getDeb()});
-			} else {
-				firstWords = CQI.cpos2Str(maincorpus.getWordProperty().getQualifiedName(), new int[]{unit.getDeb(), unit.getDeb()+1});
+				firstWords = CQI.cpos2Str(maincorpus.getWordProperty().getQualifiedName(), new int[] { unit.getDeb() });
 			}
-		} catch (Exception e) {
+			else {
+				firstWords = CQI.cpos2Str(maincorpus.getWordProperty().getQualifiedName(), new int[] { unit.getDeb(), unit.getDeb() + 1 });
+			}
+		}
+		catch (Exception e) {
 			e.printStackTrace();
 		}
 		return StringUtils.join(firstWords, " "); //$NON-NLS-1$
 	}
-
+	
 	/**
 	 * Highlight units of the current page
 	 */
 	protected void highlightType() {
 		if (unites == null) return;
-
+		
 		try {
 			Page page = editor.getEditionPanel(0).getCurrentPage();
 			Edition e = page.getEdition();
 			Page next = e.getNextPage(page);
 			String id = page.getWordId();
 			if (id == null || id.length() == 0) return;
-
+			
 			String qid = maincorpus.getProperty("id").getQualifiedName();
-			int first_ids[] = CQPSearchEngine.getCqiClient().str2Id(qid, new String[] {id}); //$NON-NLS-1$
-
+			int first_ids[] = CQPSearchEngine.getCqiClient().str2Id(qid, new String[] { id });
+			
 			if (first_ids.length == 0) return;
 			int first_id = first_ids[0];
 			if (first_id == -1) return;
@@ -632,34 +688,34 @@
 			int last_ids[] = null;
 			if (next != null && next != page) {
 				String next_id = next.getWordId();
-				last_ids = CQPSearchEngine.getCqiClient().str2Id(qid, new String[] {next_id}); //$NON-NLS-1$
+				last_ids = CQPSearchEngine.getCqiClient().str2Id(qid, new String[] { next_id });
 			}
-
+			
 			int first_pos = CQPSearchEngine.getCqiClient().id2Cpos(qid, first_id)[0];
 			int last_pos = Integer.MAX_VALUE;
 			if (last_ids != null && last_ids.length > 0) {
 				last_pos = CQPSearchEngine.getCqiClient().id2Cpos(qid, last_ids[0])[0];
 			}
-
+			
 			int n2 = 0;
-			for (int i = 0 ; i < unites.length ; i++) {
-				for (int p = unites[i].getDeb() ; p <= unites[i].getFin() ; p++) {
+			for (int i = 0; i < unites.length; i++) {
+				for (int p = unites[i].getDeb(); p <= unites[i].getFin(); p++) {
 					if (p >= first_pos && p <= last_pos) {
 						n2++;
 					}
 				}
 			}
-
+			
 			int allpositions[] = new int[n2];
 			n2 = 0;
-			for (int i = 0 ; i < unites.length ; i++) {
-				for (int p = unites[i].getDeb() ; p <= unites[i].getFin() ; p++) {
+			for (int i = 0; i < unites.length; i++) {
+				for (int p = unites[i].getDeb(); p <= unites[i].getFin(); p++) {
 					if (p >= first_pos && p <= last_pos) {
 						allpositions[n2++] = p;
 					}
 				}
 			}
-
+			
 			if (previousSelectedTypeUnitIDS != null) {
 				editor.removeHighlightWordsById(highlighted_unit_color, previousSelectedTypeUnitIDS);
 				editor.removeFontWeightWordsById(previousSelectedTypeUnitIDS);
@@ -667,13 +723,14 @@
 			}
 			String ids2[] = CQPSearchEngine.getCqiClient().cpos2Str(maincorpus.getProperty("id").getQualifiedName(), allpositions); //$NON-NLS-1$
 			previousSelectedTypeUnitIDS = Arrays.asList(ids2);
-
+			
 			editor.addHighlightWordsById(highlighted_unit_color, previousSelectedTypeUnitIDS);
-		} catch (Exception e) {
+		}
+		catch (Exception e) {
 			e.printStackTrace();
 		}
 	}
-
+	
 	/**
 	 * Highlight a unit and don't focus it
 	 * 
@@ -683,140 +740,143 @@
 	private void highlightUnite(Unite unite, boolean focus, int clickedWordPosition) {
 		int start = unite.getDeb();
 		int end = unite.getFin();
-		//	System.out.println("HU: start="+start+" end="+end+" -> "+(end-start+1));
-		int len = end-start+1;
+		// System.out.println("HU: start="+start+" end="+end+" -> "+(end-start+1));
+		int len = end - start + 1;
 		if (len < 0) {
-			System.out.println("Error: can not highlight unit="+unite+": start > end."); //$NON-NLS-1$ //$NON-NLS-2$
+			System.out.println("Error: can not highlight unit=" + unite + ": start > end."); //$NON-NLS-1$ //$NON-NLS-2$
 			return;
 		}
-		int positions [] = new int[len]; // build the positions array for CQP
+		int positions[] = new int[len]; // build the positions array for CQP
 		int n = 0;
-		for (int p = start ; p <= end ; p++) {
+		for (int p = start; p <= end; p++) {
 			positions[n++] = p;
 		}
-
+		
 		try {
 			if (previousSelectedUnitIDS != null) { // remove previous highlighted words
 				editor.removeHighlightWordsById(selected_unit_color, previousSelectedUnitIDS);
 				editor.removeFontWeightWordsById(previousSelectedUnitIDS);
 				previousSelectedUnitIDS = null; // release memory
 			}
-
+			
 			String ids[] = CQPSearchEngine.getCqiClient().cpos2Str(maincorpus.getProperty("id").getQualifiedName(), positions); //$NON-NLS-1$
-			//			System.out.println("Highlight words with ids="+Arrays.toString(ids));
-
-			//positions = new int[]{positions[0]};
+			// System.out.println("Highlight words with ids="+Arrays.toString(ids));
+			
+			// positions = new int[]{positions[0]};
 			Property text_id = maincorpus.getStructuralUnit("text").getProperty("id"); //$NON-NLS-1$ //$NON-NLS-2$
 			int[] text_strucs = CQPSearchEngine.getCqiClient().cpos2Struc(text_id.getQualifiedName(), positions);
 			String[] text_ids = CQPSearchEngine.getCqiClient().struc2Str(text_id.getQualifiedName(), text_strucs);
-
+			
 			String firstWordId = ids[0];
 			String firstWordTextId = text_ids[0];
-			if (clickedWordPosition  >= 0 && clickedWordPosition < ids.length) {
+			if (clickedWordPosition >= 0 && clickedWordPosition < ids.length) {
 				firstWordId = ids[clickedWordPosition];
 				firstWordTextId = text_ids[clickedWordPosition];
 			}
-
-
+			
+			
 			EditionPanel panel = editor.getEditionPanel(0);
 			Edition e = panel.getEdition();
 			Project corpus = e.getText().getProject();
-			//			System.out.println("firstWordTextId="+firstWordTextId);
+			// System.out.println("firstWordTextId="+firstWordTextId);
 			Text newText = corpus.getText(firstWordTextId); // get the new text
-			//			System.out.println("positions="+Arrays.toString(positions));
-			//			System.out.println("firstWordId="+firstWordId);
-			//			System.out.println("firstWordTextId="+firstWordTextId);
-			//			System.out.println("newText="+newText+" e="+e);
+			// System.out.println("positions="+Arrays.toString(positions));
+			// System.out.println("firstWordId="+firstWordId);
+			// System.out.println("firstWordTextId="+firstWordTextId);
+			// System.out.println("newText="+newText+" e="+e);
 			Edition newEdition = newText.getEdition(e.getName()); // get the edition of the new text
 			Page p = newEdition.getPageForWordId(firstWordId); // find out the page containing the word
-			//			System.out.println("page="+p+" current page="+panel.getCurrentPage());
-
+			// System.out.println("page="+p+" current page="+panel.getCurrentPage());
+			
 			previousSelectedUnitIDS = Arrays.asList(ids);
 			editor.addHighlightWordsById(selected_unit_color, previousSelectedUnitIDS);
 			editor.addFontWeightWordsById(EditionPanel.WEIGHT_BOLD, previousSelectedUnitIDS);
-
+			
 			if (previousSelectedUnitIDS.size() > 0 && focus) editor.setFocusedWordID(previousSelectedUnitIDS.get(0));
-			//System.out.println("Word page= "+p+" current="+panel.getCurrentPage());
+			// System.out.println("Word page= "+p+" current="+panel.getCurrentPage());
 			if (panel.getCurrentText() != newText) { // text changed
-				//System.out.println("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 (panel.getCurrentPage() != p) { // do we need to change page ?
 				editor.goToPage(p.getName());
-			} else { // just reload the page to highlight words
-				//System.out.println("NO CHANGE");
 			}
-		} catch (Exception e1) {
+			else { // just reload the page to highlight words
+				// System.out.println("NO CHANGE");
+			}
+		}
+		catch (Exception e1) {
 			e1.printStackTrace();
 		}
 	}
-
+	
 	protected void onCreateButtonSelected(SelectionEvent e) {
-		//System.out.println("onCreateButtonSelected");
+		// System.out.println("onCreateButtonSelected");
 		int[] startend = getSelectionStartEndWordPositions();
 		if (startend != null) {
 			Log.info(NLS.bind(Messages.UnitToolbar_44, startend[0], startend[1]));
 			Unite unite = UnitToolbar.this.vue.getCorpus().addUniteSaisie(typeCombo.getText(), startend[0], startend[1]);
-			Structure structure =  UnitToolbar.this.analecCorpus.getStructure();
+			Structure structure = UnitToolbar.this.analecCorpus.getStructure();
 			for (String prop : unite.getProps().keySet())
 				unite.getProps().put(prop, structure.getValeurParDefaut(unite.getClass(), unite.getType(), prop));
-
+			
 			reloadIdentifiants();
 			selectUniteInIdentifants(unite);
-			//highlightUnite(unite, true, -1);
-
+			// highlightUnite(unite, true, -1);
+			
 			deleteButton.setEnabled(true);
 			editLeftButton.setEnabled(true);
 			editButton.setEnabled(true);
 			editRightButton.setEnabled(true);
-			//drop_b.setEnabled(true);
-			//updatePropertiesView(unite, true);
+			// drop_b.setEnabled(true);
+			// updatePropertiesView(unite, true);
 			setFocusInPropertiesView();
 			this.extension.getSaveButton().setEnabled(true);
 			editor.fireIsDirty();
 		}
-
+		
 		if (e != null) editor.updateWordStyles();
 	}
-
+	
 	protected void onDeleteComboSelected(Object e) {
 		int i = navigationField.getSelectionIndex();
 		if (i <= 0) return;
-		//System.out.println("Delete unite at i="+i);
-		Unite unite = unites[i-1];
-
+		// System.out.println("Delete unite at i="+i);
+		Unite unite = unites[i - 1];
+		
 		String id = navigationField.getText();
-
-		ConfirmDialog dialog = new ConfirmDialog(Display.getCurrent().getActiveShell(), 
-				"org.txm.annotation.urs.delete", 
-				NLS.bind(Messages.UnitToolbar_47, id), 
+		
+		ConfirmDialog dialog = new ConfirmDialog(Display.getCurrent().getActiveShell(),
+				"org.txm.annotation.urs.delete",
+				NLS.bind(Messages.UnitToolbar_47, id),
 				NLS.bind(Messages.UnitToolbar_48, id));
 		if (dialog.open() == ConfirmDialog.CANCEL) return;
-
-		//System.out.println("unite "+unite.toString());
+		
+		// System.out.println("unite "+unite.toString());
 		UnitToolbar.this.vue.getCorpus().supUnite(unite);
 		reloadIdentifiants();
-
+		
 		i = typeCombo.getSelectionIndex();
 		if (i > 0) {
 			highlightType();
 		}
 		this.extension.getSaveButton().setEnabled(true);
 		editor.fireIsDirty();
-
+		
 		if (e != null) editor.updateWordStyles();
 	}
-
+	
 	protected void onEditButtonSelected(SelectionEvent e) {
 		onEditButtonSelected(e, 3);
 	}
-
+	
 	protected void onEditButtonSelected(SelectionEvent e, int mode) {
 		if (mode == 0) { // select unit, select words, click the edit button -> deprecated
 			int i = navigationField.getSelectionIndex();
 			if (i == -1) return;
-			//System.out.println("Delete unite at i="+i);
-			Unite unite = unites[i-1];
+			// System.out.println("Delete unite at i="+i);
+			Unite unite = unites[i - 1];
 			int[] startend = getSelectionStartEndWordPositions();
 			if (startend != null) {
 				analecCorpus.modifBornesUnite(unite, startend[0], startend[1]);
@@ -824,14 +884,16 @@
 				highlightUnite(unite, false, -1);
 				updatePropertiesView(unite);
 			}
-		} else {
-			if (fixingAnnotationLimits > 0) { 
+		}
+		else {
+			if (fixingAnnotationLimits > 0) {
 				typeCombo.setEnabled(true);
 				navigationField.setEnabled(true);
 				createButton.setEnabled(true);
 				deleteButton.setEnabled(true);
 				fixingAnnotationLimits = 0;
-			} else {
+			}
+			else {
 				typeCombo.setEnabled(false);
 				navigationField.setEnabled(false);
 				createButton.setEnabled(false);
@@ -843,9 +905,10 @@
 		editor.fireIsDirty();
 		if (e != null) editor.updateWordStyles();
 	}
-
+	
 	/**
 	 * called when the NavigationField changed its selection
+	 * 
 	 * @param e
 	 */
 	public void onIdentifiantComboSelected(Object e) {
@@ -857,58 +920,60 @@
 				previousSelectedUnitIDS = null; // release memory
 			}
 			highlightType();
-
+			
 			clearPropertiesView(); // unload the selected element if any
 			createButton.setEnabled(false);
 			deleteButton.setEnabled(false);
 			editLeftButton.setEnabled(false);
 			editButton.setEnabled(false);
 			editRightButton.setEnabled(false);
-			//drop_b.setEnabled(false);
-			//navigationField.setSelectionIndex(i);
-		} else {
+			// drop_b.setEnabled(false);
+			// navigationField.setSelectionIndex(i);
+		}
+		else {
 			createButton.setEnabled(false);
 			deleteButton.setEnabled(true);
 			editLeftButton.setEnabled(true);
 			editButton.setEnabled(true);
 			editRightButton.setEnabled(true);
-			//drop_b.setEnabled(true);
-			//System.out.println("i="+i);
-			Unite unite = unites[i-1];
-			//System.out.println("unite="+unite);
-			//System.out.println("unite str="+uniteToWords(unite));
+			// drop_b.setEnabled(true);
+			// System.out.println("i="+i);
+			Unite unite = unites[i - 1];
+			// System.out.println("unite="+unite);
+			// System.out.println("unite str="+uniteToWords(unite));
 			highlightUnite(unite, true, -1);
-
+			
 			updatePropertiesView(unite);
 			deleteButton.setEnabled(true);
 			editLeftButton.setEnabled(true);
 			editButton.setEnabled(true);
 			editRightButton.setEnabled(true);
-			//drop_b.setEnabled(true);
+			// drop_b.setEnabled(true);
 		}
-
+		
 		if (e != null) editor.updateWordStyles();
 	}
-
+	
 	protected void onTypecomboSelected(SelectionEvent e) {
 		reloadIdentifiants();
-
+		
 		if (typeCombo.getSelectionIndex() > 0) {
-			//String type = unitesAVoir[typeCombo.getSelectionIndex()-1];
+			// String type = unitesAVoir[typeCombo.getSelectionIndex()-1];
 			highlightType();
 			navigationField.setEnabled(true);
-		} else {
+		}
+		else {
 			clearHighlight();
 			navigationField.setEnabled(false);
 		}
-
+		
 		createButton.setEnabled(false);
 		deleteButton.setEnabled(false);
 		editButton.setEnabled(false);
-		//drop_b.setEnabled(false);
+		// drop_b.setEnabled(false);
 		if (e != null) editor.updateWordStyles();
 	}
-
+	
 	/**
 	 * reload the identifiants combo
 	 * 
@@ -921,11 +986,11 @@
 		navigationField.setIdentifiants(identifiants, type0, Unite.class);
 		navigationField.setSelectionIndex(0);
 	}
-
+	
 	public void reloadUnits() {
-
+		
 		typesUnitesAVoir = vue.getTypesUnitesAVoir();
-		String[] items = new String[typesUnitesAVoir.length +1];
+		String[] items = new String[typesUnitesAVoir.length + 1];
 		System.arraycopy(typesUnitesAVoir, 0, items, 1, typesUnitesAVoir.length);
 		items[0] = Messages.UnitToolbar_54;
 		typeCombo.setItems(items);
@@ -933,20 +998,20 @@
 			typeCombo.select(0);
 		}
 		typeCombo.layout();
-
+		
 		onTypecomboSelected(null);
 	}
-
+	
 	protected void selectUniteInIdentifants(Unite unite) {
-		for (int i = 0 ; i < unites.length ; i++) {
-			//System.out.println("VS "+unites[i]);
+		for (int i = 0; i < unites.length; i++) {
+			// System.out.println("VS "+unites[i]);
 			if (unites[i] == unite) {
-				navigationField.setSelectionIndex(i+1);
+				navigationField.setSelectionIndex(i + 1);
 				return; // no need to go further
 			}
 		}
 	}
-
+	
 	public void setEnable(boolean enable) {
 		l.setEnabled(enable);
 		typeCombo.setEnabled(enable);
@@ -956,234 +1021,244 @@
 		editButton.setEnabled(enable);
 		editLeftButton.setEnabled(enable);
 		editRightButton.setEnabled(enable);
-		//drop_b.setEnabled(enable);
+		// drop_b.setEnabled(enable);
 	}
-
+	
 	@Override
 	public void traiterEvent(Message e) {
 		if (annotationArea.isDisposed()) return;
-
+		
 		if (e.getType().equals(TypeMessage.MODIF_STRUCTURE)) {
-			//System.out.println("UnitToolbar.traiterEvent: Update toolbar ");
+			// System.out.println("UnitToolbar.traiterEvent: Update toolbar ");
 			UnitToolbar.this.annotationArea.getDisplay().syncExec(new Runnable() {
+				
 				@Override
 				public void run() {
 					setEnable(!analecCorpus.isVide());
-					//reloadUnits();
+					// reloadUnits();
 				}
 			});
-		} else if (e.getType().equals(TypeMessage.MODIF_ELEMENT)) {
-			//System.out.println("UnitToolbar.traiterEvent: Update toolbar ");
+		}
+		else if (e.getType().equals(TypeMessage.MODIF_ELEMENT)) {
+			// System.out.println("UnitToolbar.traiterEvent: Update toolbar ");
 			UnitToolbar.this.annotationArea.getDisplay().syncExec(new Runnable() {
+				
 				@Override
 				public void run() {
-					//reloadUnits();
+					// reloadUnits();
 				}
 			});
 		}
 	}
-
+	
 	protected boolean tryHighlightingUnitsWord(String id, org.txm.searchengine.cqp.corpus.CQPCorpus c) throws CqiClientException {
 		EditionPanel panel = editor.getEditionPanel(0);
 		if (panel == null) return false;
 		if (id != null) {
-
+			
 		}
-		QueryResult r = c.query(new CQLQuery("[_.text_id=\""+panel.getEdition().getText().getName()+"\" & id=\""+id+"\"]"), "TMP", false); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		QueryResult r = c.query(new CQLQuery("[_.text_id=\"" + panel.getEdition().getText().getName() + "\" & id=\"" + id + "\"]"), "TMP", false); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		List<Match> matches = r.getMatches();
 		if (matches.size() == 0) {
 			System.out.println(NLS.bind(Messages.UnitToolbar_59, id));
 			return false;
 		}
 		int start = matches.get(0).getStart();
-		//System.out.println("start="+start);
+		// System.out.println("start="+start);
 		r.drop();
 		int i = 0;
-		ArrayList<Integer> matching_units = new ArrayList<Integer>();
+		ArrayList<Integer> matching_units = new ArrayList<>();
 		for (Unite u : unites) {
-			if (u.getDeb() <= start &&  start <= u.getFin()) {
+			if (u.getDeb() <= start && start <= u.getFin()) {
 				matching_units.add(i);
-			} else if (u.getDeb() > start) { // no need to search further
+			}
+			else if (u.getDeb() > start) { // no need to search further
 				continue;
 			}
 			i++;
 		}
-
+		
 		if (matching_units.size() > 0) {
 			// get index in matching_units of the current unit if any
-			int iUnite = matching_units.indexOf(navigationField.getSelectionIndex()-1);
-
+			int iUnite = matching_units.indexOf(navigationField.getSelectionIndex() - 1);
+			
 			if (iUnite == -1) iUnite = 0; // current unit is not present, take the first in matching_units
-			else iUnite = (iUnite+1)%matching_units.size(); // take the next unit in matching_units
-
+			else iUnite = (iUnite + 1) % matching_units.size(); // take the next unit in matching_units
+			
 			iUnite = matching_units.get(iUnite); // get the real unit position in 'unites'
-			navigationField.setSelectionIndex(iUnite+1, false); // call onIndentifiantComboChanged(...)
-
+			navigationField.setSelectionIndex(iUnite + 1, false); // call onIndentifiantComboChanged(...)
+			
 			createButton.setEnabled(false);
 			deleteButton.setEnabled(true);
 			editLeftButton.setEnabled(true);
 			editButton.setEnabled(true);
 			editRightButton.setEnabled(true);
-
+			
 			Unite unite = unites[iUnite];
-			int offset = start-unite.getDeb(); // to select the right page when the unit words overlap with 2 pages
+			int offset = start - unite.getDeb(); // to select the right page when the unit words overlap with 2 pages
 			highlightUnite(unite, true, offset);
-
+			
 			updatePropertiesView(unite);
-
+			
 			return true;
 		}
-
-
+		
+		
 		navigationField.setSelectionIndex(0);
-
+		
 		return false;
 	}
-
+	
 	protected boolean updateUniteLimits(Unite unite, String[] ids, int mode) throws CqiClientException {
-
+		
 		EditionPanel panel = UnitToolbar.this.editor.getEditionPanel(0);
 		String text_name = panel.getEdition().getText().getName();
-
+		
 		int[] startend = getStartEndWordPositions(maincorpus, ids, text_name);
 		if (startend == null) return false;
-
+		
 		int pos = startend[0];
-
+		
 		if (mode == 1) { // left
 			analecCorpus.modifBornesUnite(unite, pos, unite.getFin());
-		} else if (mode == 2) { // right
+		}
+		else if (mode == 2) { // right
 			analecCorpus.modifBornesUnite(unite, unite.getDeb(), pos);
-		} else if (mode == 3) { // choose using distance
+		}
+		else if (mode == 3) { // choose using distance
 			analecCorpus.modifBornesUnite(unite, startend[0], startend[1]);
 		}
-
+		
 		return true;
 	}
-
+	
+	@Override
 	public void selectNext() {
 		int i = navigationField.selectNext();
 	}
-
+	
+	@Override
 	public void selectPrevious() {
 		int i = navigationField.selectPrevious();
 	}
-
+	
 	@Override
 	public void selectFirst() {
 		int i = navigationField.selectFirst();
 	}
-
+	
 	@Override
 	public void select10Previous() {
 		int i = navigationField.select10Previous();
 	}
-
+	
 	@Override
 	public void select10Next() {
 		int i = navigationField.select10Next();
 	}
-
+	
 	@Override
 	public void selectLast() {
 		int i = navigationField.selectLast();
 	}
-
+	
 	@Override
 	public void select(Element currentElement) {
 		if (currentElement.getClass() == Unite.class) {
 			int i = Arrays.binarySearch(unites, currentElement);
-			if (i >= 0) navigationField.setSelectionIndex(i+1);
+			if (i >= 0) navigationField.setSelectionIndex(i + 1);
 		}
 	}
-
+	
 	@Override
 	public String getElementType() {
 		if (typeCombo.isDisposed()) return ""; //$NON-NLS-1$
 		return typeCombo.getText();
 	}
-
+	
 	@Override
 	public void onBackToText(Text text, String id) {
 		if (id.length() > 0) {
 			try {
 				tryHighlightingUnitsWord(id, this.getCQPCorpus());
-			} catch (CqiClientException e) {
+			}
+			catch (CqiClientException e) {
 				// TODO Auto-generated catch block
 				e.printStackTrace();
 			}
 		}
 	}
-
+	
 	@Override
 	public Class<? extends TXMResult> getAnnotatedTXMResultClass() {
 		return Text.class;
 	}
-
+	
 	@Override
 	public boolean save() {
-		//System.out.println("Saving Analec annotation...");
+		// System.out.println("Saving Analec annotation...");
 		if (URSCorpora.saveCorpus(analecCorpus)) {
 			this.extension.getSaveButton().setEnabled(false);
 			return true;
 		}
 		return false;
 	}
-
+	
 	@Override
 	public String getName() {
 		return "Unit";
 	}
-
+	
 	@Override
 	public boolean notifyStartOfCompute() throws Exception {
 		// TODO Auto-generated method stub
 		return false;
 	}
-
+	
 	@Override
 	public boolean notifyEndOfCompute() throws Exception {
 		// TODO Auto-generated method stub
 		return false;
 	}
-
+	
 	@Override
 	public void notifyEndOfRefresh() throws Exception {
 		// TODO Auto-generated method stub
 	}
-
+	
 	@Override
 	public void notifyStartOfCreatePartControl() throws Exception {
 		// TODO Auto-generated method stub
 	}
-
+	
 	@Override
 	public void notifyStartOfRefresh() throws Exception {
 		// TODO Auto-generated method stub
 	}
-
+	
 	ProgressListener pageProgressListener = null;
+	
 	@Override
 	protected ProgressListener getPageReloadListener() {
 		if (pageProgressListener != null) {
 			return pageProgressListener;
 		}
-
+		
 		pageProgressListener = new ProgressListener() {
-
+			
 			@Override
 			public void completed(ProgressEvent event) {
 				if (typeCombo.getSelectionIndex() >= 0) {
 					highlightType();
 				}
 			}
-
+			
 			@Override
-			public void changed(ProgressEvent event) { }
+			public void changed(ProgressEvent event) {}
 		};
 		return pageProgressListener;
 	}
-
+	
 	@Override
 	public boolean needToUpdateIndexes() {
 		return false;
@@ -1193,4 +1268,4 @@
 	public boolean hasChanges() {
 		return analecCorpus.isModifie();
 	}
-}
\ No newline at end of file
+}
Index: tmp/org.txm.analec.rcp/src/org/txm/annotation/urs/toolbar/SchemaToolbar.java
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/annotation/urs/toolbar/SchemaToolbar.java	(revision 3091)
+++ tmp/org.txm.analec.rcp/src/org/txm/annotation/urs/toolbar/SchemaToolbar.java	(revision 3092)
@@ -92,7 +92,7 @@
 	public boolean install(TXMEditor<? extends TXMResult> txmeditor, AnnotationExtension extension, Composite parent, int position) throws Exception {
 		super.install(txmeditor, extension, parent, position);
 		
-		annotationArea.getLayout().numColumns = 7;
+		annotationArea.getLayout().numColumns = 8;
 		annotationArea.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
 		
 		String color_palette = URSPreferences.getInstance().getString(URSPreferences.COLOR_PALETTE);
Index: tmp/org.txm.analec.rcp/src/org/txm/annotation/urs/toolbar/URSAnnotationToolbar.java
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/annotation/urs/toolbar/URSAnnotationToolbar.java	(revision 3091)
+++ tmp/org.txm.analec.rcp/src/org/txm/annotation/urs/toolbar/URSAnnotationToolbar.java	(revision 3092)
@@ -8,12 +8,14 @@
 import org.eclipse.swt.events.KeyListener;
 import org.eclipse.swt.events.MenuListener;
 import org.eclipse.swt.events.MouseListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.ToolItem;
 import org.txm.annotation.rcp.editor.AnnotationArea;
 import org.txm.annotation.rcp.editor.AnnotationExtension;
 import org.txm.annotation.urs.URSCorpora;
-import org.txm.annotation.urs.Messages;
 import org.txm.annotation.urs.view.ElementPropertiesView;
 import org.txm.annotation.urs.view.ElementSearchView;
 import org.txm.core.results.TXMResult;
@@ -21,14 +23,15 @@
 import org.txm.edition.rcp.editors.RGBA;
 import org.txm.edition.rcp.editors.SynopticEditionEditor;
 import org.txm.objects.Text;
+import org.txm.rcp.IImageKeys;
 import org.txm.rcp.editors.TXMEditor;
 import org.txm.rcp.swt.GLComposite;
 import org.txm.rcp.views.corpora.CorporaView;
 import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
 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.searchengine.cqp.corpus.query.Match;
-import org.txm.searchengine.cqp.corpus.query.CQLQuery;
 import org.txm.utils.logger.Log;
 
 import visuAnalec.Message;
@@ -40,42 +43,59 @@
 import visuAnalec.vue.Vue;
 
 public abstract class URSAnnotationToolbar extends AnnotationArea implements CorpusListener {
-
-	//see https://groupes.renater.fr/wiki/txm-info/public/specs_charte_graphique
+	
+	// see https://groupes.renater.fr/wiki/txm-info/public/specs_charte_graphique
 	public static final RGBA blue = new RGBA(152, 159, 201, 0.7f);
+	
 	public static final RGBA lightblue = new RGBA(185, 193, 239, 0.4f);
+	
 	public static final RGBA green = new RGBA(122, 153, 0, 0.7f);
+	
 	public static final RGBA lightgreen = new RGBA(206, 240, 83, 0.5f);
-	public static final RGBA yellow = new RGBA(255,255,50, 1f);
-	public static final RGBA lightyellow = new RGBA(255,255,176, 0.5f);
-
+	
+	public static final RGBA yellow = new RGBA(255, 255, 50, 1f);
+	
+	public static final RGBA lightyellow = new RGBA(255, 255, 176, 0.5f);
+	
 	protected Corpus analecCorpus;
+	
 	protected Vue vue;
+	
 	protected MainCorpus maincorpus;
+	
 	protected SynopticEditionEditor editor;
+	
 	protected ToolItem button;
-
-	public URSAnnotationToolbar() { }
-
+	
+	private Button closeButton;
+	
+	public URSAnnotationToolbar() {}
+	
 	public abstract void selectFirst();
+	
 	public abstract void selectPrevious();
+	
 	public abstract void select10Previous();
+	
 	public abstract void select10Next();
+	
 	public abstract void selectNext();
+	
 	public abstract void selectLast();
+	
 	public abstract void select(Element currentElement);
-
+	
 	@Override
 	public boolean install(TXMEditor<? extends TXMResult> txmeditor, AnnotationExtension extension, Composite parent, int position) throws Exception {
-
+		
 		this.extension = extension;
 		this.editor = (SynopticEditionEditor) txmeditor;
 		this.maincorpus = (MainCorpus) this.editor.getCorpus();
 		analecCorpus = URSCorpora.getCorpus(maincorpus);
 		vue = URSCorpora.getVue(maincorpus);
-
+		
 		annotationArea = new GLComposite(parent, SWT.NONE, "Unit annotation");
-
+		
 		if (getEditorClickListener() != null)
 			editor.getEditionPanel(0).getBrowser().addMouseListener(getEditorClickListener());
 		if (getMenuListener() != null)
@@ -84,52 +104,66 @@
 			editor.getEditionPanel(0).getBrowser().addKeyListener(getEditorKeyListener());
 		if (getEditorKeyListener() != null)
 			editor.getEditionPanel(0).getBeforeHighlighListeners().add(getPageReloadListener());
-
+		
 		if (analecCorpus.getStructure().isVide()) {
 			analecCorpus.ajouterType(Unite.class, "Entity");
 			analecCorpus.ajouterProp(Unite.class, "Entity", "Property");
 		}
-
+		
 		button = extension.getSaveButton();
 		button.setEnabled(analecCorpus.isModifie());
+		
+		closeButton = new Button(annotationArea, SWT.PUSH);
+		closeButton.setImage(IImageKeys.getImage(IImageKeys.ACTION_DELETE));
+		closeButton.addSelectionListener(new SelectionListener() {
+			
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				extension.closeArea(URSAnnotationToolbar.this, true);
+			}
+			
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {}
+		});
 		return true;
 	}
-
-
+	
+	
 	protected abstract ProgressListener getPageReloadListener();
-
+	
 	public Corpus getAnalecCorpus() {
 		return analecCorpus;
 	}
-
+	
 	protected void updatePropertiesView(Element element) {
 		ElementPropertiesView view = ElementPropertiesView.openView();
 		if (view != null) view.loadElement(this.maincorpus, this.analecCorpus, element, this);
 	}
-
+	
+	@Override
 	public boolean isDirty() {
 		if (analecCorpus != null) return analecCorpus.isModifie();
 		return false;
 	}
-
+	
 	public boolean isDisposed() {
 		return annotationArea == null || annotationArea.isDisposed();
 	}
-
+	
 	protected void clearPropertiesView() {
 		ElementPropertiesView view = ElementPropertiesView.openView();
 		if (view != null) {
 			view.unloadElement(this.analecCorpus, this);
 		}
 	}
-
+	
 	protected static void setFocusInPropertiesView() {
 		ElementPropertiesView view = ElementPropertiesView.openView();
 		if (view != null) {
 			view.setFocusOnProperty();
 		}
 	}
-
+	
 	protected int[] getSelectionStartEndWordPositions() {
 		EditionPanel panel = this.editor.getEditionPanel(0);
 		String text_name = panel.getEdition().getText().getName();
@@ -138,65 +172,70 @@
 			Log.severe("** Error: no word selection");
 			return null;
 		}
-		//System.out.println("Selection="+sel);
+		// System.out.println("Selection="+sel);
 		try {
 			return getStartEndWordPositions(maincorpus, sel, text_name);
-		} catch (CqiClientException e1) {
+		}
+		catch (CqiClientException e1) {
 			e1.printStackTrace();
 		}
 		return null;
 	}
-
+	
 	protected int[] getStartEndWordPositions(MainCorpus c, String[] ids, String text_name) throws CqiClientException {
-		//System.out.println("IDS="+Arrays.toString(ids));
-		CQLQuery query = new CQLQuery("[_.text_id=\""+text_name+"\" & id=\""+StringUtils.join(ids, "|")+"\"]"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		// System.out.println("IDS="+Arrays.toString(ids));
+		CQLQuery query = new CQLQuery("[_.text_id=\"" + text_name + "\" & id=\"" + StringUtils.join(ids, "|") + "\"]"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		QueryResult result = c.query(query, "TMP", false); //$NON-NLS-1$
 		List<Match> matches = result.getMatches();
 		int start, end;
-		//		try {
-		//			int[] indexes = CQPSearchEngine.getCqiClient().str2Id(c.getProperty("id").getQualifiedName(), ids);
-		//			int[] positions = CQPSearchEngine.getCqiClient().id2Cpos(c.getProperty("id").getQualifiedName(), indexes);
-		//		
-		//		} catch (Exception e) {
-		//			
-		//		}
+		// try {
+		// int[] indexes = CQPSearchEngine.getCqiClient().str2Id(c.getProperty("id").getQualifiedName(), ids);
+		// int[] positions = CQPSearchEngine.getCqiClient().id2Cpos(c.getProperty("id").getQualifiedName(), indexes);
+		//
+		// } catch (Exception e) {
+		//
+		// }
 		if (matches.size() == 0) {
-			System.out.println("Error: no match for query="+query);
+			System.out.println("Error: no match for query=" + query);
 			return null;
-		} else {
+		}
+		else {
 			start = matches.get(0).getStart();
-			end = matches.get(matches.size()-1).getStart();
+			end = matches.get(matches.size() - 1).getStart();
 		}
 		result.drop();
-		return new int[]{start, end};
+		return new int[] { start, end };
 	}
-
+	
 	// listen to corpus structure modification -> enable/disable the button
 	// and to new annotations -> set the star modifier to the Corpus view
 	protected CorpusListener corpusListener = new CorpusListener() {
+		
 		@Override
 		public void traiterEvent(final Message e) {
 			if (maincorpus == null) return;
-
-			//System.out.println("StartButton.corpusListener.traiterEvent: "+e);
-
+			
+			// System.out.println("StartButton.corpusListener.traiterEvent: "+e);
+			
 			button.getDisplay().syncExec(new Runnable() {
+				
 				@Override
 				public void run() {
 					if (e.getType() == TypeMessage.MODIF_STRUCTURE) {
 						boolean ready = URSCorpora.isAnnotationStructureReady(maincorpus);
 						button.setEnabled(ready);
-						//if (!ready && utoolbar != null && !utoolbar.isDisposed()) utoolbar.clearHighlight();
+						// if (!ready && utoolbar != null && !utoolbar.isDisposed()) utoolbar.clearHighlight();
 					}
-
+					
 					if (e.getType() == TypeMessage.MODIF_ELEMENT) {
 						button.setEnabled(URSCorpora.isAnnotationStructureReady(maincorpus));
 						if (!maincorpus.isModified()) {
 							maincorpus.setIsModified(true); // to show the * in corpora view
 							updateCorporaView(maincorpus);
 						}
-
-					} else if (e.getType() == TypeMessage.CORPUS_SAVED) {
+						
+					}
+					else if (e.getType() == TypeMessage.CORPUS_SAVED) {
 						button.setEnabled(false);
 						if (maincorpus.isModified()) {
 							maincorpus.setIsModified(false); // to remove the * in corpora view
@@ -205,14 +244,14 @@
 					}
 				}
 			});
-
+			
 		}
 	};
-
+	
 	public static void updateCorporaView(final MainCorpus corpus) {
 		CorporaView.refreshObject(corpus);
 	}
-
+	
 	@Override
 	public boolean discardChanges() {
 		if (maincorpus.isModified()) {
@@ -224,25 +263,33 @@
 		}
 		return false;
 	}
-
+	
 	public abstract MenuListener getMenuListener();
+	
 	public abstract MouseListener getEditorClickListener();
+	
 	public abstract KeyListener getEditorKeyListener();
+	
 	public abstract void clearHighlight();
+	
 	public abstract void onBackToText(Text text, String id);
-
+	
+	@Override
 	public SynopticEditionEditor getEditor() {
 		return editor;
 	}
-
+	
+	@Override
 	public void _close() {
-
+		
 		this.clearHighlight();
-
+		
 		try {
 			analecCorpus.removeEventListener(this);
-		} catch(Exception e) { }
-
+		}
+		catch (Exception e) {
+		}
+		
 		if (!editor.isDisposed()) {
 			if (this.getEditorClickListener() != null)
 				editor.getEditionPanel(0).getBrowser().removeMouseListener(this.getEditorClickListener());
@@ -254,18 +301,18 @@
 				editor.getEditionPanel(0).getBeforeHighlighListeners().remove(this.getPageReloadListener());
 		}
 		if (annotationArea != null && annotationArea.isDisposed()) annotationArea.dispose();
-
+		
 		ElementPropertiesView.closeView();
 		ElementSearchView.closeView();
 		analecCorpus.removeEventListener(corpusListener);
 	}
-
+	
 	public org.txm.searchengine.cqp.corpus.CQPCorpus getCQPCorpus() {
 		return maincorpus;
 	}
-
+	
 	public abstract String getElementType();
-
+	
 	public void fireIsDirty() {
 		editor.fireIsDirty();
 	}
