Search in sources :

Example 1 with RefactoringHistoryEvent

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

the class RefactoringHistoryService method fireRefactoringHistoryEvent.

private void fireRefactoringHistoryEvent(final RefactoringDescriptorProxy proxy, final int eventType) {
    Assert.isNotNull(proxy);
    final Object[] listeners = fHistoryListeners.getListeners();
    for (int index = 0; index < listeners.length; index++) {
        final IRefactoringHistoryListener listener = (IRefactoringHistoryListener) listeners[index];
        SafeRunner.run(new ISafeRunnable() {

            public void handleException(final Throwable throwable) {
                RefactoringCorePlugin.log(throwable);
            }

            public void run() throws Exception {
                listener.historyNotification(new RefactoringHistoryEvent(RefactoringHistoryService.this, eventType, proxy));
            }
        });
    }
}
Also used : RefactoringHistoryEvent(org.eclipse.ltk.core.refactoring.history.RefactoringHistoryEvent) ISafeRunnable(org.eclipse.core.runtime.ISafeRunnable) CoreException(org.eclipse.core.runtime.CoreException) IOException(java.io.IOException) IRefactoringHistoryListener(org.eclipse.ltk.core.refactoring.history.IRefactoringHistoryListener)

Aggregations

IOException (java.io.IOException)1 CoreException (org.eclipse.core.runtime.CoreException)1 ISafeRunnable (org.eclipse.core.runtime.ISafeRunnable)1 IRefactoringHistoryListener (org.eclipse.ltk.core.refactoring.history.IRefactoringHistoryListener)1 RefactoringHistoryEvent (org.eclipse.ltk.core.refactoring.history.RefactoringHistoryEvent)1