1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Fix for PR 47595: Referenced projects are not checked in the list of generic source locations.

This commit is contained in:
Mikhail Khodjaiants 2003-11-26 23:10:16 +00:00
parent 6131f091aa
commit e2724066ac
2 changed files with 33 additions and 20 deletions

View file

@ -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-26 Mikhail Khodjaiants 2003-11-26 Mikhail Khodjaiants
Cleanup. Cleanup.
* CDTDebugModelPresentation.java * CDTDebugModelPresentation.java

View file

@ -126,10 +126,7 @@ public class SourceLookupBlock implements Observer
IProject project = getProjectFromLaunchConfiguration( configuration ); IProject project = getProjectFromLaunchConfiguration( configuration );
if ( project != null ) if ( project != null )
{ {
IProject oldProject = getProject();
setProject( project ); setProject( project );
if ( project.equals( oldProject ) )
{
try try
{ {
String id = configuration.getAttribute( ILaunchConfiguration.ATTR_SOURCE_LOCATOR_ID, "" ); String id = configuration.getAttribute( ILaunchConfiguration.ATTR_SOURCE_LOCATOR_ID, "" );
@ -149,9 +146,6 @@ public class SourceLookupBlock implements Observer
initializeDefaults(); initializeDefaults();
} }
} }
else
initializeDefaults();
}
else else
{ {
initializeGeneratedLocations( null, new ICSourceLocation[0] ); initializeGeneratedLocations( null, new ICSourceLocation[0] );
@ -174,7 +168,22 @@ public class SourceLookupBlock implements Observer
private void initializeDefaults() 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() ); resetAdditionalLocations( CDebugCorePlugin.getDefault().getCommonSourceLocations() );
fSearchForDuplicateFiles.setSelection( CDebugCorePlugin.getDefault().getPluginPreferences().getBoolean( ICDebugConstants.PREF_SEARCH_DUPLICATE_FILES ) ); fSearchForDuplicateFiles.setSelection( CDebugCorePlugin.getDefault().getPluginPreferences().getBoolean( ICDebugConstants.PREF_SEARCH_DUPLICATE_FILES ) );
} }