/**
  * Removes this instance from the given editor selection listeners.
  *
  * @param dialectEditor the {@link DialectEditor}.
  */
 private void removeSelectionListener(DialectEditor dialectEditor) {
   ISelectionProvider selectionProvider = dialectEditor.getEditorSite().getSelectionProvider();
   selectionProvider.removeSelectionChangedListener(this);
 }
 /**
  * Adds this instance as a {@link ISelectionChangedListener} on the given editor.
  *
  * @param editor the {@link DialectEditor}.
  */
 private void addSelectionListener(DialectEditor editor) {
   ISelectionProvider selectionProvider = editor.getEditorSite().getSelectionProvider();
   selectionProvider.addSelectionChangedListener(this);
 }