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:
parent
6131f091aa
commit
e2724066ac
2 changed files with 33 additions and 20 deletions
|
@ -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
|
||||||
|
|
|
@ -126,31 +126,25 @@ 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, "" );
|
||||||
|
if ( isEmpty( id ) ||
|
||||||
|
CDebugUIPlugin.getDefaultSourceLocatorID().equals( id ) ||
|
||||||
|
CDebugUIPlugin.getDefaultSourceLocatorOldID().equals( id ) )
|
||||||
{
|
{
|
||||||
String id = configuration.getAttribute( ILaunchConfiguration.ATTR_SOURCE_LOCATOR_ID, "" );
|
String memento = configuration.getAttribute( ILaunchConfiguration.ATTR_SOURCE_LOCATOR_MEMENTO, "" );
|
||||||
if ( isEmpty( id ) ||
|
if ( !isEmpty( memento ) )
|
||||||
CDebugUIPlugin.getDefaultSourceLocatorID().equals( id ) ||
|
initializeFromMemento( memento );
|
||||||
CDebugUIPlugin.getDefaultSourceLocatorOldID().equals( id ) )
|
else
|
||||||
{
|
initializeDefaults();
|
||||||
String memento = configuration.getAttribute( ILaunchConfiguration.ATTR_SOURCE_LOCATOR_MEMENTO, "" );
|
|
||||||
if ( !isEmpty( memento ) )
|
|
||||||
initializeFromMemento( memento );
|
|
||||||
else
|
|
||||||
initializeDefaults();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch( CoreException e )
|
|
||||||
{
|
|
||||||
initializeDefaults();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
catch( CoreException e )
|
||||||
|
{
|
||||||
initializeDefaults();
|
initializeDefaults();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -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 ) );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue