Search in sources :

Example 1 with IUndoManagerListener

use of org.eclipse.ltk.core.refactoring.IUndoManagerListener in project che by eclipse.

the class UndoManager2 method fireChangePerformed.

private void fireChangePerformed(final Change change) {
    if (fListeners == null)
        return;
    Object[] listeners = fListeners.getListeners();
    for (int i = 0; i < listeners.length; i++) {
        final IUndoManagerListener listener = (IUndoManagerListener) listeners[i];
        SafeRunner.run(new ISafeRunnable() {

            public void run() throws Exception {
                listener.changePerformed(UndoManager2.this, change);
            }

            public void handleException(Throwable exception) {
                RefactoringCorePlugin.log(exception);
            }
        });
    }
}
Also used : IUndoManagerListener(org.eclipse.ltk.core.refactoring.IUndoManagerListener) ISafeRunnable(org.eclipse.core.runtime.ISafeRunnable) CoreException(org.eclipse.core.runtime.CoreException) ExecutionException(org.eclipse.core.commands.ExecutionException)

Example 2 with IUndoManagerListener

use of org.eclipse.ltk.core.refactoring.IUndoManagerListener in project che by eclipse.

the class UndoManager2 method fireRedoStackChanged.

private void fireRedoStackChanged() {
    if (fListeners == null)
        return;
    Object[] listeners = fListeners.getListeners();
    for (int i = 0; i < listeners.length; i++) {
        final IUndoManagerListener listener = (IUndoManagerListener) listeners[i];
        SafeRunner.run(new ISafeRunnable() {

            public void run() throws Exception {
                listener.redoStackChanged(UndoManager2.this);
            }

            public void handleException(Throwable exception) {
                RefactoringCorePlugin.log(exception);
            }
        });
    }
}
Also used : IUndoManagerListener(org.eclipse.ltk.core.refactoring.IUndoManagerListener) ISafeRunnable(org.eclipse.core.runtime.ISafeRunnable) CoreException(org.eclipse.core.runtime.CoreException) ExecutionException(org.eclipse.core.commands.ExecutionException)

Example 3 with IUndoManagerListener

use of org.eclipse.ltk.core.refactoring.IUndoManagerListener in project che by eclipse.

the class UndoManager2 method fireUndoStackChanged.

private void fireUndoStackChanged() {
    if (fListeners == null)
        return;
    Object[] listeners = fListeners.getListeners();
    for (int i = 0; i < listeners.length; i++) {
        final IUndoManagerListener listener = (IUndoManagerListener) listeners[i];
        SafeRunner.run(new ISafeRunnable() {

            public void run() throws Exception {
                listener.undoStackChanged(UndoManager2.this);
            }

            public void handleException(Throwable exception) {
                RefactoringCorePlugin.log(exception);
            }
        });
    }
}
Also used : IUndoManagerListener(org.eclipse.ltk.core.refactoring.IUndoManagerListener) ISafeRunnable(org.eclipse.core.runtime.ISafeRunnable) CoreException(org.eclipse.core.runtime.CoreException) ExecutionException(org.eclipse.core.commands.ExecutionException)

Example 4 with IUndoManagerListener

use of org.eclipse.ltk.core.refactoring.IUndoManagerListener in project che by eclipse.

the class UndoManager2 method fireAboutToPerformChange.

//---- event firing methods -------------------------------------------------
private void fireAboutToPerformChange(final Change change) {
    if (fListeners == null)
        return;
    Object[] listeners = fListeners.getListeners();
    for (int i = 0; i < listeners.length; i++) {
        final IUndoManagerListener listener = (IUndoManagerListener) listeners[i];
        SafeRunner.run(new ISafeRunnable() {

            public void run() throws Exception {
                listener.aboutToPerformChange(UndoManager2.this, change);
            }

            public void handleException(Throwable exception) {
                RefactoringCorePlugin.log(exception);
            }
        });
    }
}
Also used : IUndoManagerListener(org.eclipse.ltk.core.refactoring.IUndoManagerListener) ISafeRunnable(org.eclipse.core.runtime.ISafeRunnable) CoreException(org.eclipse.core.runtime.CoreException) ExecutionException(org.eclipse.core.commands.ExecutionException)

Aggregations

ExecutionException (org.eclipse.core.commands.ExecutionException)4 CoreException (org.eclipse.core.runtime.CoreException)4 ISafeRunnable (org.eclipse.core.runtime.ISafeRunnable)4 IUndoManagerListener (org.eclipse.ltk.core.refactoring.IUndoManagerListener)4