Exemplo n.º 1
0
  @Override
  protected void doSetInput(IEditorInput newInput) throws CoreException {
    // If this editor is for a project file, remove this editor as a property
    // change listener.
    if (fProject != null)
      AutotoolsPropertyManager.getDefault().removeProjectPropertyListener(fProject, this);
    this.fProject = null;
    super.doSetInput(newInput);
    this.input = newInput;

    if (input instanceof IFileEditorInput) {
      IFile f = ((IFileEditorInput) input).getFile();
      fProject = f.getProject();
      // This is a project file.  We want to be notified if the Autoconf editor
      // properties are changed such that the macro versions are changed.
      AutotoolsPropertyManager.getDefault().addProjectPropertyListener(fProject, this);
    }
    getOutlinePage().setInput(input);
    try {
      IDocument document = getInputDocument();

      setRootElement(reparseDocument(document));
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
 @Override
 protected void doSetInput(IEditorInput newInput) throws CoreException {
   super.doSetInput(newInput);
   registerJBehaveProjectListener();
   validateAndMark();
 }
Exemplo n.º 3
0
 protected void doSetInput(IEditorInput editorInput) throws CoreException {
   super.doSetInput(editorInput);
   initializeResourceObject(editorInput);
   IDocument document = getDocumentProvider().getDocument(getEditorInput());
   document.addDocumentListener(new DocumentListener());
 }