diff options
author | Michael Valenta | 2002-12-19 16:55:55 +0000 |
---|---|---|
committer | Michael Valenta | 2002-12-19 16:55:55 +0000 |
commit | 92214d39e4d3aaaa609c966c0953500fa0fec5f2 (patch) | |
tree | b09e8a977cdf87775a530e7d5020d53b7e768c5f | |
parent | 1f7ad8c10876e2bb9a536fa34e8169759fd0d951 (diff) | |
download | eclipse.platform.team-92214d39e4d3aaaa609c966c0953500fa0fec5f2.tar.gz eclipse.platform.team-92214d39e4d3aaaa609c966c0953500fa0fec5f2.tar.xz eclipse.platform.team-92214d39e4d3aaaa609c966c0953500fa0fec5f2.zip |
28646: Dialog blocks on validateEdit
-rw-r--r-- | bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/FileModificationValidator.java | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/FileModificationValidator.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/FileModificationValidator.java index afe479e7f..b217fd049 100644 --- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/FileModificationValidator.java +++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/FileModificationValidator.java @@ -20,7 +20,6 @@ import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.jface.dialogs.ProgressMonitorDialog; import org.eclipse.jface.operation.IRunnableWithProgress; import org.eclipse.swt.widgets.Shell; import org.eclipse.team.core.RepositoryProvider; @@ -142,6 +141,8 @@ public class FileModificationValidator implements ICVSFileModificationValidator return OK; } catch (InvocationTargetException e) { return getStatus(e); + } catch (InterruptedException e) { + return new Status(IStatus.ERROR, CVSUIPlugin.ID, 0, Policy.bind("FileModificationValidator.vetoMessage"), null); //$NON-NLS-1$; } } @@ -162,21 +163,9 @@ public class FileModificationValidator implements ICVSFileModificationValidator return result[0]; } - private void run(Shell shell, final IRunnableWithProgress runnable) throws InvocationTargetException { + private void run(Shell shell, final IRunnableWithProgress runnable) throws InvocationTargetException, InterruptedException { final InvocationTargetException[] exception = new InvocationTargetException[] { null }; - CVSUIPlugin.openDialog(shell, new CVSUIPlugin.IOpenableInShell() { - public void open(Shell shell) { - try { - new ProgressMonitorDialog(shell).run(true /* fork */, true /* cancellable */, runnable); - } catch (InvocationTargetException e) { - exception[0] = e; - } catch (InterruptedException e) { - // do nothing - } - } - }, 0); - if (exception[0] != null) - throw exception[0]; + CVSUIPlugin.runWithProgress(shell, false, runnable); } private void edit(IFile[] files, IProgressMonitor monitor) throws CVSException { |