delegate.setPruneHistory(true);
// get the installed original undo action handler String undo = ActionFactory.UNDO.getId(); IAction action = bars.getGlobalActionHandler(undo); if (action != null) { // set the new undo action bars.setGlobalActionHandler(undo, new GlobalUndoActionNoPrune(page)); if (action instanceof GlobalUndoAction) { // and properly dispose of the old one (the setUndoContext(null) // is needed to also properly dispose of the delegate of the // original GlobalUndoAction (which does the actual harm) ((GlobalUndoAction) action).setUndoContext(null); ((GlobalUndoAction) action).dispose(); } }
public Object getAdapter(Class type) { if (type == IPropertySheetPage.class) { return new PropertiesBrowserPageNoPrune(this); } return getAdapterGen(type); }
public void setActionBars(IActionBars actionBars) { ITabbedPropertySheetPageContributor contributor = this.getContributor(); if (contributor != null && contributor instanceof IWorkbenchPart) { actionBars.setGlobalActionHandler( ActionFactory.UNDO.getId(), new GlobalUndoActionNoPrune((IWorkbenchPart) contributor)); actionBars.setGlobalActionHandler( ActionFactory.REDO.getId(), new GlobalRedoActionNoPrune((IWorkbenchPart) contributor)); } }