Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2003-10-17 17:35:28 +0000
committerMichael Valenta2003-10-17 17:35:28 +0000
commitf4052f29f5b11f5db56d61964760a001441be75e (patch)
tree6f17ef27311dfcac362a819773b604fd3a2b3a43
parentca4dd37ff5401ad170b4ac87f9c206440eda292b (diff)
downloadeclipse.platform.team-f4052f29f5b11f5db56d61964760a001441be75e.tar.gz
eclipse.platform.team-f4052f29f5b11f5db56d61964760a001441be75e.tar.xz
eclipse.platform.team-f4052f29f5b11f5db56d61964760a001441be75e.zip
43494: [CVS UI] Orphaned CVS folders remain until auto-build
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CVSAction.java10
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/WorkspaceAction.java20
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/TeamAction.java12
3 files changed, 40 insertions, 2 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CVSAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CVSAction.java
index 218e268b5..6ba03eeee 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CVSAction.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CVSAction.java
@@ -244,6 +244,16 @@ abstract public class CVSAction extends TeamAction {
};
switch (progressKind) {
+ case PROGRESS_WORKBENCH_WINDOW :
+ try {
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().run(true, true, runnable);
+ } catch (InterruptedException e1) {
+ exceptions[0] = null;
+ e1.printStackTrace();
+ } catch (InvocationTargetException e) {
+ exceptions[0] = e;
+ }
+ break;
case PROGRESS_BUSYCURSOR :
BusyIndicator.showWhile(Display.getCurrent(), new Runnable() {
public void run() {
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/WorkspaceAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/WorkspaceAction.java
index d12fd29f6..008e56447 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/WorkspaceAction.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/WorkspaceAction.java
@@ -29,9 +29,11 @@ import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.core.runtime.SubProgressMonitor;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.team.core.RepositoryProvider;
@@ -119,10 +121,24 @@ public abstract class WorkspaceAction extends CVSAction {
/*
* Recursively check for and handle orphaned CVS folders
*/
- private void handleOrphanedSubtree(ICVSFolder folder) throws CVSException {
+ private void handleOrphanedSubtree(final ICVSFolder folder) throws CVSException {
if (folder.getIResource().getType() == IResource.PROJECT) return;
if (CVSWorkspaceRoot.isOrphanedSubtree((IContainer)folder.getIResource())) {
- folder.unmanage(null);
+ try {
+ run(new IRunnableWithProgress() {
+ public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
+ try {
+ folder.unmanage(null);
+ } catch (CVSException e) {
+ CVSProviderPlugin.log(e);
+ }
+ }
+ }, true, PROGRESS_WORKBENCH_WINDOW);
+ } catch (InvocationTargetException e) {
+ // Ignore this since we logged the one we care about above
+ } catch (InterruptedException e) {
+ throw new OperationCanceledException();
+ }
}
handleOrphanedSubtree(folder.getParent());
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/TeamAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/TeamAction.java
index fa2ae3539..5201a1461 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/TeamAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/TeamAction.java
@@ -45,6 +45,7 @@ import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.actions.ActionDelegate;
/**
@@ -67,6 +68,7 @@ public abstract class TeamAction extends ActionDelegate implements IObjectAction
// pass one of these values to the run method.
public final static int PROGRESS_DIALOG = 1;
public final static int PROGRESS_BUSYCURSOR = 2;
+ public final static int PROGRESS_WORKBENCH_WINDOW = 3;
private IWorkbenchPart targetPart;
@@ -185,6 +187,16 @@ public abstract class TeamAction extends ActionDelegate implements IObjectAction
final protected void run(final IRunnableWithProgress runnable, final String problemMessage, int progressKind) {
final Exception[] exceptions = new Exception[] {null};
switch (progressKind) {
+ case PROGRESS_WORKBENCH_WINDOW :
+ try {
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().run(true, true, runnable);
+ } catch (InterruptedException e1) {
+ exceptions[0] = null;
+ e1.printStackTrace();
+ } catch (InvocationTargetException e) {
+ exceptions[0] = e;
+ }
+ break;
case PROGRESS_BUSYCURSOR :
BusyIndicator.showWhile(Display.getCurrent(), new Runnable() {
public void run() {

Back to the top