diff options
Diffstat (limited to 'plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/WorkspaceModifyComposedOperation.java')
-rw-r--r-- | plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/WorkspaceModifyComposedOperation.java | 78 |
1 files changed, 0 insertions, 78 deletions
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/WorkspaceModifyComposedOperation.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/WorkspaceModifyComposedOperation.java deleted file mode 100644 index d53efb2bd..000000000 --- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/WorkspaceModifyComposedOperation.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Created on Jan 17, 2005 - * - * TODO To change the template for this generated file go to - * Window - Preferences - Java - Code Style - Code Templates - */ -package org.eclipse.jst.j2ee.internal; - -import java.lang.reflect.InvocationTargetException; -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.SubProgressMonitor; -import org.eclipse.core.runtime.jobs.ISchedulingRule; -import org.eclipse.jface.operation.IRunnableWithProgress; - -/** - * @author jialin - * - * TODO To change the template for this generated type comment go to - * Window - Preferences - Java - Code Style - Code Templates - */ -public class WorkspaceModifyComposedOperation extends org.eclipse.ui.actions.WorkspaceModifyOperation { - - protected List fRunnables; - - public WorkspaceModifyComposedOperation(ISchedulingRule rule) { - super(rule); - } - - /** - * Creates a new operation which will delegate its work to the given runnable. - */ - public WorkspaceModifyComposedOperation() { - super(); - } - - public WorkspaceModifyComposedOperation(ISchedulingRule rule, List nestedRunnablesWithProgress) { - super(rule); - fRunnables = nestedRunnablesWithProgress; - } - - public WorkspaceModifyComposedOperation(List nestedRunnablesWithProgress) { - super(); - fRunnables = nestedRunnablesWithProgress; - } - - /** - * Creates a new operation which will delegate its work to the given runnable. - * - * @param content - * the runnable to delegate to when this operation is executed - */ - public WorkspaceModifyComposedOperation(IRunnableWithProgress nestedOp) { - super(); - getRunnables().add(nestedOp); - } - - public boolean addRunnable(IRunnableWithProgress nestedOp) { - return getRunnables().add(nestedOp); - } - - protected void execute(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { - int size = fRunnables.size(); - monitor.beginTask("", size);//$NON-NLS-1$ - for (int i = 0; i < fRunnables.size(); i++) { - IRunnableWithProgress op = (IRunnableWithProgress) fRunnables.get(i); - op.run(new SubProgressMonitor(monitor, 1, SubProgressMonitor.PREPEND_MAIN_LABEL_TO_SUBTASK)); - } - } - - protected List getRunnables() { - if (fRunnables == null) - fRunnables = new ArrayList(3); - return fRunnables; - } -}
\ No newline at end of file |