/**
  * Selects the given range on the editor.
  *
  * @param newOffset the selection offset
  * @param newLength the selection range
  */
 protected void selectAndReveal(final int newOffset, final int newLength) {
   final ITextEditor editor = getTextEditor();
   if (editor instanceof ErlangEditor) {
     final ErlangEditor erlEditor = (ErlangEditor) editor;
     erlEditor.selectAndReveal(newOffset, newLength);
   } else {
     // this is too intrusive, but will never get called anyway
     getTextEditor().selectAndReveal(newOffset, newLength);
   }
 }