Search in sources :

Example 1 with RefactoringHistoryService

use of org.eclipse.ltk.internal.core.refactoring.history.RefactoringHistoryService in project che by eclipse.

the class RefactoringCorePlugin method start.

public void start(BundleContext context) throws Exception {
    super.start(context);
    RefactoringContributionManager.getInstance().connect();
    final RefactoringHistoryService service = RefactoringHistoryService.getInstance();
    service.connect();
    fRefactoringHistoryListener = new RefactoringHistorySerializer();
    service.addHistoryListener(fRefactoringHistoryListener);
}
Also used : RefactoringHistoryService(org.eclipse.ltk.internal.core.refactoring.history.RefactoringHistoryService) RefactoringHistorySerializer(org.eclipse.ltk.internal.core.refactoring.history.RefactoringHistorySerializer)

Example 2 with RefactoringHistoryService

use of org.eclipse.ltk.internal.core.refactoring.history.RefactoringHistoryService in project che by eclipse.

the class RefactoringCorePlugin method stop.

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);
}
Also used : RefactoringHistoryService(org.eclipse.ltk.internal.core.refactoring.history.RefactoringHistoryService) IUndoContext(org.eclipse.core.commands.operations.IUndoContext) ObjectUndoContext(org.eclipse.core.commands.operations.ObjectUndoContext)

Aggregations

RefactoringHistoryService (org.eclipse.ltk.internal.core.refactoring.history.RefactoringHistoryService)2 IUndoContext (org.eclipse.core.commands.operations.IUndoContext)1 ObjectUndoContext (org.eclipse.core.commands.operations.ObjectUndoContext)1 RefactoringHistorySerializer (org.eclipse.ltk.internal.core.refactoring.history.RefactoringHistorySerializer)1