default int getNavigationOffset() {
    FileEditorLocation location = getLocation();
    if (location instanceof TextEditorLocation) {
      LogicalPosition position = ((TextEditorLocation)location).getPosition();
      return ((TextEditor)location.getEditor()).getEditor().logicalPositionToOffset(position);
    }
    return -1;
  }
default int getNavigationOffset()