diff options
-rw-r--r-- | debug/org.eclipse.cdt.debug.ui/ChangeLog | 4 | ||||
-rw-r--r-- | debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/sourcelookup/SourceLookupBlock.java | 49 |
2 files changed, 33 insertions, 20 deletions
diff --git a/debug/org.eclipse.cdt.debug.ui/ChangeLog b/debug/org.eclipse.cdt.debug.ui/ChangeLog index 74d7e85423a..1db0961bfca 100644 --- a/debug/org.eclipse.cdt.debug.ui/ChangeLog +++ b/debug/org.eclipse.cdt.debug.ui/ChangeLog @@ -1,3 +1,7 @@ +2003-11-26 Mikhail Khodjaiants
+ Fix for PR 47595: Referenced projects are not checked in the list of generic source locations.
+ * SourceLookupBlock.java
+
2003-11-21 Mikhail Khodjaiants
Use "symbol not available" for empty function names when generating a stack frame label.
* CDTDebugModelPresentation.java
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/sourcelookup/SourceLookupBlock.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/sourcelookup/SourceLookupBlock.java index 444555d1451..d6a87ff9f20 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/sourcelookup/SourceLookupBlock.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/sourcelookup/SourceLookupBlock.java @@ -129,31 +129,25 @@ public class SourceLookupBlock implements Observer IProject project = getProjectFromLaunchConfiguration( configuration ); if ( project != null ) { - IProject oldProject = getProject(); setProject( project ); - if ( project.equals( oldProject ) ) + try { - try + String id = configuration.getAttribute( ILaunchConfiguration.ATTR_SOURCE_LOCATOR_ID, "" ); + if ( isEmpty( id ) || + CDebugUIPlugin.getDefaultSourceLocatorID().equals( id ) || + CDebugUIPlugin.getDefaultSourceLocatorOldID().equals( id ) ) { - String id = configuration.getAttribute( ILaunchConfiguration.ATTR_SOURCE_LOCATOR_ID, "" ); - if ( isEmpty( id ) || - CDebugUIPlugin.getDefaultSourceLocatorID().equals( id ) || - CDebugUIPlugin.getDefaultSourceLocatorOldID().equals( id ) ) - { - String memento = configuration.getAttribute( ILaunchConfiguration.ATTR_SOURCE_LOCATOR_MEMENTO, "" ); - if ( !isEmpty( memento ) ) - initializeFromMemento( memento ); - else - initializeDefaults(); - } - } - catch( CoreException e ) - { - initializeDefaults(); + String memento = configuration.getAttribute( ILaunchConfiguration.ATTR_SOURCE_LOCATOR_MEMENTO, "" ); + if ( !isEmpty( memento ) ) + initializeFromMemento( memento ); + else + initializeDefaults(); } } - else + catch( CoreException e ) + { initializeDefaults(); + } } else { @@ -177,7 +171,22 @@ public class SourceLookupBlock implements Observer private void initializeDefaults() { - initializeGeneratedLocations( getProject(), new ICSourceLocation[] { SourceLookupFactory.createProjectSourceLocation( getProject() ) } ); + fGeneratedSourceListField.removeAllElements(); + IProject project = getProject(); + if ( project != null && project.exists() && project.isOpen() ) + { + ICSourceLocation location = SourceLookupFactory.createProjectSourceLocation( project, true ); + fGeneratedSourceListField.addElement( location ); + fGeneratedSourceListField.setChecked( location, true ); + List list = CDebugUtils.getReferencedProjects( project ); + Iterator it = list.iterator(); + while( it.hasNext() ) + { + location = SourceLookupFactory.createProjectSourceLocation( (IProject)it.next(), true ); + fGeneratedSourceListField.addElement( location ); + fGeneratedSourceListField.setChecked( location, true ); + } + } resetAdditionalLocations( CDebugCorePlugin.getDefault().getCommonSourceLocations() ); fSearchForDuplicateFiles.setSelection( CDebugCorePlugin.getDefault().getPluginPreferences().getBoolean( ICDebugConstants.PREF_SEARCH_DUPLICATE_FILES ) ); } |