Index: tmp/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/concordance/KRAnnotation.java
===================================================================
--- tmp/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/concordance/KRAnnotation.java	(revision 2854)
+++ tmp/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/concordance/KRAnnotation.java	(revision 2855)
@@ -19,6 +19,7 @@
 import org.eclipse.jface.viewers.ISelectionChangedListener;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.jface.viewers.TableViewer;
 import org.eclipse.jface.viewers.TableViewerColumn;
 import org.eclipse.osgi.util.NLS;
@@ -134,7 +135,7 @@
 	public String getName() {
 		return KRAnnotationUIMessages.squencesDeMotsCatgorievaleur;
 	}
-	
+
 	@Override
 	public boolean install(TXMEditor<? extends TXMResult> txmeditor, AnnotationExtension ext, Composite parent, int position) throws Exception {
 
@@ -144,7 +145,7 @@
 		this.corpus = concordance.getCorpus();
 		this.annotations = new ConcordanceAnnotations(this.editor.getConcordance());
 		this.annotManager = KRAnnotationEngine.getAnnotationManager(corpus);
-		
+
 		TableViewer viewer = this.editor.getLineTableViewer();
 
 		// RESULT
@@ -152,7 +153,7 @@
 		if (position < 0) {
 			position = 3 + extension.getNumberOfAnnotationArea(); // after keyword column and previous annotation columns
 		}
-		
+
 		TableViewerColumn annotationColumnViewer = new TableViewerColumn(viewer, SWT.CENTER, position);
 		annotationColumn = annotationColumnViewer.getColumn();
 		annotationColumn.setText(KRAnnotationUIMessages.category);
@@ -216,9 +217,9 @@
 			Log.fine(" KR: "+kr); //$NON-NLS-1$
 			List<AnnotationType> krtypes = kr.getAllAnnotationTypes();
 			for (AnnotationType type : krtypes) {
-				 if (type.getEffect().equals(AnnotationEffect.SEGMENT)) {
-					 typesList.add(type);
-				 }
+				if (type.getEffect().equals(AnnotationEffect.SEGMENT)) {
+					typesList.add(type);
+				}
 			}
 
 			Log.fine(NLS.bind(KRAnnotationUIMessages.availableAnnotationTypesColonP0, typesList));
@@ -299,7 +300,7 @@
 			annotationTypesCombo.getCombo().select(0);
 			annotations.setViewAnnotation(typesList.get(0));
 		}
-		
+
 		annotationTypesCombo.addSelectionChangedListener(new ISelectionChangedListener() {
 			@Override
 			public void selectionChanged(SelectionChangedEvent event) {
@@ -382,11 +383,12 @@
 					if (dialog.open() == InputDialog.OK) {
 						String name = dialog.getValue();
 						if (name.trim().length() == 0) return;
-						String baseid = AsciiUtils.buildId(name);
 						String id = AsciiUtils.buildId(name);
-						int c = 1;
-						while (kr.getType(id) != null) {
-							id = baseid+"_"+(c++); //$NON-NLS-1$
+						AnnotationType existingType = kr.getType(id);
+						if (existingType != null) {
+							Log.warning(NLS.bind("The ''{0}'' annotation type already exists. Please use another name ({1}).", id, name));
+							annotationTypesCombo.setSelection(new StructuredSelection(existingType));
+							return;
 						}
 						AnnotationType type = kr.addType(name, id, ""); //$NON-NLS-1$
 						type.setEffect(AnnotationEffect.SEGMENT);
@@ -532,51 +534,51 @@
 			@Override
 			public void widgetDefaultSelected(SelectionEvent e) { }
 		});
-//		Button saveAnnotationButton = new Button(annotationArea, SWT.PUSH);
-//		saveAnnotationButton.setToolTipText(KRAnnotationUIMessages.saveTheAnnotations);
-//		saveAnnotationButton.setImage(IImageKeys.getImage(IImageKeys.PENCIL_SAVE));
-//
-//		saveAnnotationButton.addSelectionListener(new SelectionListener() {
-//			@Override
-//			public void widgetSelected(SelectionEvent e) {
-//
-//				try {
-//					AnnotationManager am = KRAnnotationEngine.getAnnotationManager(corpus);
-//					if (am != null && am.hasChanges()) {
-//						// && MessageDialog.openConfirm(e.display.getActiveShell(), "Confirm annotation save", "Saving annotation will close this editor. Are you sure you want to save annotations right now ?")
-//						JobHandler saveJob = SaveAnnotations.save(corpus.getMainCorpus());
-//						
-//						if (saveJob == null || saveJob.getResult() == Status.CANCEL_STATUS) {
-//							// update editor corpus
-//							System.out.println("Fail to save annotations of the corpus."); //$NON-NLS-1$
-//						}
-//						
-//						CorporaView.refresh();
-//					}
-//				} catch(Exception ex) {
-//					ex.printStackTrace();
-//				}
-//			}
-//
-//			@Override
-//			public void widgetDefaultSelected(SelectionEvent e) { }
-//		});
-		
+		//		Button saveAnnotationButton = new Button(annotationArea, SWT.PUSH);
+		//		saveAnnotationButton.setToolTipText(KRAnnotationUIMessages.saveTheAnnotations);
+		//		saveAnnotationButton.setImage(IImageKeys.getImage(IImageKeys.PENCIL_SAVE));
+		//
+		//		saveAnnotationButton.addSelectionListener(new SelectionListener() {
+		//			@Override
+		//			public void widgetSelected(SelectionEvent e) {
+		//
+		//				try {
+		//					AnnotationManager am = KRAnnotationEngine.getAnnotationManager(corpus);
+		//					if (am != null && am.hasChanges()) {
+		//						// && MessageDialog.openConfirm(e.display.getActiveShell(), "Confirm annotation save", "Saving annotation will close this editor. Are you sure you want to save annotations right now ?")
+		//						JobHandler saveJob = SaveAnnotations.save(corpus.getMainCorpus());
+		//						
+		//						if (saveJob == null || saveJob.getResult() == Status.CANCEL_STATUS) {
+		//							// update editor corpus
+		//							System.out.println("Fail to save annotations of the corpus."); //$NON-NLS-1$
+		//						}
+		//						
+		//						CorporaView.refresh();
+		//					}
+		//				} catch(Exception ex) {
+		//					ex.printStackTrace();
+		//				}
+		//			}
+		//
+		//			@Override
+		//			public void widgetDefaultSelected(SelectionEvent e) { }
+		//		});
+
 		Button closeButton = new Button(annotationArea, SWT.PUSH);
 		closeButton.setToolTipText(KRAnnotationUIMessages.closeTheToolbarWithoutSaving);
 		closeButton.setImage(IImageKeys.getImage(IImageKeys.ACTION_DELETE));
 		closeButton.setLayoutData(new GridData(GridData.END, GridData.CENTER, true, false));
 		closeButton.addSelectionListener(new SelectionListener() {
-			
+
 			@Override
 			public void widgetSelected(SelectionEvent e) {
 				extension.removeAnnotationArea(KRAnnotation.this);
 			}
-			
+
 			@Override
 			public void widgetDefaultSelected(SelectionEvent e) {}
 		});
-		
+
 		updateAnnotationWidgetStates();
 		editor.layout(true);
 
@@ -599,7 +601,7 @@
 			return false;
 		}
 	}
-	
+
 	protected void affectAnnotationToSelection(ISelection selection) {
 
 		final IStructuredSelection lineSelection = (IStructuredSelection) selection;
@@ -614,7 +616,7 @@
 
 	protected AnnotationType getSelectedAnnotationType() {
 		if (annotationTypesCombo.getCombo().isDisposed()) return null;
-		
+
 		IStructuredSelection isel = (IStructuredSelection)annotationTypesCombo.getSelection();
 		if (isel.isEmpty()) {
 			return null;
@@ -654,6 +656,8 @@
 
 	public void updateAnnotationWidgetStates() {
 		if (annotationArea == null) return; // :)
+		if (annotationArea.isDisposed()) return;
+
 		annotationArea.getDisplay().syncExec(new Runnable() {
 
 			@Override
@@ -683,9 +687,9 @@
 					}
 				}
 
-					if (infosAnnotTypeSelectedLink != null) {
-						infosAnnotTypeSelectedLink.setEnabled(getSelectedAnnotationType() != null);
-					}
+				if (infosAnnotTypeSelectedLink != null) {
+					infosAnnotTypeSelectedLink.setEnabled(getSelectedAnnotationType() != null);
+				}
 				if (addTypedValueLink != null) {
 					addTypedValueLink.setEnabled(getSelectedAnnotationType() != null);
 				}
@@ -860,24 +864,28 @@
 	}
 
 	public boolean notifyStartOfCompute() throws Exception {
-		if (annotationArea != null) {
-			annotationArea.getDisplay().syncExec(new Runnable() {
-				@Override
-				public void run() {
-					AnnotationType type = getSelectedAnnotationType();
-					if (type != null) {
-						annotations.setViewAnnotation(type);
-						annotations.setAnnotationOverlap(true);
-					}
+		if (annotationArea == null) return false;
+		if (annotationArea.isDisposed()) return false;
+
+		annotationArea.getDisplay().syncExec(new Runnable() {
+			@Override
+			public void run() {
+				AnnotationType type = getSelectedAnnotationType();
+				if (type != null) {
+					annotations.setViewAnnotation(type);
+					annotations.setAnnotationOverlap(true);
 				}
-			});
-		}
+			}
+		});
+
 		return true;
 	}
 
 	public boolean notifyEndOfCompute() throws Exception {
 		updateAnnotationWidgetStates();
-
+		if (annotationArea == null) return false;
+		if (annotationArea.isDisposed()) return false;
+		
 		// update annotation column width
 		if (annotationArea != null) {
 			annotationArea.getDisplay().syncExec(new Runnable() {
@@ -937,13 +945,13 @@
 	@Override
 	public void notifyEndOfRefresh() throws Exception {
 		// TODO Auto-generated method stub
-		
+
 	}
 
 	@Override
 	public void notifyStartOfCreatePartControl() throws Exception {
 		// TODO Auto-generated method stub
-		
+
 	}
 
 	@Override
@@ -956,7 +964,7 @@
 	public Class<? extends TXMResult> getAnnotatedTXMResultClass() {
 		return Concordance.class;
 	}
-	
+
 	public boolean isDirty() {
 		return annotManager != null;
 	}
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 2854)
+++ tmp/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/concordance/WordAnnotationToolbar.java	(revision 2855)
@@ -130,7 +130,7 @@
 	public String getName() {
 		return KRAnnotationUIMessages.motsPropritsInfDfaut;
 	}
-	
+
 	@Override
 	public boolean allowMultipleAnnotations() {
 		return true;
@@ -217,7 +217,7 @@
 		}
 
 		Log.info(TXMCoreMessages.bind(KRAnnotationUIMessages.AffectP0ToSelectionEqualsP1, value_to_add.getId(), value_to_add.getTypeID(), matches.size()));
-		
+
 		// finally we can 'try' to create the annotations \o/
 		try {
 			HashMap<Match, List<Annotation>> existingAnnots = annotManager.createAnnotations(type, value_to_add, matches, job);
@@ -270,7 +270,7 @@
 			}
 		});
 	}
-	
+
 	protected void deleteAnnotationValues(ISelection selection) {
 
 		final IStructuredSelection lineSelection = (IStructuredSelection) selection;
@@ -282,7 +282,7 @@
 
 		deleteAnnotationValues(matches);
 	}
-	
+
 	protected void deleteAnnotationValues(final List<Match> matches) {
 		final AnnotationType type = getSelectedAnnotationType();
 
@@ -386,7 +386,7 @@
 		if (position < 0) {
 			position = 3 + extension.getNumberOfAnnotationArea(); // after keyword column and previous annotation columns
 		}
-		
+
 		annotationColumnViewer = new TableViewerColumn(viewer, SWT.CENTER, position);
 		annotationColumn = annotationColumnViewer.getColumn();
 		annotationColumn.setText(KRAnnotationUIMessages.property);
@@ -422,20 +422,20 @@
 					return EMPTYTEXT;
 				}
 			}
-			
+
 			@Override
 			public Font getFont(Object element) {
 				Line line = (Line)element;
-				
+
 				AnnotationLine annotationLine = annotations.getAnnotationLine(line);
 				if (annotationLine == null) return null;
-				
+
 				Annotation a = annotationLine.getAnnotation();
 				if (a == null) return null;
 
 				String value = annotationLine.getAnnotationValue().getStandardName();
 				if (a instanceof CQPAnnotation) return null;
-				
+
 				return annotationColummnFont;
 			}
 		});
@@ -492,7 +492,7 @@
 		gdata.widthHint = 90;
 
 		new Label(annotationArea, SWT.NONE).setText(TXMCoreMessages.common_property);
-		
+
 		//Display combo with list of Annotation Type 
 		annotationTypesCombo = new ComboViewer(annotationArea, SWT.READ_ONLY);
 		annotationTypesCombo.setContentProvider(new ArrayContentProvider());
@@ -506,30 +506,30 @@
 				return ((AnnotationType)element).getName(); //$NON-NLS-1$
 			}
 		});
-//		annotationTypesCombo.getCombo().addKeyListener(new KeyListener() {
-//			
-//			@Override
-//			public void keyReleased(KeyEvent e) {
-//				if (e.keyCode == SWT.CR || e.keyCode == SWT.KEYPAD_CR) {
-//					String name = annotationTypesCombo.getCombo().getText();
-//					if (currentKnowledgeRepository.getType(name) == null) {
-//						createNewType(e, name);
-//					} else {
-//						for (AnnotationType type : typesList) {
-//							if (name.equals(type.getId())) {
-//								StructuredSelection selection = new StructuredSelection(type);
-//								annotationTypesCombo.setSelection(selection, true);
-//								break;
-//							}
-//						}
-//					}
-//				}
-//			}
-//			
-//			@Override
-//			public void keyPressed(KeyEvent e) { }
-//		});
-	
+		//		annotationTypesCombo.getCombo().addKeyListener(new KeyListener() {
+		//			
+		//			@Override
+		//			public void keyReleased(KeyEvent e) {
+		//				if (e.keyCode == SWT.CR || e.keyCode == SWT.KEYPAD_CR) {
+		//					String name = annotationTypesCombo.getCombo().getText();
+		//					if (currentKnowledgeRepository.getType(name) == null) {
+		//						createNewType(e, name);
+		//					} else {
+		//						for (AnnotationType type : typesList) {
+		//							if (name.equals(type.getId())) {
+		//								StructuredSelection selection = new StructuredSelection(type);
+		//								annotationTypesCombo.setSelection(selection, true);
+		//								break;
+		//							}
+		//						}
+		//					}
+		//				}
+		//			}
+		//			
+		//			@Override
+		//			public void keyPressed(KeyEvent e) { }
+		//		});
+
 		gdata = new GridData(SWT.CENTER, SWT.CENTER, false, false);
 		gdata.widthHint = 200;
 
@@ -538,13 +538,13 @@
 		annotationTypesCombo.getCombo().select(0);
 		annotations.setViewAnnotation(typesList.get(0));
 		annotationColumn.setText(typesList.get(0).getName());
-//		for (int i = 0 ; i < typesList.size(); i++) {
-//			String name = typesList.get(i).getName();
-//			if ("word".equals(name)) {
-//				annotations.setViewAnnotation(typesList.get(i));
-//				annotationColumn.setText(name);
-//			}
-//		}
+		//		for (int i = 0 ; i < typesList.size(); i++) {
+		//			String name = typesList.get(i).getName();
+		//			if ("word".equals(name)) {
+		//				annotations.setViewAnnotation(typesList.get(i));
+		//				annotationColumn.setText(name);
+		//			}
+		//		}
 
 		annotationTypesCombo.addSelectionChangedListener(new ISelectionChangedListener() {
 			@Override
@@ -552,7 +552,7 @@
 				onAnnotationTypeSelected(event);
 			}
 		});
-		
+
 		addAnnotationTypeLink = new Button(annotationArea, SWT.PUSH);
 		addAnnotationTypeLink.setToolTipText(KRAnnotationUIMessages.addANewCategory);
 		addAnnotationTypeLink.setImage(IImageKeys.getImage(IImageKeys.ACTION_ADD));
@@ -570,11 +570,12 @@
 				if (dialog.open() == InputDialog.OK) {
 					String name = dialog.getValue();
 					if (name.trim().length() == 0) return;
-					String baseid = AsciiUtils.buildId(name);
 					String id = AsciiUtils.buildId(name);
-					int c = 1;
-					while (kr.getType(id) != null) {
-						id = baseid+"_"+(c++); //$NON-NLS-1$
+					AnnotationType existingType = kr.getType(id);
+					if (existingType != null) {
+						Log.warning(NLS.bind("The ''{0}'' annotation type already exists. Please use another name ({1}).", id, name));
+						annotationTypesCombo.setSelection(new StructuredSelection(existingType));
+						return;
 					}
 					AnnotationType type = kr.addType(name, id, "", AnnotationEffect.TOKEN); //$NON-NLS-1$
 					typesList.add(type);
@@ -582,7 +583,7 @@
 					if (annotationTypesCombo != null) annotationTypesCombo.refresh();
 					if (typesList.size() == 1) {
 						if (annotationTypesCombo != null) annotationTypesCombo.getCombo().select(typesList.size()-1);
-						
+
 						if (concordance != null) {
 							annotations.setViewAnnotation(type);
 							annotations.setAnnotationOverlap(true);
@@ -590,7 +591,7 @@
 							editor.fillDisplayArea(false);
 						}
 						annotationArea.layout(true);
-						
+
 					} else {
 						if (typesList.size() > 1) {
 							if (annotationTypesCombo != null) {
@@ -632,7 +633,7 @@
 			@Override
 			public void keyPressed(KeyEvent e) { }
 		});
-		
+
 		addTypedValueLink = new Button(annotationArea, SWT.PUSH);
 		addTypedValueLink.setText("..."); //$NON-NLS-1$
 		addTypedValueLink.setToolTipText(KRAnnotationUIMessages.selectAValueAmongTheList);
@@ -685,7 +686,7 @@
 		});
 
 		new Label(annotationArea, SWT.NONE).setText(" ");
-		
+
 		affectAnnotationButton = new Button(annotationArea, SWT.PUSH);
 		affectAnnotationButton.setText(KRAnnotationUIMessages.oK);
 		affectAnnotationButton.setToolTipText(KRAnnotationUIMessages.proceedToAnnotation);
@@ -699,7 +700,7 @@
 			@Override
 			public void widgetDefaultSelected(SelectionEvent e) { }
 		});
-		
+
 		deleteAnnotationButton = new Button(annotationArea, SWT.PUSH);
 		deleteAnnotationButton.setText(KRAnnotationUIMessages.delete);
 		deleteAnnotationButton.setToolTipText(KRAnnotationUIMessages.delete);
@@ -735,7 +736,7 @@
 			@Override
 			public void widgetDefaultSelected(SelectionEvent e) { }
 		});
-		
+
 		addAnnotationTypeButton = new Button(annotationArea, SWT.PUSH);
 		addAnnotationTypeButton.setLayoutData(new GridData(GridData.END, GridData.CENTER, true, false));
 		addAnnotationTypeButton.setToolTipText(KRAnnotationUIMessages.addANewCategory);
@@ -744,15 +745,15 @@
 			@Override
 			public void widgetSelected(SelectionEvent e) {
 				try {
-//					int position = -1;
-//					TableColumn[] columns = editor.getLineTableViewer().getTable().getColumns();
-//					TableColumn column = annotationColumnViewer.getColumn();
-//					for (int i = 0 ; i < columns.length ; i++) {
-//						if (columns[i] == column) {
-//							position = i + 1; // after the current column
-//						}
-//					}
-//					int position = 3 + extension.getNumberOfAnnotationArea();
+					//					int position = -1;
+					//					TableColumn[] columns = editor.getLineTableViewer().getTable().getColumns();
+					//					TableColumn column = annotationColumnViewer.getColumn();
+					//					for (int i = 0 ; i < columns.length ; i++) {
+					//						if (columns[i] == column) {
+					//							position = i + 1; // after the current column
+					//						}
+					//					}
+					//					int position = 3 + extension.getNumberOfAnnotationArea();
 					extension.openAnnotationMode(new WordAnnotationToolbar(), -1);
 				} catch (Exception e1) {
 					// TODO Auto-generated catch block
@@ -763,18 +764,18 @@
 			@Override
 			public void widgetDefaultSelected(SelectionEvent e) { }
 		});
-		
+
 		Button closeButton = new Button(annotationArea, SWT.PUSH);
 		closeButton.setToolTipText(KRAnnotationUIMessages.closeTheToolbarWithoutSaving);
 		closeButton.setImage(IImageKeys.getImage(IImageKeys.ACTION_REMOVE));
-		
+
 		closeButton.addSelectionListener(new SelectionListener() {
-			
+
 			@Override
 			public void widgetSelected(SelectionEvent e) {
 				extension.removeAnnotationArea(WordAnnotationToolbar.this);
 			}
-			
+
 			@Override
 			public void widgetDefaultSelected(SelectionEvent e) {}
 		});
@@ -789,7 +790,7 @@
 		IStructuredSelection sel = (IStructuredSelection) annotationTypesCombo.getSelection();
 		AnnotationType type = (AnnotationType) sel.getFirstElement();
 		if (type == null) return;
-		
+
 		if (type.getSize() != AnnotationType.ValuesSize.LARGE) {
 			try {
 				KnowledgeRepository kr = KnowledgeRepositoryManager.getKnowledgeRepository(type.getKnowledgeRepository());
@@ -814,7 +815,7 @@
 	}
 
 	protected void createNewType(TypedEvent e, String typeName) {
-		
+
 		if (currentKnowledgeRepository == null) return;
 		if (!(currentKnowledgeRepository instanceof LocalKnowledgeRepository)) return;
 
@@ -836,28 +837,28 @@
 			StructuredSelection selection = new StructuredSelection(type);
 			annotationTypesCombo.setSelection(selection, true);
 
-//			if (annotationTypesCombo != null) annotationTypesCombo.refresh();
-//			if (typesList.size() == 1) {
-//				if (annotationTypesCombo != null) annotationTypesCombo.getCombo().select(0);
-//				annotations.setViewAnnotation(type);
-//				annotations.setAnnotationOverlap(true);
-//				try {
-//					editor.refresh(false);
-//				} catch (Exception e1) {
-//					// TODO Auto-generated catch block
-//					e1.printStackTrace();
-//				}
-//				annotationArea.layout(true);
-//			} else {
-//				if (typesList.size() > 1) {
-//					if (annotationTypesCombo != null) {
-//						annotationTypesCombo.getCombo().select(typesList.size()-1);
-//					}
-//				}
-//			}
-//			KRView.refresh();
-//			updateAnnotationWidgetStates();
-			
+			//			if (annotationTypesCombo != null) annotationTypesCombo.refresh();
+			//			if (typesList.size() == 1) {
+			//				if (annotationTypesCombo != null) annotationTypesCombo.getCombo().select(0);
+			//				annotations.setViewAnnotation(type);
+			//				annotations.setAnnotationOverlap(true);
+			//				try {
+			//					editor.refresh(false);
+			//				} catch (Exception e1) {
+			//					// TODO Auto-generated catch block
+			//					e1.printStackTrace();
+			//				}
+			//				annotationArea.layout(true);
+			//			} else {
+			//				if (typesList.size() > 1) {
+			//					if (annotationTypesCombo != null) {
+			//						annotationTypesCombo.getCombo().select(typesList.size()-1);
+			//					}
+			//				}
+			//			}
+			//			KRView.refresh();
+			//			updateAnnotationWidgetStates();
+
 			//onAnnotationTypeSelected(null);
 		} else {
 			System.out.println("Creation aborted."); //$NON-NLS-1$
@@ -889,7 +890,7 @@
 			return false;
 		}
 	}
-	
+
 	@Override
 	public boolean hasChanges() {
 		AnnotationManager am;
@@ -909,13 +910,15 @@
 
 	@Override
 	public boolean notifyStartOfCompute() throws Exception {
-		if (annotationArea != null) {
-			AnnotationType type = getSelectedAnnotationType();
-			if (type != null) {
-				annotations.setViewAnnotation(type);
-				annotations.setAnnotationOverlap(true);
-			}
+		if (annotationArea == null) return false;
+		if (annotationArea.isDisposed()) return false;
+
+		AnnotationType type = getSelectedAnnotationType();
+		if (type != null) {
+			annotations.setViewAnnotation(type);
+			annotations.setAnnotationOverlap(true);
 		}
+
 		return true;
 	}
 
@@ -930,9 +933,12 @@
 
 	@Override
 	public void notifyStartOfRefresh() throws Exception {
+		if (annotationArea == null) return;
+		if (annotationArea.isDisposed()) return;
+
 		List<Line> lines = concordance.getLines(concordance.getTopIndex(), concordance.getTopIndex()+concordance.getNLinePerPage());
 		annotations.computeLines(lines);
-		
+
 		updateAnnotationWidgetStates();
 
 		// update annotation column width
