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 90579 Details for
Bug 81895
[Import/Export] Multiple Projetcs Import Panel must give information about the 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]
Revised patch against HEAD.
bug81895-patch.txt (text/plain), 10.72 KB, created by
Remy Suen
on 2008-02-24 10:50:07 EST
(
hide
)
Description:
Revised patch against HEAD.
Filename:
MIME Type:
Creator:
Remy Suen
Created:
2008-02-24 10:50:07 EST
Size:
10.72 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.ui.ide >Index: src/org/eclipse/ui/internal/wizards/datatransfer/messages.properties >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/messages.properties,v >retrieving revision 1.25 >diff -u -r1.25 messages.properties >--- src/org/eclipse/ui/internal/wizards/datatransfer/messages.properties 19 Feb 2008 15:12:00 -0000 1.25 >+++ src/org/eclipse/ui/internal/wizards/datatransfer/messages.properties 24 Feb 2008 15:42:12 -0000 >@@ -83,6 +83,8 @@ > WizardProjectsImportPage_ArchiveSelectTitle=Select &archive file: > WizardProjectsImportPage_SelectArchiveDialogTitle=Select archive containing the projects to import > WizardProjectsImportPage_ProjectsListTitle=&Projects: >+WizardProjectsImportPage_ProjectNameColumnHeader=Project Name >+WizardProjectsImportPage_ProjectParentColumnHeader=Parent Container > WizardProjectsImportPage_ProcessingMessage=Processing results > WizardProjectsImportPage_SelectDialogTitle=Select root directory of the projects to import > WizardProjectsImportPage_SearchingMessage=Searching for projects >Index: src/org/eclipse/ui/internal/wizards/datatransfer/DataTransferMessages.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/DataTransferMessages.java,v >retrieving revision 1.14 >diff -u -r1.14 DataTransferMessages.java >--- src/org/eclipse/ui/internal/wizards/datatransfer/DataTransferMessages.java 19 Feb 2008 15:12:00 -0000 1.14 >+++ src/org/eclipse/ui/internal/wizards/datatransfer/DataTransferMessages.java 24 Feb 2008 15:42:10 -0000 >@@ -78,6 +78,8 @@ > public static String WizardExternalProjectImportPage_description; > public static String WizardExternalProjectImportPage_notAProject; > public static String WizardProjectsImportPage_ProjectsListTitle; >+ public static String WizardProjectsImportPage_ProjectNameColumnHeader; >+ public static String WizardProjectsImportPage_ProjectParentColumnHeader; > public static String WizardProjectsImportPage_ProcessingMessage; > public static String WizardProjectsImportPage_SelectDialogTitle; > public static String WizardProjectsImportPage_SearchingMessage; >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.47 >diff -u -r1.47 WizardProjectsImportPage.java >--- src/org/eclipse/ui/internal/wizards/datatransfer/WizardProjectsImportPage.java 19 Feb 2008 15:12:00 -0000 1.47 >+++ src/org/eclipse/ui/internal/wizards/datatransfer/WizardProjectsImportPage.java 24 Feb 2008 15:42:11 -0000 >@@ -38,6 +38,7 @@ > import org.eclipse.swt.events.SelectionEvent; > import org.eclipse.swt.events.TraverseEvent; > import org.eclipse.swt.events.TraverseListener; >+import org.eclipse.swt.graphics.Image; > import org.eclipse.swt.layout.GridData; > import org.eclipse.swt.layout.GridLayout; > import org.eclipse.swt.widgets.Button; >@@ -46,6 +47,8 @@ > import org.eclipse.swt.widgets.FileDialog; > import org.eclipse.swt.widgets.Label; > import org.eclipse.swt.widgets.Text; >+import org.eclipse.swt.widgets.Tree; >+import org.eclipse.swt.widgets.TreeColumn; > > import org.eclipse.core.runtime.CoreException; > import org.eclipse.core.runtime.IPath; >@@ -72,8 +75,9 @@ > import org.eclipse.jface.viewers.CheckStateChangedEvent; > import org.eclipse.jface.viewers.CheckboxTreeViewer; > import org.eclipse.jface.viewers.ICheckStateListener; >+import org.eclipse.jface.viewers.ILabelProviderListener; >+import org.eclipse.jface.viewers.ITableLabelProvider; > import org.eclipse.jface.viewers.ITreeContentProvider; >-import org.eclipse.jface.viewers.LabelProvider; > import org.eclipse.jface.viewers.Viewer; > import org.eclipse.jface.viewers.ViewerComparator; > import org.eclipse.jface.wizard.WizardPage; >@@ -119,6 +123,8 @@ > String projectName; > > Object parent; >+ String parentName; > > int level; > >@@ -156,6 +162,14 @@ > private void setProjectName() { > try { > if (projectArchiveFile != null) { >+ String label = structureProvider.getFullPath(projectArchiveFile); >+ int sepIndex = label.lastIndexOf('/'); >+ if (sepIndex == -1) { >+ // there is no parent, so we will just use the empty string >+ parentName = ""; //$NON-NLS-1$ >+ } else { >+ parentName = label.substring(0, sepIndex); >+ } > InputStream stream = structureProvider > .getContents(projectArchiveFile); > if (stream != null) { >@@ -173,6 +187,7 @@ > projectName= path.segment(path.segmentCount() - 2); > } > } else { >+ parentName = projectSystemFile.getParent(); > IPath path = new Path(projectSystemFile.getPath()); > // if the file is in the default location, use the directory > // name as the project name >@@ -240,6 +255,15 @@ > projectName, > nameFromDescription); > } >+ >+ /** >+ * Gets the name of the project's containing parent. >+ * @return the project's container >+ * @since 3.4 >+ */ >+ public String getParentName() { >+ return parentName; >+ } > } > > >@@ -375,6 +399,15 @@ > GridData listData = new GridData(GridData.GRAB_HORIZONTAL > | GridData.GRAB_VERTICAL | GridData.FILL_BOTH); > projectsList.getControl().setLayoutData(listData); >+ Tree projectsTree = projectsList.getTree(); >+ projectsTree.setHeaderVisible(true); >+ // create a column for the project and its parent container >+ TreeColumn projectColumn = new TreeColumn(projectsTree, SWT.LEAD); >+ projectColumn.setWidth(150); >+ projectColumn.setText(DataTransferMessages.WizardProjectsImportPage_ProjectNameColumnHeader); >+ TreeColumn parentColumn = new TreeColumn(projectsTree, SWT.LEAD); >+ parentColumn.setWidth(200); >+ parentColumn.setText(DataTransferMessages.WizardProjectsImportPage_ProjectParentColumnHeader); > > projectsList.setContentProvider(new ITreeContentProvider() { > >@@ -435,14 +468,29 @@ > > }); > >- projectsList.setLabelProvider(new LabelProvider() { >- /* >- * (non-Javadoc) >- * >- * @see org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object) >- */ >- public String getText(Object element) { >- return ((ProjectRecord) element).getProjectLabel(); >+ projectsList.setLabelProvider(new ITableLabelProvider() { >+ public Image getColumnImage(Object element, int columnIndex) { >+ return null; >+ } >+ public String getColumnText(Object element, int columnIndex) { >+ if (columnIndex == 0) { >+ return ((ProjectRecord) element).getProjectName(); >+ } >+ return ((ProjectRecord) element).getParentName(); >+ } >+ public void addListener(ILabelProviderListener listener) { >+ } >+ public void dispose() { >+ } >+ public boolean isLabelProperty(Object element, String property) { >+ return false; >+ } >+ public void removeListener(ILabelProviderListener listener) { > } > }); > >#P org.eclipse.ui.tests >Index: Eclipse UI Tests/org/eclipse/ui/tests/datatransfer/ImportExistingProjectsWizardTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/datatransfer/ImportExistingProjectsWizardTest.java,v >retrieving revision 1.2 >diff -u -r1.2 ImportExistingProjectsWizardTest.java >--- Eclipse UI Tests/org/eclipse/ui/tests/datatransfer/ImportExistingProjectsWizardTest.java 4 Dec 2007 18:48:31 -0000 1.2 >+++ Eclipse UI Tests/org/eclipse/ui/tests/datatransfer/ImportExistingProjectsWizardTest.java 24 Feb 2008 15:42:13 -0000 >@@ -145,6 +145,8 @@ > WizardProjectsImportPage wpip = getNewWizard(); > HashSet projects = new HashSet(); > projects.add("HelloWorld"); >+ HashSet projectParents = new HashSet(); >+ projectParents.add("HelloWorld"); > > wpip.getProjectFromDirectoryRadio().setSelection((false)); // We > // want >@@ -156,12 +158,16 @@ > > ProjectRecord[] selectedProjects = wpip.getValidProjects(); > ArrayList projectNames = new ArrayList(); >+ ArrayList parentNames = new ArrayList(); > for (int i = 0; i < selectedProjects.length; i++) { > projectNames.add(selectedProjects[i].getProjectName()); >+ parentNames.add(selectedProjects[i].getParentName()); > } > > assertTrue("Not all projects were found correctly in zip", > projectNames.containsAll(projects)); >+ assertTrue("Not all project parent names were extracted correctly from zip", >+ parentNames.containsAll(projectParents)); > } catch (IOException e) { > fail(e.toString()); > } >@@ -175,6 +181,8 @@ > WizardProjectsImportPage wpip = getNewWizard(); > HashSet projects = new HashSet(); > projects.add("HelloWorld"); >+ HashSet projectParents = new HashSet(); >+ projectParents.add("HelloWorld"); > > wpip.getProjectFromDirectoryRadio().setSelection((false)); // We > // want >@@ -185,13 +193,17 @@ > wpip.updateProjectsList(archiveFile.getPath()); > > ProjectRecord[] selectedProjects = wpip.getValidProjects(); >+ ArrayList parentNames = new ArrayList(); > ArrayList projectNames = new ArrayList(); > for (int i = 0; i < selectedProjects.length; i++) { > projectNames.add(selectedProjects[i].getProjectName()); >+ parentNames.add(selectedProjects[i].getParentName()); > } > > assertTrue("Not all projects were found correctly in tar", > projectNames.containsAll(projects)); >+ assertTrue("Not all project parent names were extracted correctly from tar", >+ parentNames.containsAll(projectParents)); > } catch (IOException e) { > fail(e.toString()); > } >@@ -204,18 +216,24 @@ > WizardProjectsImportPage wpip = getNewWizard(); > HashSet projects = new HashSet(); > projects.add("HelloWorld"); >+ HashSet projectParents = new HashSet(); >+ projectParents.add(wsPath.toOSString()); > // We're importing a directory > wpip.getProjectFromDirectoryRadio().setSelection((true)); > wpip.updateProjectsList(wsPath.toOSString()); > > ProjectRecord[] selectedProjects = wpip.getValidProjects(); > ArrayList projectNames = new ArrayList(); >+ ArrayList parentNames = new ArrayList(); > for (int i = 0; i < selectedProjects.length; i++) { > projectNames.add(selectedProjects[i].getProjectName()); >+ parentNames.add(selectedProjects[i].getParentName()); > } > > assertTrue("Not all projects were found correctly in directory", > projectNames.containsAll(projects)); >+ assertTrue("Not all project parents were extracted correctly from directory", >+ parentNames.containsAll(projectParents)); > } catch (IOException e) { > fail(e.toString()); > }
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 81895
:
85282
|
85303
|
85313
|
87261
|
87263
| 90579