public void run(final IMarker marker) {
final IProject proj = marker.getResource().getProject();
try {
final IClasspathEntry cpEntry = getClasspathEntryForMarker(marker, cpEntryPath);
if (add) {
UpdateClasspathAttributeUtil.addDependencyAttribute(null, proj.getName(), cpEntry);
} else {
UpdateClasspathAttributeUtil.removeDependencyAttribute(null, proj.getName(), cpEntry);
}
} catch (CoreException ce){
ErrorDialog.openError(null, Resources.errorDialogTitle,
Resources.errorDialogMessage,
ce.getStatus());
} catch (ExecutionException ee){
ErrorDialog.openError(null, Resources.errorDialogTitle,
Resources.errorDialogMessage,
new Status(IStatus.ERROR, J2EEUIPlugin.PLUGIN_ID, 0, ee.getLocalizedMessage(), ee));
}
}
}