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 119488 Details for
Bug 150626
[Import/Export] Create working sets when importing several projects.
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]
Patch 01
WorkingSetWhileImport 01.txt (text/plain), 3.61 KB, created by
Prakash Rangaraj
on 2008-12-04 06:08:37 EST
(
hide
)
Description:
Patch 01
Filename:
MIME Type:
Creator:
Prakash Rangaraj
Created:
2008-12-04 06:08:37 EST
Size:
3.61 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.ui.ide >Index: src/org/eclipse/ui/internal/wizards/datatransfer/WizardProjectsImportPage.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/WizardProjectsImportPage.java,v >retrieving revision 1.50 >diff -u -r1.50 WizardProjectsImportPage.java >--- src/org/eclipse/ui/internal/wizards/datatransfer/WizardProjectsImportPage.java 5 May 2008 13:02:51 -0000 1.50 >+++ src/org/eclipse/ui/internal/wizards/datatransfer/WizardProjectsImportPage.java 4 Dec 2008 11:03:48 -0000 >@@ -76,8 +76,12 @@ > import org.eclipse.swt.widgets.FileDialog; > import org.eclipse.swt.widgets.Label; > import org.eclipse.swt.widgets.Text; >+import org.eclipse.ui.IWorkingSet; >+import org.eclipse.ui.IWorkingSetManager; >+import org.eclipse.ui.PlatformUI; > import org.eclipse.ui.actions.WorkspaceModifyOperation; > import org.eclipse.ui.dialogs.IOverwriteQuery; >+import org.eclipse.ui.dialogs.WorkingSetGroup; > import org.eclipse.ui.internal.ide.IDEWorkbenchMessages; > import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin; > import org.eclipse.ui.internal.ide.StatusUtil; >@@ -290,6 +294,8 @@ > // to mimize searches > private long lastModified; > >+ private WorkingSetGroup workingSetGroup; >+ > /** > * Creates a new project creation wizard page. > * >@@ -331,12 +337,22 @@ > createProjectsRoot(workArea); > createProjectsList(workArea); > createOptionsArea(workArea); >+ createWorkingSetGroup(workArea); > restoreWidgetValues(); > Dialog.applyDialogFont(workArea); > > } > > /** >+ * @param workArea >+ */ >+ private void createWorkingSetGroup(Composite workArea) { >+ String[] workingSetIds = new String[] {"org.eclipse.ui.resourceWorkingSetPage", //$NON-NLS-1$ >+ "org.eclipse.jdt.ui.JavaWorkingSetPage"}; //$NON-NLS-1$ >+ workingSetGroup = new WorkingSetGroup(workArea, null, workingSetIds); >+ } >+ >+ /** > * Create the area with the extra options. > * > * @param workArea >@@ -1147,7 +1163,9 @@ > */ > public boolean createProjects() { > saveWidgetValues(); >+ > final Object[] selected = projectsList.getCheckedElements(); >+ createdProjects = new ArrayList(); > WorkspaceModifyOperation op = new WorkspaceModifyOperation() { > protected void execute(IProgressMonitor monitor) > throws InvocationTargetException, InterruptedException { >@@ -1186,9 +1204,27 @@ > } > ArchiveFileManipulations.closeStructureProvider(structureProvider, > getShell()); >+ >+ // Adds the projects to the working sets >+ addToWorkingSets(); >+ > return true; > } > >+ List createdProjects; >+ >+ private void addToWorkingSets() { >+ >+ IWorkingSet[] selectedWorkingSets = workingSetGroup.getSelectedWorkingSets(); >+ if(selectedWorkingSets == null || selectedWorkingSets.length == 0) >+ return; // no Working set is selected >+ IWorkingSetManager workingSetManager = PlatformUI.getWorkbench().getWorkingSetManager(); >+ for (Iterator i = createdProjects.iterator(); i.hasNext();) { >+ IProject project = (IProject) i.next(); >+ workingSetManager.addToWorkingSets(project, selectedWorkingSets); >+ } >+ } >+ > /** > * Performs clean-up if the user cancels the wizard without doing anything > */ >@@ -1210,6 +1246,7 @@ > String projectName = record.getProjectName(); > final IWorkspace workspace = ResourcesPlugin.getWorkspace(); > final IProject project = workspace.getRoot().getProject(projectName); >+ createdProjects.add(project); > if (record.description == null) { > // error case > record.description = workspace.newProjectDescription(projectName);
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 150626
:
119488
|
119489
|
119491
|
127703