mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-24 01:15:29 +02:00
see change log
This commit is contained in:
parent
4b8ed789cc
commit
4da2df9363
5 changed files with 21 additions and 7 deletions
|
@ -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.
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 )
|
||||
|
|
Loading…
Add table
Reference in a new issue