/** * Closes the editor programmatically. * * @param save * if <code>true</code>, the content should be saved before * closing. */ public void close(final boolean save) { Display display = getSite().getShell().getDisplay(); display.asyncExec(new Runnable() { @Override public void run() { if (toolkit != null) { getSite().getPage().closeEditor(FormEditor.this, save); } } }); }
/** * Closes the editor programmatically. * * @param save * if <code>true</code>, the content should be saved before * closing. */ public void close(final boolean save) { Display display = getSite().getShell().getDisplay(); display.asyncExec(() -> { if (toolkit != null) { getSite().getPage().closeEditor(FormEditor.this, save); } }); }
@Override public void run() { if (toolkit != null) { getSite().getPage().closeEditor(FormEditor.this, save); } } });
@Override public void dispose() { if (fEditorSelectionChangedListener != null) { fEditorSelectionChangedListener.uninstall(getSelectionProvider()); fEditorSelectionChangedListener = null; } if (fOutlinePage != null) { fOutlinePage.dispose(); fOutlinePage = null; } if (isSelectionListener()) getEditor().getSite().getSelectionProvider().removeSelectionChangedListener(this); super.dispose(); }
public PDESourcePage(PDEFormEditor editor, String id, String title) { fId = id; initialize(editor); IPreferenceStore[] stores = new IPreferenceStore[2]; stores[0] = PDEPlugin.getDefault().getPreferenceStore(); stores[1] = EditorsUI.getPreferenceStore(); setPreferenceStore(new ChainedPreferenceStore(stores)); setRangeIndicator(new DefaultRangeIndicator()); if (isSelectionListener()) getEditor().getSite().getSelectionProvider().addSelectionChangedListener(this); }