Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/debug
diff options
context:
space:
mode:
authorMikhail Khodjaiants2003-11-26 17:28:48 -0500
committerMikhail Khodjaiants2003-11-26 17:28:48 -0500
commit8b1194ebfb2fce4c3ed05d449cd1b590392f4d62 (patch)
treee2f804ad5a6435da49415b4ca4704d49b83220ba /debug
parent5a5be4c8a073a1cd52b4aabd9bc7fb2487fd7803 (diff)
downloadorg.eclipse.cdt-8b1194ebfb2fce4c3ed05d449cd1b590392f4d62.tar.gz
org.eclipse.cdt-8b1194ebfb2fce4c3ed05d449cd1b590392f4d62.tar.xz
org.eclipse.cdt-8b1194ebfb2fce4c3ed05d449cd1b590392f4d62.zip
Fix for PR 47595: Referenced projects are not checked in the list of generic source locations.
Diffstat (limited to 'debug')
-rw-r--r--debug/org.eclipse.cdt.debug.ui/ChangeLog4
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/sourcelookup/SourceLookupBlock.java49
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 ) );
}

Back to the top