diff options
author | David Inglis | 2003-07-22 15:43:02 +0000 |
---|---|---|
committer | David Inglis | 2003-07-22 15:43:02 +0000 |
commit | 4da2df936325702ae618312b064d1cdd6b0d5047 (patch) | |
tree | 4a0bb68b1d95b450826a27df09b09e1207fb6484 /launch | |
parent | 4b8ed789cca44587b24bd628c24e7fecd48b4d02 (diff) | |
download | org.eclipse.cdt-4da2df936325702ae618312b064d1cdd6b0d5047.tar.gz org.eclipse.cdt-4da2df936325702ae618312b064d1cdd6b0d5047.tar.xz org.eclipse.cdt-4da2df936325702ae618312b064d1cdd6b0d5047.zip |
see change log
Diffstat (limited to 'launch')
5 files changed, 21 insertions, 7 deletions
diff --git a/launch/org.eclipse.cdt.launch/ChangeLog b/launch/org.eclipse.cdt.launch/ChangeLog index 5a941d4c3b2..26b864e4d54 100644 --- a/launch/org.eclipse.cdt.launch/ChangeLog +++ b/launch/org.eclipse.cdt.launch/ChangeLog @@ -1,3 +1,12 @@ +2003-07-22 David Inglis + * src/org/eclipse/cdt/launch/ui/CMainTab.java + Use project name for configuration naming when no binary selected + +2003-07-22 Mikhail Khodjaiants + * src/org/eclipse/cdt/launch/sourcelookup/DefaultSourceLocator.java + * src/org/eclipse/cdt/launch/ui/CSourceLookupTab.java + Fixed initialization problems. + 2003-07-17 Thomas Fletcher * src/org/eclipse/cdt/launch/sourcelookup/DefaultSourceLocator.java Applied source locator patch to expand the scope of source lookups. diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/LaunchImages.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/LaunchImages.java index 28bb0f2cf5a..928cd34c8be 100644 --- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/LaunchImages.java +++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/LaunchImages.java @@ -59,10 +59,7 @@ public class LaunchImages { public static Image get(String key) { return imageRegistry.get(key); } - - private static ImageDescriptor create(String prefix, String name) { - return ImageDescriptor.createFromURL(makeIconFileURL(prefix, name)); - } + private static URL makeIconFileURL(String prefix, String name) { StringBuffer buffer= new StringBuffer(prefix); diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/sourcelookup/DefaultSourceLocator.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/sourcelookup/DefaultSourceLocator.java index 5e7b938d3f6..5f6af56a115 100644 --- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/sourcelookup/DefaultSourceLocator.java +++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/sourcelookup/DefaultSourceLocator.java @@ -166,6 +166,9 @@ public class DefaultSourceLocator implements IPersistableSourceLocator, IAdaptab public void initializeDefaults( ILaunchConfiguration configuration ) throws CoreException { fSourceLocator = new CUISourceLocator( getProject( configuration ) ); + String memento = configuration.getAttribute( ILaunchConfiguration.ATTR_SOURCE_LOCATOR_MEMENTO, "" ); + if ( !isEmpty( memento ) ) + initializeFromMemento( memento ); } /* (non-Javadoc) diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CMainTab.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CMainTab.java index f48e7163503..41da4b76b42 100644 --- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CMainTab.java +++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CMainTab.java @@ -384,7 +384,7 @@ public class CMainTab extends CLaunchConfigurationTab { name = getLaunchConfigurationDialog().generateName(name); config.rename(name); } else { - String name = getLaunchConfigurationDialog().generateName(cElement.getElementName()); + String name = getLaunchConfigurationDialog().generateName(cElement.getCProject().getElementName()); config.rename(name); } } diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CSourceLookupTab.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CSourceLookupTab.java index fd348f2b56d..ab1b4042f7b 100644 --- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CSourceLookupTab.java +++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CSourceLookupTab.java @@ -56,17 +56,18 @@ public class CSourceLookupTab extends CLaunchConfigurationTab public void initializeFrom( ILaunchConfiguration configuration ) { IProject project = getProject( configuration ); + IProject oldProject = fBlock.getProject(); fBlock.setProject( getProject( configuration ) ); if ( project != null ) { try { String id = configuration.getAttribute( ILaunchConfiguration.ATTR_SOURCE_LOCATOR_ID, "" ); - if ( isEmpty( id )|| DefaultSourceLocator.ID_DEFAULT_SOURCE_LOCATOR.equals( id ) ) + if ( isEmpty( id ) || DefaultSourceLocator.ID_DEFAULT_SOURCE_LOCATOR.equals( id ) ) { DefaultSourceLocator locator = new DefaultSourceLocator(); String memento = configuration.getAttribute( ILaunchConfiguration.ATTR_SOURCE_LOCATOR_MEMENTO, "" ); - if ( !isEmpty( memento ) ) + if ( project.equals( oldProject ) && !isEmpty( memento ) ) { locator.initializeFromMemento( memento ); } @@ -100,7 +101,11 @@ public class CSourceLookupTab extends CLaunchConfigurationTab locator.initializeDefaults( configuration ); ICSourceLocator clocator = (ICSourceLocator)locator.getAdapter( ICSourceLocator.class ); if ( clocator != null ) + { + if ( !project.equals( fBlock.getProject() ) ) + fBlock.initialize( clocator ); clocator.setSourceLocations( fBlock.getSourceLocations() ); + } configuration.setAttribute( ILaunchConfiguration.ATTR_SOURCE_LOCATOR_MEMENTO, locator.getMemento() ); } catch( CoreException e ) |