Search in sources :

Example 1 with OperationHistoryEvent

use of org.eclipse.core.commands.operations.OperationHistoryEvent in project che by eclipse.

the class RefactoringHistoryService method connect.

/**
	 * {@inheritDoc}
	 */
public void connect() {
    fReferenceCount++;
    if (fReferenceCount == 1) {
        fOperationListener = new IOperationHistoryListener() {

            public void historyNotification(final OperationHistoryEvent event) {
                performHistoryNotification(event);
            }
        };
        OperationHistoryFactory.getOperationHistory().addOperationHistoryListener(fOperationListener);
        fResourceListener = new IResourceChangeListener() {

            public void resourceChanged(final IResourceChangeEvent event) {
                peformResourceChanged(event);
            }
        };
        ResourcesPlugin.getWorkspace().addResourceChangeListener(fResourceListener, IResourceChangeEvent.PRE_CLOSE | IResourceChangeEvent.POST_CHANGE);
    }
}
Also used : IOperationHistoryListener(org.eclipse.core.commands.operations.IOperationHistoryListener) IResourceChangeEvent(org.eclipse.core.resources.IResourceChangeEvent) OperationHistoryEvent(org.eclipse.core.commands.operations.OperationHistoryEvent) IResourceChangeListener(org.eclipse.core.resources.IResourceChangeListener)

Aggregations

IOperationHistoryListener (org.eclipse.core.commands.operations.IOperationHistoryListener)1 OperationHistoryEvent (org.eclipse.core.commands.operations.OperationHistoryEvent)1 IResourceChangeEvent (org.eclipse.core.resources.IResourceChangeEvent)1 IResourceChangeListener (org.eclipse.core.resources.IResourceChangeListener)1