in CasViewerEclipsePlugin/uimaj-ep-casviewer/src/main/java/org/apache/uima/tools/preferences/CorePreferencePage.java [431:476]
private boolean runOperation (WorkspaceModifyOperation op,
IPath iPath, String title, String msg) {
Shell shell = getSite().getShell();
boolean success = false;
try {
new ProgressMonitorDialog(shell).run(false, true, op);
success = true;
} catch (InterruptedException x) {
x.printStackTrace();
} catch (InvocationTargetException x) {
Throwable targetException = x.getTargetException();
if (targetException instanceof CoreException) {
CoreException coreException = (CoreException) targetException;
IStatus status = coreException.getStatus();
if (status != null) {
switch (status.getSeverity()) {
case IStatus.INFO :
MessageDialog.openInformation(shell, title, msg);
break;
case IStatus.WARNING :
MessageDialog.openWarning(shell, title, msg);
break;
default :
MessageDialog.openError(shell, title, msg);
}
} else {
MessageDialog.openError(shell, title, msg);
}
}
}
finally {
if (success) {
IFile iFile = ResourcesPlugin.getWorkspace().getRoot().getFileForLocation(iPath);
try {
if (iFile != null) {
iFile.refreshLocal(IResource.DEPTH_INFINITE, null);
}
} catch (CoreException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
return success;
}