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 44822 Details for
Bug 147727
UI incorrectly prevents overlapping project locations on disk
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]
For reference, here is the patch with the fix
patch.txt (text/plain), 5.51 KB, created by
John Arthorne
on 2006-06-19 11:04:44 EDT
(
hide
)
Description:
For reference, here is the patch with the fix
Filename:
MIME Type:
Creator:
John Arthorne
Created:
2006-06-19 11:04:44 EDT
Size:
5.51 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.ui.ide >Index: src/org/eclipse/ui/internal/ide/messages.properties >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/messages.properties,v >retrieving revision 1.121 >diff -u -r1.121 messages.properties >--- src/org/eclipse/ui/internal/ide/messages.properties 14 Jun 2006 14:39:44 -0000 1.121 >+++ src/org/eclipse/ui/internal/ide/messages.properties 19 Jun 2006 15:07:38 -0000 >@@ -393,7 +393,6 @@ > # --- New Project --- > WizardNewProjectCreationPage_description = Create a new project > WizardNewProjectCreationPage_locationError = Invalid project contents directory >-WizardNewProjectCreationPage_defaultLocationError = Project contents cannot be inside workspace directory > WizardNewProjectCreationPage_projectNameEmpty = Project name must be specified > WizardNewProjectCreationPage_projectLocationEmpty = Project contents directory must be specified > WizardNewProjectCreationPage_projectExistsMessage = A project with that name already exists in the workspace. >Index: src/org/eclipse/ui/internal/ide/IDEWorkbenchMessages.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/IDEWorkbenchMessages.java,v >retrieving revision 1.33 >diff -u -r1.33 IDEWorkbenchMessages.java >--- src/org/eclipse/ui/internal/ide/IDEWorkbenchMessages.java 14 Jun 2006 14:39:44 -0000 1.33 >+++ src/org/eclipse/ui/internal/ide/IDEWorkbenchMessages.java 19 Jun 2006 15:07:38 -0000 >@@ -378,7 +378,6 @@ > // --- New Project --- > public static String WizardNewProjectCreationPage_description; > public static String WizardNewProjectCreationPage_locationError; >- public static String WizardNewProjectCreationPage_defaultLocationError; > public static String WizardNewProjectCreationPage_projectNameEmpty; > public static String WizardNewProjectCreationPage_projectLocationEmpty; > public static String WizardNewProjectCreationPage_projectExistsMessage; >Index: src/org/eclipse/ui/internal/ide/dialogs/ProjectContentsLocationArea.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/ProjectContentsLocationArea.java,v >retrieving revision 1.14 >diff -u -r1.14 ProjectContentsLocationArea.java >--- src/org/eclipse/ui/internal/ide/dialogs/ProjectContentsLocationArea.java 8 May 2006 20:54:08 -0000 1.14 >+++ src/org/eclipse/ui/internal/ide/dialogs/ProjectContentsLocationArea.java 19 Jun 2006 15:07:38 -0000 >@@ -13,12 +13,11 @@ > > import java.net.URI; > import java.net.URISyntaxException; >- > import org.eclipse.core.filesystem.IFileInfo; > import org.eclipse.core.filesystem.URIUtil; > import org.eclipse.core.resources.IProject; >+import org.eclipse.core.resources.ResourcesPlugin; > import org.eclipse.core.runtime.CoreException; >-import org.eclipse.core.runtime.IPath; > import org.eclipse.core.runtime.IStatus; > import org.eclipse.core.runtime.Path; > import org.eclipse.core.runtime.Platform; >@@ -382,20 +381,19 @@ > return IDEWorkbenchMessages.ProjectLocationSelectionDialog_locationError; > } > >- if (existingProject == null) { >- IPath projectPath = new Path(locationFieldContents); >- if (Platform.getLocation().isPrefixOf(projectPath)) { >- return IDEWorkbenchMessages.WizardNewProjectCreationPage_defaultLocationError; >- } >- >- } else { >- IStatus locationStatus = existingProject.getWorkspace() >- .validateProjectLocationURI(existingProject, newPath); >- >- if (!locationStatus.isOK()) { >- return locationStatus.getMessage(); >- } >+ //create a dummy project for the purpose of validation if necessary >+ IProject project = existingProject; >+ if (project == null) { >+ String name = new Path(locationFieldContents).lastSegment(); >+ project = ResourcesPlugin.getWorkspace().getRoot().getProject(name); >+ } >+ IStatus locationStatus = project.getWorkspace() >+ .validateProjectLocationURI(project, newPath); > >+ if (!locationStatus.isOK()) { >+ return locationStatus.getMessage(); >+ } >+ if (existingProject != null) { > URI projectPath = existingProject.getLocationURI(); > if (projectPath != null && URIUtil.equals(projectPath, newPath)) { > return IDEWorkbenchMessages.ProjectLocationSelectionDialog_locationError; >Index: src/org/eclipse/ui/internal/ide/dialogs/WizardNewProjectNameAndLocationPage.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/WizardNewProjectNameAndLocationPage.java,v >retrieving revision 1.10 >diff -u -r1.10 WizardNewProjectNameAndLocationPage.java >--- src/org/eclipse/ui/internal/ide/dialogs/WizardNewProjectNameAndLocationPage.java 8 May 2006 20:54:08 -0000 1.10 >+++ src/org/eclipse/ui/internal/ide/dialogs/WizardNewProjectNameAndLocationPage.java 19 Jun 2006 15:07:38 -0000 >@@ -430,12 +430,6 @@ > setErrorMessage(IDEWorkbenchMessages.WizardNewProjectCreationPage_locationError); > return false; > } >- if (!useDefaults >- && Platform.getLocation().isPrefixOf( >- new Path(locationFieldContents))) { >- setErrorMessage(IDEWorkbenchMessages.WizardNewProjectCreationPage_defaultLocationError); >- return false; >- } > > if (getProjectHandle().exists()) { > setErrorMessage(IDEWorkbenchMessages.WizardNewProjectCreationPage_projectExistsMessage);
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 147727
: 44822