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 85303 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]
Patch to implement the requested feature.
bug81895-project-parent-name-patch.txt (text/plain), 9.53 KB, created by
Remy Suen
on 2007-12-14 14:16:35 EST
(
hide
)
Description:
Patch to implement the requested feature.
Filename:
MIME Type:
Creator:
Remy Suen
Created:
2007-12-14 14:16:35 EST
Size:
9.53 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.23 >diff -u -r1.23 messages.properties >--- src/org/eclipse/ui/internal/wizards/datatransfer/messages.properties 26 Nov 2007 18:48:40 -0000 1.23 >+++ src/org/eclipse/ui/internal/wizards/datatransfer/messages.properties 14 Dec 2007 19:14:36 -0000 >@@ -81,6 +81,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.12 >diff -u -r1.12 DataTransferMessages.java >--- src/org/eclipse/ui/internal/wizards/datatransfer/DataTransferMessages.java 26 Nov 2007 18:48:40 -0000 1.12 >+++ src/org/eclipse/ui/internal/wizards/datatransfer/DataTransferMessages.java 14 Dec 2007 19:14:34 -0000 >@@ -79,6 +79,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.45 >diff -u -r1.45 WizardProjectsImportPage.java >--- src/org/eclipse/ui/internal/wizards/datatransfer/WizardProjectsImportPage.java 26 Nov 2007 18:48:40 -0000 1.45 >+++ src/org/eclipse/ui/internal/wizards/datatransfer/WizardProjectsImportPage.java 14 Dec 2007 19:14:35 -0000 >@@ -37,6 +37,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; >@@ -45,6 +46,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; >@@ -71,8 +74,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.ITreeContentProvider; >-import org.eclipse.jface.viewers.LabelProvider; >+import org.eclipse.jface.viewers.ITableLabelProvider; > import org.eclipse.jface.viewers.Viewer; > import org.eclipse.jface.viewers.ViewerComparator; > import org.eclipse.jface.wizard.WizardPage; >@@ -118,6 +122,8 @@ > String projectName; > > Object parent; >+ >+ String parentName; > > int level; > >@@ -156,6 +162,15 @@ > IProjectDescription newDescription = null; > 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) { >@@ -165,6 +180,8 @@ > stream.close(); > } > } 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 >@@ -219,6 +236,15 @@ > public String getProjectName() { > return projectName; > } >+ >+ /** >+ * Gets the name of the project's containing parent. >+ * >+ * @return the project's container >+ */ >+ public String getParentName() { >+ return parentName; >+ } > } > > // dialog store id constants >@@ -354,6 +380,16 @@ > | GridData.GRAB_VERTICAL | GridData.FILL_BOTH); > projectsList.getControl().setLayoutData(listData); > >+ Tree projectsTree = projectsList.getTree(); >+ // 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(150); >+ parentColumn.setText(DataTransferMessages.WizardProjectsImportPage_ProjectParentColumnHeader); >+ > projectsList.setContentProvider(new ITreeContentProvider() { > > /* >@@ -413,14 +449,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).getProjectName(); >+ 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 14 Dec 2007 19:14:36 -0000 >@@ -145,6 +145,9 @@ > WizardProjectsImportPage wpip = getNewWizard(); > HashSet projects = new HashSet(); > projects.add("HelloWorld"); >+ >+ HashSet projectParents = new HashSet(); >+ projectParents.add("HelloWorld"); > > wpip.getProjectFromDirectoryRadio().setSelection((false)); // We > // want >@@ -162,6 +165,14 @@ > > assertTrue("Not all projects were found correctly in zip", > projectNames.containsAll(projects)); >+ >+ ArrayList parentNames = new ArrayList(); >+ for (int i = 0; i < selectedProjects.length; i++) { >+ parentNames.add(selectedProjects[i].getParentName()); >+ } >+ >+ assertTrue("Not all project parent names were extracted correctly from zip", >+ parentNames.containsAll(projectParents)); > } catch (IOException e) { > fail(e.toString()); > } >@@ -175,6 +186,9 @@ > WizardProjectsImportPage wpip = getNewWizard(); > HashSet projects = new HashSet(); > projects.add("HelloWorld"); >+ >+ HashSet projectParents = new HashSet(); >+ projectParents.add("HelloWorld"); > > wpip.getProjectFromDirectoryRadio().setSelection((false)); // We > // want >@@ -192,6 +206,14 @@ > > assertTrue("Not all projects were found correctly in tar", > projectNames.containsAll(projects)); >+ >+ ArrayList parentNames = new ArrayList(); >+ for (int i = 0; i < selectedProjects.length; i++) { >+ parentNames.add(selectedProjects[i].getParentName()); >+ } >+ >+ assertTrue("Not all project parent names were extracted correctly from tar", >+ parentNames.containsAll(projectParents)); > } catch (IOException e) { > fail(e.toString()); > } >@@ -216,6 +238,14 @@ > > assertTrue("Not all projects were found correctly in directory", > projectNames.containsAll(projects)); >+ >+ ArrayList parentNames = new ArrayList(); >+ for (int i = 0; i < selectedProjects.length; i++) { >+ parentNames.add(selectedProjects[i].getParentName()); >+ } >+ >+ assertTrue("Not all project parents were extracted correctly from directory", >+ projectNames.containsAll(projects)); > } 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