Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 56543 Details for
Bug 167595
[Wizards] Allow adding projects to Java working set on checkout
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Fix
167595_patch.txt (text/plain), 10.12 KB, created by
Markus Keller
on 2007-01-08 06:31:42 EST
(
hide
)
Description:
Fix
Filename:
MIME Type:
Creator:
Markus Keller
Created:
2007-01-08 06:31:42 EST
Size:
10.12 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.team.ui >Index: src/org/eclipse/team/internal/ui/wizards/WorkingSetsDialog.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/WorkingSetsDialog.java,v >retrieving revision 1.2 >diff -u -r1.2 WorkingSetsDialog.java >--- src/org/eclipse/team/internal/ui/wizards/WorkingSetsDialog.java 18 Dec 2006 14:16:42 -0000 1.2 >+++ src/org/eclipse/team/internal/ui/wizards/WorkingSetsDialog.java 8 Jan 2007 11:24:04 -0000 >@@ -78,26 +78,13 @@ > > 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(); > >Index: src/org/eclipse/team/internal/ui/wizards/ProjectSetImportWizard.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ProjectSetImportWizard.java,v >retrieving revision 1.19 >diff -u -r1.19 ProjectSetImportWizard.java >--- src/org/eclipse/team/internal/ui/wizards/ProjectSetImportWizard.java 5 Jul 2006 15:42:21 -0000 1.19 >+++ src/org/eclipse/team/internal/ui/wizards/ProjectSetImportWizard.java 8 Jan 2007 11:24:04 -0000 >@@ -87,7 +87,8 @@ > 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); > } > } >Index: src/org/eclipse/team/internal/ui/wizards/ImportProjectSetMainPage.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ImportProjectSetMainPage.java,v >retrieving revision 1.15 >diff -u -r1.15 ImportProjectSetMainPage.java >--- src/org/eclipse/team/internal/ui/wizards/ImportProjectSetMainPage.java 5 Jul 2006 15:42:21 -0000 1.15 >+++ src/org/eclipse/team/internal/ui/wizards/ImportProjectSetMainPage.java 8 Jan 2007 11:24:04 -0000 >@@ -24,8 +24,8 @@ > 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 @@ > 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); >Index: src/org/eclipse/team/internal/ui/TeamUIMessages.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIMessages.java,v >retrieving revision 1.51 >diff -u -r1.51 TeamUIMessages.java >--- src/org/eclipse/team/internal/ui/TeamUIMessages.java 21 Dec 2006 17:38:09 -0000 1.51 >+++ src/org/eclipse/team/internal/ui/TeamUIMessages.java 8 Jan 2007 11:24:04 -0000 >@@ -267,7 +267,6 @@ > 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; > >Index: src/org/eclipse/team/internal/ui/messages.properties >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/messages.properties,v >retrieving revision 1.213 >diff -u -r1.213 messages.properties >--- src/org/eclipse/team/internal/ui/messages.properties 21 Dec 2006 17:38:20 -0000 1.213 >+++ src/org/eclipse/team/internal/ui/messages.properties 8 Jan 2007 11:24:04 -0000 >@@ -94,7 +94,6 @@ > 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 @@ > 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 >#P org.eclipse.team.cvs.ui >Index: src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutProjectOperation.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutProjectOperation.java,v >retrieving revision 1.42 >diff -u -r1.42 CheckoutProjectOperation.java >--- src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutProjectOperation.java 4 Oct 2006 15:33:15 -0000 1.42 >+++ src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutProjectOperation.java 8 Jan 2007 11:24:09 -0000 >@@ -30,6 +30,7 @@ > import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo; > import org.eclipse.team.internal.ccvs.ui.*; > import org.eclipse.team.internal.ccvs.ui.Policy; >+import org.eclipse.team.internal.ui.wizards.WorkingSetsDialog; > import org.eclipse.ui.*; > /** > * This class acts as an abstract class for checkout operations. >@@ -514,13 +515,15 @@ > IWorkingSet oldSet = manager.getWorkingSet(workingSetName); > if (oldSet == null) { > IWorkingSet newSet = manager.createWorkingSet(workingSetName, projects); >+ newSet.setId(WorkingSetsDialog.resourceWorkingSetId); > manager.addWorkingSet(newSet); >- }else { >+ } else { > //don't overwrite the old elements > 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); > } > } >Index: src/org/eclipse/team/internal/ccvs/ui/wizards/CheckoutAsMainPage.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CheckoutAsMainPage.java,v >retrieving revision 1.20 >diff -u -r1.20 CheckoutAsMainPage.java >--- src/org/eclipse/team/internal/ccvs/ui/wizards/CheckoutAsMainPage.java 29 Jun 2006 18:26:30 -0000 1.20 >+++ src/org/eclipse/team/internal/ccvs/ui/wizards/CheckoutAsMainPage.java 8 Jan 2007 11:24:09 -0000 >@@ -24,9 +24,9 @@ > import org.eclipse.swt.layout.GridLayout; > import org.eclipse.swt.widgets.*; > import org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder; >-import org.eclipse.team.internal.ccvs.ui.*; >+import org.eclipse.team.internal.ccvs.ui.CVSUIMessages; >+import org.eclipse.team.internal.ccvs.ui.IHelpContextIds; > import org.eclipse.team.internal.ui.wizards.WorkingSetsDialog; >-import org.eclipse.ui.IWorkingSet; > import org.eclipse.ui.PlatformUI; > > /** >@@ -342,13 +342,6 @@ > if (workingSetName.length() == 0) { > setMessage(CVSUIMessages.CheckoutAsMainPage_EmptyWorkingSetErrorMessage, ERROR); > return false; >- } else { >- // todo: verify name doesn't already exist >- IWorkingSet existingSet = CVSUIPlugin.getPlugin().getWorkbench().getWorkingSetManager().getWorkingSet(workingSetName); >- if (existingSet != null && !existingSet.getId().equals(WorkingSetsDialog.resourceWorkingSetId)) { >- setMessage(CVSUIMessages.CheckoutAsMainPage_WorkingSetExistsErrorMessage, ERROR); >- return false; >- } > } > } > setMessage(null);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 167595
: 56543