@Override
  public void init(IEditorSite site, IEditorInput input) throws PartInitException {
    super.setSite(site);
    super.setInput(input);
    this.setPartName(input.getName());
    editorImage = input.getImageDescriptor().createImage();
    this.setTitleImage(editorImage);

    listener = new DatabaseEditorListener(this);
  }
Esempio n. 2
0
  protected void doSetInput(final IEditorInput input) throws CoreException {
    if (input == null) {
      throw new NullPointerException("input");
    }
    if (!(input instanceof RLiveDataEditorInput)) {
      throw new CoreException(
          new Status(
              IStatus.ERROR,
              RUI.PLUGIN_ID,
              -1,
              NLS.bind(
                  "The element ''{0}'' is not supported by the R data editor.", input.getName()),
              null));
    }

    super.setInput(input);

    setPartName(input.getName());
    setTitleToolTip(input.getToolTipText());
  }
Esempio n. 3
0
  protected void doSetInput(IEditorInput input) throws CoreException {
    if (input == null) {
      close(isSaveOnCloseNeeded());

    } else {
      IEditorInput oldInput = getEditorInput();
      if (oldInput != null) getDocumentProvider().disconnect(oldInput);

      super.setInput(input);

      updateDocumentProvider(input);

      IDocumentProvider provider = getDocumentProvider();

      provider.connect(input);

      initializeTitle(input);

      if (fSourceViewer != null) {
        initializeSourceViewer(input);
      }
    }
  }
 @Override
 protected void setInput(IEditorInput input) {
   super.setInput(input);
 }