Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2002-11-26 21:30:56 +0000
committerMichael Valenta2002-11-26 21:30:56 +0000
commitef949aa8cc1ad152751b77b94df62352a9b2a721 (patch)
tree6a791625e674f7fd3c117892a973fe19b7abbc1f /bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RefreshRemoteProjectWizard.java
parentf8d4e1ea650b3d431fff65f4176c2a33de98e161 (diff)
downloadeclipse.platform.team-ef949aa8cc1ad152751b77b94df62352a9b2a721.tar.gz
eclipse.platform.team-ef949aa8cc1ad152751b77b94df62352a9b2a721.tar.xz
eclipse.platform.team-ef949aa8cc1ad152751b77b94df62352a9b2a721.zip
26234: [Repo view] Working set should not hide repo locations
Diffstat (limited to 'bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RefreshRemoteProjectWizard.java')
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RefreshRemoteProjectWizard.java57
1 files changed, 53 insertions, 4 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RefreshRemoteProjectWizard.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RefreshRemoteProjectWizard.java
index 14c203800..2398bfe7a 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RefreshRemoteProjectWizard.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RefreshRemoteProjectWizard.java
@@ -14,6 +14,8 @@ import java.lang.reflect.InvocationTargetException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.jface.dialogs.ProgressMonitorDialog;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.window.Window;
@@ -21,6 +23,8 @@ import org.eclipse.jface.wizard.Wizard;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.team.core.TeamException;
+import org.eclipse.team.internal.ccvs.core.CVSException;
+import org.eclipse.team.internal.ccvs.core.CVSTag;
import org.eclipse.team.internal.ccvs.core.ICVSFolder;
import org.eclipse.team.internal.ccvs.core.ICVSRemoteResource;
import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
@@ -35,17 +39,45 @@ public class RefreshRemoteProjectWizard extends Wizard {
private Dialog parentDialog;
private ICVSRepositoryLocation root;
+ private ICVSRemoteResource[] rootFolders;
private RefreshRemoteProjectSelectionPage projectSelectionPage;
+ private RefreshFileSelectionPage fileSelectionPage;
+ private IDialogSettings settings;
- public static boolean execute(Shell shell, ICVSRepositoryLocation root) {
- RefreshRemoteProjectWizard wizard = new RefreshRemoteProjectWizard(root);
+ public static boolean execute(Shell shell, final ICVSRepositoryLocation root) {
+ final ICVSRemoteResource[][] rootFolders = new ICVSRemoteResource[1][0];
+ rootFolders[0] = null;
+ try {
+ new ProgressMonitorDialog(shell).run(true, true, new IRunnableWithProgress() {
+ public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
+ try {
+ rootFolders[0] = CVSUIPlugin.getPlugin().getRepositoryManager().getFoldersForTag(root, CVSTag.DEFAULT, monitor);
+ } catch (CVSException e) {
+ throw new InvocationTargetException(e);
+ }
+ }
+ });
+ } catch (InvocationTargetException e) {
+ CVSUIPlugin.openError(shell, null, null, e);
+ return false;
+ } catch (InterruptedException e) {
+ return false;
+ }
+ RefreshRemoteProjectWizard wizard = new RefreshRemoteProjectWizard(root, rootFolders[0]);
WizardDialog dialog = new WizardDialog(shell, wizard);
wizard.setParentDialog(dialog);
return (dialog.open() == Window.OK);
}
- public RefreshRemoteProjectWizard(ICVSRepositoryLocation root) {
+ public RefreshRemoteProjectWizard(ICVSRepositoryLocation root, ICVSRemoteResource[] rootFolders) {
this.root = root;
+ this.rootFolders = rootFolders;
+ IDialogSettings workbenchSettings = CVSUIPlugin.getPlugin().getDialogSettings();
+ this.settings = workbenchSettings.getSection("RefreshRemoteProjectWizard");//$NON-NLS-1$
+ if (settings == null) {
+ this.settings = workbenchSettings.addNewSection("RefreshRemoteProjectWizard");//$NON-NLS-1$
+ }
+ setWindowTitle(Policy.bind("RefreshRemoteProjectWizard.title")); //$NON-NLS-1$
}
/**
@@ -59,8 +91,15 @@ public class RefreshRemoteProjectWizard extends Wizard {
Policy.bind("RefreshRemoteProjectSelectionPage.pageTitle"), //$NON-NLS-1$
substImage,
Policy.bind("RefreshRemoteProjectSelectionPage.pageDescription"), //$NON-NLS-1$
- parentDialog, root);
+ parentDialog, settings, root, rootFolders);
addPage(projectSelectionPage);
+// fileSelectionPage = new RefreshFileSelectionPage(
+// "FileSelectionPage", //$NON-NLS-1$
+// Policy.bind("RefreshFileSelectionPage.pageTitle"), //$NON-NLS-1$
+// substImage,
+// Policy.bind("RefreshFileSelectionPage.pageDescription"), //$NON-NLS-1$
+// root);
+// addPage(fileSelectionPage);
}
/**
@@ -103,4 +142,14 @@ public class RefreshRemoteProjectWizard extends Wizard {
this.parentDialog = parentDialog;
}
+// /**
+// * @see org.eclipse.jface.wizard.IWizard#getNextPage(org.eclipse.jface.wizard.IWizardPage)
+// */
+// public IWizardPage getNextPage(IWizardPage page) {
+// if (page == projectSelectionPage) {
+// fileSelectionPage.setRootFolders(projectSelectionPage.getSelectedRemoteProject());
+// }
+// return super.getNextPage(page);
+// }
+
}

Back to the top