/** * The <code>PropertySheetPage</code> implementation of this <code>IPage</code> method * calls <code>makeContributions</code> for backwards compatibility with * previous versions of <code>IPage</code>. * <p> * Subclasses may reimplement. * </p> */ @Override public void setActionBars(IActionBars actionBars) { super.setActionBars(actionBars); cellEditorActionHandler = new CellEditorActionHandler(actionBars); cellEditorActionHandler.setCopyAction(copyAction); }
@Override public void cellEditorActivated(CellEditor cellEditor) { if (cellEditorActionHandler != null) { cellEditorActionHandler.addCellEditor(cellEditor); } }
/** * Disposes of this action handler */ public void dispose() { setCutAction(null); setCopyAction(null); setPasteAction(null); setDeleteAction(null); setSelectAllAction(null); setFindAction(null); setUndoAction(null); setRedoAction(null); Iterator itr = controlToEditor.keySet().iterator(); while (itr.hasNext()) { Control control = (Control) itr.next(); if (!control.isDisposed()) { control.removeListener(SWT.Activate, controlListener); control.removeListener(SWT.Deactivate, controlListener); } } controlToEditor.clear(); if (activeEditor != null) { activeEditor.removePropertyChangeListener(cellListener); } activeEditor = null; }
editorActionHandler = new CellEditorActionHandler(getViewSite() .getActionBars()); editorActionHandler.addCellEditor(descriptionEditor); editorActionHandler.setCopyAction(copyTaskAction); editorActionHandler.setPasteAction(pasteTaskAction); editorActionHandler.setDeleteAction(removeTaskAction); editorActionHandler.setSelectAllAction(selectAllAction);
.getActiveEditor().getEditorSite().getActionBars(); saveCurrentActions(actionBars); actionHandler = new CellEditorActionHandler(actionBars); actionHandler.addCellEditor(getCellEditor()); actionBars.updateActionBars();
/** * Creates the search list inner viewer. * @param parent the parent */ @Override public void createPartControl(Composite parent) { Assert.isTrue(fViewer == null); fViewer= new SearchResultViewer(this, parent); if (fMemento != null) fViewer.restoreState(fMemento); fMemento= null; SearchManager.getDefault().addSearchChangeListener(fViewer); fViewer.init(); // Add selectAll action handlers. fCellEditorActionHandler = new CellEditorActionHandler(getViewSite().getActionBars()); fSelectAllAction= new SelectAllAction(); fSelectAllAction.setViewer(fViewer); fCellEditorActionHandler.setSelectAllAction(fSelectAllAction); fillActionBars(getViewSite().getActionBars()); fPropertyChangeListener= event -> { if (SearchPreferencePage.POTENTIAL_MATCH_FG_COLOR.equals(event.getProperty()) || SearchPreferencePage.EMPHASIZE_POTENTIAL_MATCHES.equals(event.getProperty())) if (fViewer != null) fViewer.updatedPotentialMatchFgColor(); }; SearchPlugin.getDefault().getPreferenceStore().addPropertyChangeListener(fPropertyChangeListener); PlatformUI.getWorkbench().getHelpSystem().setHelp(fViewer.getControl(), SearchPlugin.getDefault().getSearchViewHelpContextId()); }
/** * @see org.eclipse.gef.tools.DirectEditManager#bringDown() */ protected void bringDown() { if (actionHandler != null) { actionHandler.dispose(); actionHandler = null; } if (actionBars != null) { restoreSavedActions(actionBars); actionBars.updateActionBars(); actionBars = null; } Font disposeFont = scaledFont; scaledFont = null; super.bringDown(); if (disposeFont != null) disposeFont.dispose(); }
public void cellEditorDeactivated(CellEditor cellEditor) { if (cellEditorActionHandler != null) { cellEditorActionHandler.removeCellEditor(cellEditor); } } };
actionHandler = new CellEditorActionHandler(actionBars); actionHandler.addCellEditor(getCellEditor()); actionBars.updateActionBars();
fCellEditorActionHandler = new CellEditorActionHandler(getViewSite().getActionBars()); fSelectAllAction= new SelectAllAction(); fSelectAllAction.setViewer(fViewer); fCellEditorActionHandler.setSelectAllAction(fSelectAllAction);
public void dispose() { if (fViewer != null) { SearchManager.getDefault().removeSearchChangeListener(fViewer); fViewer= null; } if (fPropertyChangeListener != null) SearchPlugin.getDefault().getPreferenceStore().removePropertyChangeListener(fPropertyChangeListener); if (fCellEditorActionHandler != null) { fCellEditorActionHandler.dispose(); fCellEditorActionHandler= null; } super.dispose(); }
@Override public void cellEditorDeactivated(CellEditor cellEditor) { if (cellEditorActionHandler != null) { cellEditorActionHandler.removeCellEditor(cellEditor); } } };
/** * The <code>PropertySheetPage</code> implementation of this <code>IPage</code> method * calls <code>makeContributions</code> for backwards compatibility with * previous versions of <code>IPage</code>. * <p> * Subclasses may reimplement. * </p> */ public void setActionBars(IActionBars actionBars) { super.setActionBars(actionBars); cellEditorActionHandler = new CellEditorActionHandler(actionBars); cellEditorActionHandler.setCopyAction(copyAction); }
@Override public void dispose() { if (fViewer != null) { SearchManager.getDefault().removeSearchChangeListener(fViewer); fViewer= null; } if (fPropertyChangeListener != null) SearchPlugin.getDefault().getPreferenceStore().removePropertyChangeListener(fPropertyChangeListener); if (fCellEditorActionHandler != null) { fCellEditorActionHandler.dispose(); fCellEditorActionHandler= null; } super.dispose(); }
public void cellEditorActivated(CellEditor cellEditor) { if (cellEditorActionHandler != null) { cellEditorActionHandler.addCellEditor(cellEditor); } }
@Override public void cellEditorDeactivated(CellEditor cellEditor) { if (cellEditorActionHandler != null) { cellEditorActionHandler.removeCellEditor(cellEditor); } } };
/** * The <code>PropertySheetPage</code> implementation of this <code>IPage</code> method * calls <code>makeContributions</code> for backwards compatibility with * previous versions of <code>IPage</code>. * <p> * Subclasses may reimplement. * </p> */ @Override public void setActionBars(IActionBars actionBars) { super.setActionBars(actionBars); cellEditorActionHandler = new CellEditorActionHandler(actionBars); cellEditorActionHandler.setCopyAction(copyAction); }
actionHandler.dispose(); actionHandler = null;
@Override public void cellEditorActivated(CellEditor cellEditor) { if (cellEditorActionHandler != null) { cellEditorActionHandler.addCellEditor(cellEditor); } }
@Override public void dispose() { super.dispose(); getSite().getPage().removePartListener(partListener); if (focusSelectionProvider != null) { focusSelectionProvider .removeSelectionChangedListener(focusSelectionChangedListener); focusSelectionProvider = null; } focusPart = null; if (editorActionHandler != null) { editorActionHandler.dispose(); editorActionHandler = null; } if (clipboard != null) { clipboard.dispose(); } }