Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2002-10-31 17:00:33 -0500
committerMichael Valenta2002-10-31 17:00:33 -0500
commitb45e3773c616476340fd381f9b78543388761408 (patch)
tree5b935fff9a1fbb764b1ba698906c662c50e40619
parentc301cd55853fabd0d5584e6a0151de18527c7297 (diff)
downloadeclipse.platform.team-MV_RepoViewRework.tar.gz
eclipse.platform.team-MV_RepoViewRework.tar.xz
eclipse.platform.team-MV_RepoViewRework.zip
Finishing touchesMV_RepoViewRework
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/messages.properties6
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteContentProvider.java4
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RefreshTagsAction.java30
3 files changed, 31 insertions, 9 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/messages.properties b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/messages.properties
index 7ec78b862..3e6b2299a 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/messages.properties
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/messages.properties
@@ -713,6 +713,7 @@ RemoteRootAction.The_projects_that_are_shared_with_the_above_repository_are__4=T
BranchCategory.Branches_1=Branches
GroupedByVersionCategory.Versions_1=Versions
VersionCategory.Versions_1=Versions
+ModulesCategory.label=Modules
HistoryView.[...]_4=[...]
CVSProjectPropertiesPage.Select_a_Repository_1=Select a Repository
@@ -814,4 +815,7 @@ WorkingSetSelectionDialog.message= &Select a CVS working set:
WorkingSetSelectionDialog.message.multiSelect= &Select CVS working sets:
WorkingSetSelectionDialog.detailsButton.label= &Edit...
WorkingSetSelectionDialog.newButton.label= &New...
-WorkingSetSelectionDialog.removeButton.label= &Remove \ No newline at end of file
+WorkingSetSelectionDialog.removeButton.label= &Remove
+
+RefreshTagsAction.title=Refresh Branch and Version Tags?
+RefreshTagsAction.message=Repository ''{0}'' has {1} projects to refresh. Continue? \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteContentProvider.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteContentProvider.java
index 589db2fb3..c4f433435 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteContentProvider.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteContentProvider.java
@@ -39,7 +39,9 @@ public class RemoteContentProvider extends WorkbenchContentProvider {
}
} else if(element instanceof VersionCategory) {
return true;
- } else if(element instanceof BranchCategory) {
+ } else if(element instanceof BranchCategory) {
+ return true;
+ } else if(element instanceof ModulesCategory) {
return true;
} else if(element instanceof CVSTagElement) {
return true;
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RefreshTagsAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RefreshTagsAction.java
index bb9a10efd..3400cf0a8 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RefreshTagsAction.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RefreshTagsAction.java
@@ -6,6 +6,7 @@ import java.util.Iterator;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.team.core.TeamException;
@@ -41,15 +42,17 @@ public class RefreshTagsAction extends CVSAction {
ICVSRepositoryLocation location = locations[j];
// todo: This omits defined modules when there is no current working set
ICVSRemoteResource[] resources = manager.getWorkingFoldersForTag(location, CVSTag.DEFAULT, Policy.subMonitorFor(monitor, 10));
- IProgressMonitor subMonitor = Policy.subMonitorFor(monitor, 90);
- subMonitor.beginTask(null, 100 * resources.length);
- for (int i = 0; i < resources.length; i++) {
- ICVSRemoteResource resource = resources[i];
- if (resource instanceof ICVSFolder) {
- manager.refreshDefinedTags((ICVSFolder)resource, true /* replace */, true, Policy.subMonitorFor(subMonitor, 100));
+ if (promptToRefresh(location, resources)) {
+ IProgressMonitor subMonitor = Policy.subMonitorFor(monitor, 90);
+ subMonitor.beginTask(null, 100 * resources.length);
+ for (int i = 0; i < resources.length; i++) {
+ ICVSRemoteResource resource = resources[i];
+ if (resource instanceof ICVSFolder) {
+ manager.refreshDefinedTags((ICVSFolder)resource, true /* replace */, true, Policy.subMonitorFor(subMonitor, 100));
+ }
}
+ subMonitor.done();
}
- subMonitor.done();
}
monitor.done();
} catch (TeamException e) {
@@ -85,4 +88,17 @@ public class RefreshTagsAction extends CVSAction {
return (ICVSRepositoryLocation[])tags.toArray(new ICVSRepositoryLocation[tags.size()]);
}
+ private boolean promptToRefresh(final ICVSRepositoryLocation location, final ICVSRemoteResource[] resources) {
+ if (resources.length == 0) return true;
+ final boolean[] result = new boolean[] {false};
+ getShell().getDisplay().syncExec(new Runnable() {
+ public void run() {
+ result[0] = MessageDialog.openQuestion(getShell(),
+ Policy.bind("RefreshTagsAction.title"),
+ Policy.bind("RefreshTagsAction.message", location.getLocation(), new Integer(resources.length).toString()));
+ }
+ });
+ return result[0];
+ }
+
}

Back to the top