@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 public void dispose() { if (fProjectionFileUpdater != null) { fProjectionFileUpdater.uninstall(); fProjectionFileUpdater = null; } if (fProject != null) { AutotoolsPropertyManager.getDefault().removeProjectPropertyListener(fProject, this); } super.dispose(); }