Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.team.ui/src/org/eclipse/team')
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIMessages.java1
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/messages.properties5
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ImportProjectSetMainPage.java11
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ProjectSetImportWizard.java3
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/WorkingSetsDialog.java15
5 files changed, 7 insertions, 28 deletions
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIMessages.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIMessages.java
index c7315c043..44059f5d0 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIMessages.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIMessages.java
@@ -267,7 +267,6 @@ public class TeamUIMessages extends NLS {
public static String ImportProjectSetMainPage_The_specified_file_does_not_exist_4;
public static String ImportProjectSetMainPage_You_have_specified_a_folder_5;
public static String ImportProjectSetMainPage_workingSetNameEmpty;
- public static String ImportProjectSetMainPage_workingSetNameExists;
public static String ImportProjectSetMainPage_createWorkingSetLabel;
public static String ImportProjectSetMainPage_workingSetLabel;
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/messages.properties b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/messages.properties
index 5f5398eba..45e48d7d1 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/messages.properties
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/messages.properties
@@ -94,7 +94,6 @@ ImportProjectSetMainPage_Browse=Br&owse...
ImportProjectSetMainPage_The_specified_file_does_not_exist_4=The specified file does not exist
ImportProjectSetMainPage_You_have_specified_a_folder_5=You have specified a folder
ImportProjectSetMainPage_workingSetNameEmpty=The working set name must not be empty
-ImportProjectSetMainPage_workingSetNameExists=The specified working set already exists
ImportProjectSetMainPage_createWorkingSetLabel=&Create a working set containing the imported projects
ImportProjectSetMainPage_workingSetLabel=&Working Set Name:
ImportProjectSetMainPage_AddToWorkingSet=&Add the imported team project set to a working set
@@ -283,8 +282,8 @@ SynchronizationLabelProvider_0={0} (Initializing)
SynchronizationCompareAdapter_0=Workspace
WorkspaceScope_0=Workspace
WorkingSetScope_0=Workspace
-WorkingSetsDialog_Title=Select a Resource Working Set
-WorkingSetsDialog_Message=Select an existing working set or type in a new one
+WorkingSetsDialog_Title=Select a Working Set
+WorkingSetsDialog_Message=Select an existing working set or enter a new name to create a Resource Working Set
WorkingSetsDialog_Label=Working Set:
SubscriberParticipant_namePattern={0} ({1})
SubscriberParticipantWizard_0=There are no {0} resources to synchronize
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ImportProjectSetMainPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ImportProjectSetMainPage.java
index 4214758e7..736513b52 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ImportProjectSetMainPage.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ImportProjectSetMainPage.java
@@ -24,8 +24,8 @@ import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.*;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.ui.IWorkingSet;
+import org.eclipse.team.internal.ui.IHelpContextIds;
+import org.eclipse.team.internal.ui.TeamUIMessages;
import org.eclipse.ui.PlatformUI;
public class ImportProjectSetMainPage extends TeamWizardPage {
@@ -173,13 +173,6 @@ public class ImportProjectSetMainPage extends TeamWizardPage {
if (workingSetName.length() == 0) {
setMessage(TeamUIMessages.ImportProjectSetMainPage_workingSetNameEmpty, ERROR);
return false;
- } else {
- // todo: verify name doesn't already exist
- IWorkingSet existingSet = TeamUIPlugin.getPlugin().getWorkbench().getWorkingSetManager().getWorkingSet(workingSetName);
- if (existingSet != null && !existingSet.getId().equals(WorkingSetsDialog.resourceWorkingSetId)) {
- setMessage(TeamUIMessages.ImportProjectSetMainPage_workingSetNameExists, ERROR);
- return false;
- }
}
}
setMessage(null);
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ProjectSetImportWizard.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ProjectSetImportWizard.java
index 65f0e3ddb..6c94cf95e 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ProjectSetImportWizard.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ProjectSetImportWizard.java
@@ -87,7 +87,8 @@ public class ProjectSetImportWizard extends Wizard implements IImportWizard {
IAdaptable[] tempElements = oldSet.getElements();
IAdaptable[] finalElementList = new IAdaptable[tempElements.length + projects.length];
System.arraycopy(tempElements, 0, finalElementList, 0, tempElements.length);
- System.arraycopy(projects, 0,finalElementList, tempElements.length, projects.length);
+ IAdaptable[] adaptedProjects = oldSet.adaptElements(projects);
+ System.arraycopy(adaptedProjects, 0,finalElementList, tempElements.length, adaptedProjects.length);
oldSet.setElements(finalElementList);
}
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/WorkingSetsDialog.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/WorkingSetsDialog.java
index d57c10ad3..93ca9f659 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/WorkingSetsDialog.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/WorkingSetsDialog.java
@@ -78,26 +78,13 @@ public class WorkingSetsDialog extends TitleAreaDialog {
wsTableViewer.setContentProvider(new ArrayContentProvider());
wsTableViewer.setLabelProvider(new WorkingSetLabelProvider());
- wsTableViewer.setInput(getResourceWorkingSets());
+ wsTableViewer.setInput(TeamUIPlugin.getPlugin().getWorkbench().getWorkingSetManager().getWorkingSets());
setupListeners();
return parent;
}
- private Object getResourceWorkingSets() {
- IWorkingSet[] allSets = TeamUIPlugin.getPlugin().getWorkbench().getWorkingSetManager().getWorkingSets();
- ArrayList resourceSets = new ArrayList();
- for (int i = 0; i < allSets.length; i++) {
- String id = allSets[i].getId();
- if (id != null && id.equals(WorkingSetsDialog.resourceWorkingSetId)) {
- resourceSets.add(allSets[i]);
- }
- }
- return (IWorkingSet[]) resourceSets.toArray(new IWorkingSet[resourceSets.size()]);
-
- }
-
protected void okPressed() {
selectedWorkingSet = wsNameText.getText();

Back to the top