Search in sources :

Example 1 with RefactoringExecutionEvent

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

the class RefactoringHistoryService method fireRefactoringExecutionEvent.

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

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

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

Aggregations

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