new Runnable() {
public void run() {
ExceptionHandler
.getInstance()
.handleException(
new ExecutionException(
"An exception occurred while executing " //$NON-NLS-1$
+ methodToExecute
.getName(),
e
.getTargetException()));
}
});
}
}
};
swingInvokeLater(methodRunnable);
}
} catch (final ClassNotFoundException e) {
// There is no Swing support, so do nothing.
} catch (final NoSuchMethodException e) {
// The API has changed, which seems amazingly unlikely.
throw new Error("Something is seriously wrong here"); //$NON-NLS-1$
}
} else {
methodToExecute.invoke(focusControl, null);
}
} catch (IllegalAccessException e) {
// The method is protected, so do nothing.
} catch (InvocationTargetException e) {
throw new ExecutionException(
"An exception occurred while executing " //$NON-NLS-1$
+ methodToExecute.getName(), e
.getTargetException());
}