import org.eclipse.core.resources.IWorkspaceRunnable;
import org.eclipse.core.runtime.CoreException;
-
/**
- * An operation created as a result of a call to JavaCore.run(IWorkspaceRunnable, IProgressMonitor)
- * that encapsulates a user defined IWorkspaceRunnable.
+ * An operation created as a result of a call to
+ * JavaCore.run(IWorkspaceRunnable, IProgressMonitor) that encapsulates a user
+ * defined IWorkspaceRunnable.
*/
public class BatchOperation extends JavaModelOperation {
protected IWorkspaceRunnable runnable;
+
public BatchOperation(IWorkspaceRunnable runnable) {
this.runnable = runnable;
}
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
+ *
* @see net.sourceforge.phpdt.internal.core.JavaModelOperation#executeOperation()
*/
protected void executeOperation() throws JavaModelException {
this.runnable.run(progressMonitor);
} catch (CoreException ce) {
if (ce instanceof JavaModelException) {
- throw (JavaModelException)ce;
+ throw (JavaModelException) ce;
} else {
if (ce.getStatus().getCode() == IResourceStatus.OPERATION_FAILED) {
- Throwable e= ce.getStatus().getException();
+ Throwable e = ce.getStatus().getException();
if (e instanceof JavaModelException) {
throw (JavaModelException) e;
}
}
}
}
-
- /* (non-Javadoc)
+
+ /*
+ * (non-Javadoc)
+ *
* @see net.sourceforge.phpdt.internal.core.JavaModelOperation#verify()
*/
protected IJavaModelStatus verify() {
return JavaModelStatus.VERIFIED_OK;
}
-
}