if (getDocument() != null) {
mShowAnnotationsMenu = new ShowAnnotationsMenu(
getDocumentProvider().getEditorAnnotationStatus(getEditorInput()),
getDocument().getCAS().getTypeSystem(), shownAnnotationTypes);
mShowAnnotationsMenu.addListener(new IShowAnnotationsListener() {
public void selectionChanged(Collection<Type> selection) {
// if changes selection is either larger, or smaller
// if larger an annotation type was added