@Override public boolean matches(IUndoContext context) { if (this == context) return true; IUndoContext workspaceContext= ResourcesPlugin.getWorkspace().getAdapter(IUndoContext.class); if (workspaceContext == null) return false; return workspaceContext.matches(context); } }
public boolean matches(IUndoContext context) { if (this == context) return true; IUndoContext workspaceContext= (IUndoContext)ResourcesPlugin.getWorkspace().getAdapter(IUndoContext.class); if (workspaceContext == null) return false; return workspaceContext.matches(context); } }
@Override public boolean matches(IUndoContext context) { if (this == context) return true; IUndoContext workspaceContext= ResourcesPlugin.getWorkspace().getAdapter(IUndoContext.class); if (workspaceContext == null) return false; return workspaceContext.matches(context); } }
/** * Creates a new <code>RefactorActionGroup</code>. The group requires * that the selection provided by the part's selection provider is of type <code> * org.eclipse.jface.viewers.IStructuredSelection</code>. * * @param part the view part that owns this action group */ public RefactorActionGroup(IViewPart part) { this(part.getSite()); IUndoContext workspaceContext= (IUndoContext)ResourcesPlugin.getWorkspace().getAdapter(IUndoContext.class); fUndoRedoActionGroup= new UndoRedoActionGroup(part.getViewSite(), workspaceContext, true); }
public static IUndoContext getUndoContext() { if (fRefactoringUndoContext == null) { fRefactoringUndoContext= new RefactoringUndoContext(); IUndoContext workspaceContext= ResourcesPlugin.getWorkspace().getAdapter(IUndoContext.class); if (workspaceContext instanceof ObjectUndoContext) { ((ObjectUndoContext)workspaceContext).addMatch(fRefactoringUndoContext); } IOperationHistory operationHistory= OperationHistoryFactory.getOperationHistory(); operationHistory.setLimit(fRefactoringUndoContext, 5); } return fRefactoringUndoContext; }
public static IUndoContext getUndoContext() { if (fRefactoringUndoContext == null) { fRefactoringUndoContext= new RefactoringUndoContext(); IUndoContext workspaceContext= ResourcesPlugin.getWorkspace().getAdapter(IUndoContext.class); if (workspaceContext instanceof ObjectUndoContext) { ((ObjectUndoContext)workspaceContext).addMatch(fRefactoringUndoContext); } IOperationHistory operationHistory= OperationHistoryFactory.getOperationHistory(); operationHistory.setLimit(fRefactoringUndoContext, 5); } return fRefactoringUndoContext; }
public static IUndoContext getUndoContext() { if (fRefactoringUndoContext == null) { fRefactoringUndoContext= new RefactoringUndoContext(); IUndoContext workspaceContext= (IUndoContext)ResourcesPlugin.getWorkspace().getAdapter(IUndoContext.class); if (workspaceContext instanceof ObjectUndoContext) { ((ObjectUndoContext)workspaceContext).addMatch(fRefactoringUndoContext); } IOperationHistory operationHistory= OperationHistoryFactory.getOperationHistory(); operationHistory.setLimit(fRefactoringUndoContext, 5); } return fRefactoringUndoContext; }
/** * Creates a new <code>RefactorActionGroup</code>. The group requires * that the selection provided by the part's selection provider is of type <code> * org.eclipse.jface.viewers.IStructuredSelection</code>. * * @param part the view part that owns this action group */ public RefactorActionGroup(IViewPart part) { this(part.getSite(), null); IUndoContext workspaceContext= ResourcesPlugin.getWorkspace().getAdapter(IUndoContext.class); fUndoRedoActionGroup= new UndoRedoActionGroup(part.getViewSite(), workspaceContext, true); installQuickAccessAction(); }
/** * Creates a new <code>RefactorActionGroup</code>. The group requires * that the selection provided by the part's selection provider is of type <code> * org.eclipse.jface.viewers.IStructuredSelection</code>. * * @param part the view part that owns this action group */ public RefactorActionGroup(IViewPart part) { this(part.getSite(), null); IUndoContext workspaceContext= ResourcesPlugin.getWorkspace().getAdapter(IUndoContext.class); fUndoRedoActionGroup= new UndoRedoActionGroup(part.getViewSite(), workspaceContext, true); installQuickAccessAction(); }
public void init(ICommonActionExtensionSite aConfig) { this.aViewer = aConfig.getStructuredViewer(); makeActions(); IUndoContext workspaceContext = (IUndoContext) ResourcesPlugin .getWorkspace().getAdapter(IUndoContext.class); undoRedoGroup = new UndoRedoActionGroup(((ICommonViewerWorkbenchSite) aConfig.getViewSite()).getSite(), workspaceContext, true); }
public void stop(BundleContext context) throws Exception { if (fRefactoringUndoContext != null) { IUndoContext workspaceContext= (IUndoContext)ResourcesPlugin.getWorkspace().getAdapter(IUndoContext.class); if (workspaceContext instanceof ObjectUndoContext) { ((ObjectUndoContext)workspaceContext).removeMatch(fRefactoringUndoContext); } } if (fgUndoManager != null) fgUndoManager.shutdown(); final RefactoringHistoryService service= RefactoringHistoryService.getInstance(); service.disconnect(); if (fRefactoringHistoryListener != null) service.removeHistoryListener(fRefactoringHistoryListener); RefactoringContributionManager.getInstance().disconnect(); super.stop(context); }
@Override public void stop(BundleContext context) throws Exception { if (fRefactoringUndoContext != null) { IUndoContext workspaceContext= ResourcesPlugin.getWorkspace().getAdapter(IUndoContext.class); if (workspaceContext instanceof ObjectUndoContext) { ((ObjectUndoContext)workspaceContext).removeMatch(fRefactoringUndoContext); } } if (fgUndoManager != null) fgUndoManager.shutdown(); final RefactoringHistoryService service= RefactoringHistoryService.getInstance(); service.disconnect(); if (fRefactoringHistoryListener != null) service.removeHistoryListener(fRefactoringHistoryListener); RefactoringContributionManager.getInstance().disconnect(); super.stop(context); }
@Override public void stop(BundleContext context) throws Exception { if (fRefactoringUndoContext != null) { IUndoContext workspaceContext= ResourcesPlugin.getWorkspace().getAdapter(IUndoContext.class); if (workspaceContext instanceof ObjectUndoContext) { ((ObjectUndoContext)workspaceContext).removeMatch(fRefactoringUndoContext); } } if (fgUndoManager != null) fgUndoManager.shutdown(); final RefactoringHistoryService service= RefactoringHistoryService.getInstance(); service.disconnect(); if (fRefactoringHistoryListener != null) service.removeHistoryListener(fRefactoringHistoryListener); RefactoringContributionManager.getInstance().disconnect(); super.stop(context); }
private void createActions() { fSearchesDropDownAction= new SearchHistoryDropDownAction(this); fSearchesDropDownAction.updateEnablement(); fSearchAgainAction= new SearchAgainAction(this); fSearchAgainAction.setEnabled(false); fSearchAgainAction.setActionDefinitionId(IWorkbenchCommandConstants.FILE_REFRESH); fCancelAction= new CancelSearchAction(this); fCancelAction.setEnabled(false); fPinSearchViewAction= new PinSearchViewAction(this); IUndoContext workspaceContext= ResourcesPlugin.getWorkspace().getAdapter(IUndoContext.class); fUndoRedoActionGroup= new UndoRedoActionGroup(getViewSite(), workspaceContext, true); }
public JavaEditorBreadcrumbActionGroup(JavaEditor javaEditor, ISelectionProvider selectionProvider) { super(new ActionGroup[] { new BreadcrumbActionGroup(javaEditor), new UndoRedoActionGroup(javaEditor.getEditorSite(), ResourcesPlugin.getWorkspace().getAdapter(IUndoContext.class), true), new NewWizardsActionGroup(javaEditor.getEditorSite()), new JavaSearchActionGroup(javaEditor.getEditorSite(), selectionProvider), new NavigateActionGroup(javaEditor.getEditorSite(), selectionProvider), new CCPActionGroup(javaEditor.getEditorSite(), selectionProvider), new GenerateBuildPathActionGroup(javaEditor.getEditorSite(), selectionProvider), new GenerateActionGroup(javaEditor.getEditorSite(), selectionProvider), new RefactorActionGroup(javaEditor.getEditorSite(), selectionProvider), new BuildActionGroup(javaEditor.getEditorSite(), selectionProvider), new ProjectActionGroup(javaEditor.getEditorSite(), selectionProvider), new WorkingSetActionGroup(javaEditor.getEditorSite(), selectionProvider) }); }
public JavaEditorBreadcrumbActionGroup(JavaEditor javaEditor, ISelectionProvider selectionProvider) { super(new ActionGroup[] { new BreadcrumbActionGroup(javaEditor), new UndoRedoActionGroup(javaEditor.getEditorSite(), ResourcesPlugin.getWorkspace().getAdapter(IUndoContext.class), true), new NewWizardsActionGroup(javaEditor.getEditorSite()), new JavaSearchActionGroup(javaEditor.getEditorSite(), selectionProvider), new NavigateActionGroup(javaEditor.getEditorSite(), selectionProvider), new CCPActionGroup(javaEditor.getEditorSite(), selectionProvider), new GenerateBuildPathActionGroup(javaEditor.getEditorSite(), selectionProvider), new GenerateActionGroup(javaEditor.getEditorSite(), selectionProvider), new RefactorActionGroup(javaEditor.getEditorSite(), selectionProvider), new BuildActionGroup(javaEditor.getEditorSite(), selectionProvider), new ProjectActionGroup(javaEditor.getEditorSite(), selectionProvider), new WorkingSetActionGroup(javaEditor.getEditorSite(), selectionProvider) }); }
IUndoContext workspaceContext = (IUndoContext) ResourcesPlugin.getWorkspace().getAdapter(IUndoContext.class); undoRedoActionGroup = new UndoRedoActionGroup(getViewSite(), workspaceContext, true); undoRedoActionGroup.fillActionBars(actionBars);