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 54801 Details for
Bug 59289
[launching] external tool builder names must be globally unique?
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
patch
namespace.patch (text/plain), 7.94 KB, created by
Darin Wright
on 2006-11-30 12:37:43 EST
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Darin Wright
Created:
2006-11-30 12:37:43 EST
Size:
7.94 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.debug.core >Index: core/org/eclipse/debug/internal/core/LaunchManager.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchManager.java,v >retrieving revision 1.175 >diff -u -r1.175 LaunchManager.java >--- core/org/eclipse/debug/internal/core/LaunchManager.java 14 Nov 2006 20:07:24 -0000 1.175 >+++ core/org/eclipse/debug/internal/core/LaunchManager.java 30 Nov 2006 17:32:01 -0000 >@@ -19,7 +19,6 @@ > import java.io.File; > import java.io.FileInputStream; > import java.io.FileNotFoundException; >-import java.io.FilenameFilter; > import java.io.IOException; > import java.io.InputStream; > import java.io.InputStreamReader; >@@ -65,6 +64,7 @@ > import org.eclipse.core.runtime.ISafeRunnable; > import org.eclipse.core.runtime.IStatus; > import org.eclipse.core.runtime.ListenerList; >+import org.eclipse.core.runtime.Path; > import org.eclipse.core.runtime.Platform; > import org.eclipse.core.runtime.PlatformObject; > import org.eclipse.core.runtime.Preferences; >@@ -931,21 +931,24 @@ > List configs = new ArrayList(10); > final File directory = containerPath.toFile(); > if (directory.isDirectory()) { >- FilenameFilter filter = new FilenameFilter() { >- public boolean accept(File dir, String name) { >- return dir.equals(directory) && >- name.endsWith(ILaunchConfiguration.LAUNCH_CONFIGURATION_FILE_EXTENSION); >- } >- }; >- String[] files = directory.list(filter); >- LaunchConfiguration config = null; >- for (int i = 0; i < files.length; i++) { >- config = new LaunchConfiguration(containerPath.append(files[i])); >- configs.add(config); >- } >+ traverse(directory, configs); > } > return configs; > } >+ >+ private void traverse(File directory, List configs) { >+ File[] files = directory.listFiles(); >+ for (int i = 0; i < files.length; i++) { >+ File file = files[i]; >+ if (file.isDirectory()) { >+ traverse(file, configs); >+ } else { >+ if (file.getName().endsWith(ILaunchConfiguration.LAUNCH_CONFIGURATION_FILE_EXTENSION)) { >+ configs.add(new LaunchConfiguration(new Path(file.toString()))); >+ } >+ } >+ } >+ } > > /** > * Fires notification to (single) listeners that a launch has been >@@ -2312,5 +2315,12 @@ > } > } > return title; >- } >+ } >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.debug.core.ILaunchManager#getLaunchConfiguration(org.eclipse.core.runtime.IPath) >+ */ >+ public ILaunchConfiguration getLaunchConfiguration(IPath location) { >+ return new LaunchConfiguration(location); >+ } > } >Index: core/org/eclipse/debug/internal/core/LaunchConfigurationWorkingCopy.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfigurationWorkingCopy.java,v >retrieving revision 1.63 >diff -u -r1.63 LaunchConfigurationWorkingCopy.java >--- core/org/eclipse/debug/internal/core/LaunchConfigurationWorkingCopy.java 23 Oct 2006 13:53:16 -0000 1.63 >+++ core/org/eclipse/debug/internal/core/LaunchConfigurationWorkingCopy.java 30 Nov 2006 17:32:01 -0000 >@@ -486,17 +486,23 @@ > * @see ILaunchConfiguration#getLocation() > */ > public IPath getLocation() { >- if (isMoved()) { >- IPath path = null; >- if (isLocal()) { >- path = LaunchManager.LOCAL_LAUNCH_CONFIGURATION_CONTAINER_PATH; >- } else { >- path = getContainer().getLocation(); >+ IPath path = null; >+ if (isLocal()) { >+ path = LaunchManager.LOCAL_LAUNCH_CONFIGURATION_CONTAINER_PATH; >+ try { >+ IResource[] resources = getMappedResources(); >+ if (resources != null && resources.length > 0) { >+ IResource resource = resources[0]; >+ path = path.append(resource.getFullPath()); >+ } >+ } catch (CoreException e) { >+ DebugPlugin.log(e.getStatus()); > } >- path = path.append(getName() + "." + LAUNCH_CONFIGURATION_FILE_EXTENSION); //$NON-NLS-1$ >- return path; >- } >- return getOriginal().getLocation(); >+ } else { >+ path = getContainer().getLocation(); >+ } >+ path = path.append(getName() + "." + LAUNCH_CONFIGURATION_FILE_EXTENSION); //$NON-NLS-1$ >+ return path; > } > > /** >@@ -518,18 +524,7 @@ > * location has changed from that of its original > */ > protected boolean isMoved() { >- if (isNew() || fRenamed) { >- return true; >- } >- IContainer newContainer = getContainer(); >- IContainer originalContainer = ((LaunchConfiguration)getOriginal()).getContainer(); >- if (newContainer == originalContainer) { >- return false; >- } >- if (newContainer == null) { >- return !originalContainer.equals(newContainer); >- } >- return !newContainer.equals(originalContainer); >+ return isNew() || !getLocation().equals(getOriginal().getLocation()); > } > > /** >Index: core/org/eclipse/debug/core/ILaunchManager.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.debug.core/core/org/eclipse/debug/core/ILaunchManager.java,v >retrieving revision 1.62 >diff -u -r1.62 ILaunchManager.java >--- core/org/eclipse/debug/core/ILaunchManager.java 19 Oct 2006 21:37:53 -0000 1.62 >+++ core/org/eclipse/debug/core/ILaunchManager.java 30 Nov 2006 17:32:00 -0000 >@@ -15,6 +15,7 @@ > > import org.eclipse.core.resources.IFile; > import org.eclipse.core.runtime.CoreException; >+import org.eclipse.core.runtime.IPath; > import org.eclipse.debug.core.model.IDebugTarget; > import org.eclipse.debug.core.model.IPersistableSourceLocator; > import org.eclipse.debug.core.model.IProcess; >@@ -459,6 +460,16 @@ > */ > public void removeLaunchListener(ILaunchListener listener); > >+ /** >+ * Returns the launch configuration at the specified location. The configuration >+ * may or may not exist. The location is full path in the workspace or a path >+ * in the location file system. >+ * >+ * @param location full workspace path or local file system path >+ * @return launch configuration that may or may not exist >+ * @since 3.3 >+ */ >+ public ILaunchConfiguration getLaunchConfiguration(IPath location); > } > > >#P org.eclipse.debug.ui >Index: ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java,v >retrieving revision 1.74 >diff -u -r1.74 LaunchConfigurationTabGroupViewer.java >--- ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java 17 Nov 2006 22:08:07 -0000 1.74 >+++ ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java 30 Nov 2006 17:32:03 -0000 >@@ -1236,13 +1236,16 @@ > } > > // Otherwise, if there's already a config with the same name, complain >- if (!getOriginal().getName().equals(currentName)) { >- if (DebugPlugin.getDefault().getLaunchManager().isExistingLaunchConfigurationName(currentName)) { >- throw new CoreException(new Status(IStatus.ERROR, >- DebugUIPlugin.getUniqueIdentifier(), >- 0, >- LaunchConfigurationsMessages.LaunchConfigurationDialog_Launch_configuration_already_exists_with_this_name_12, >- null)); >+ if (!getOriginal().getLocation().equals(getWorkingCopy().getLocation())) { >+ if (DebugPlugin.getDefault().getLaunchManager().getLaunchConfiguration( >+ getWorkingCopy().getLocation()).exists()) { >+ if (DebugPlugin.getDefault().getLaunchManager().isExistingLaunchConfigurationName(currentName)) { >+ throw new CoreException(new Status(IStatus.ERROR, >+ DebugUIPlugin.getUniqueIdentifier(), >+ 0, >+ LaunchConfigurationsMessages.LaunchConfigurationDialog_Launch_configuration_already_exists_with_this_name_12, >+ 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 59289
: 54801 |
256759