mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-13 19:25:38 +02:00
Fixes for CSourceLoator:
Use the 'getReferencedProjects' method of 'CSourceLocator' to obtain the list of referenced projects. Use the correct tag for additional source locations.
This commit is contained in:
parent
329664223a
commit
9a70e8f755
2 changed files with 22 additions and 23 deletions
|
@ -1,3 +1,8 @@
|
|||
2003-07-22 Mikhail Khodjaiants
|
||||
Use the 'getReferencedProjects' method of 'CSourceLocator' to obtain the list of referenced projects.
|
||||
Use the correct tag for additional source locations.
|
||||
* CSourceLocator.java
|
||||
|
||||
2003-07-17 Mikhail Khodjaiants
|
||||
Fix for PR 39936: GDB hits modified conditional breakpoints when condition not satisfied.
|
||||
This is a work around for GDB PR MI/1289.
|
||||
|
|
|
@ -562,31 +562,25 @@ public class CSourceLocator implements ICSourceLocator, IPersistableSourceLocato
|
|||
IProject project = getProject();
|
||||
if ( project != null && project.exists() && project.isOpen() )
|
||||
{
|
||||
try
|
||||
List list = getReferencedProjects( project );
|
||||
HashSet names = new HashSet( list.size() + 1 );
|
||||
names.add( project.getName() );
|
||||
Iterator it = list.iterator();
|
||||
while( it.hasNext() )
|
||||
{
|
||||
IProject[] refs = project.getReferencedProjects();
|
||||
HashSet names = new HashSet( refs.length + 1 );
|
||||
names.add( project.getName() );
|
||||
for ( int i = 0; i < refs.length; ++i )
|
||||
{
|
||||
names.add( refs[i].getName() );
|
||||
}
|
||||
for ( int i = 0; i < locations.length; ++i )
|
||||
if ( locations[i] instanceof IProjectSourceLocation &&
|
||||
((IProjectSourceLocation)locations[i]).isGeneric() )
|
||||
names.remove( ((IProjectSourceLocation)locations[i]).getProject().getName() );
|
||||
|
||||
Iterator it = names.iterator();
|
||||
while ( it.hasNext() )
|
||||
{
|
||||
Element child = doc.createElement( DISABLED_GENERIC_PROJECT_NAME );
|
||||
child.setAttribute( ATTR_PROJECT_NAME, (String)it.next() );
|
||||
node.appendChild( child );
|
||||
}
|
||||
names.add( ((IProject)it.next()).getName() );
|
||||
}
|
||||
catch( CoreException e )
|
||||
for ( int i = 0; i < locations.length; ++i )
|
||||
if ( locations[i] instanceof IProjectSourceLocation &&
|
||||
((IProjectSourceLocation)locations[i]).isGeneric() )
|
||||
names.remove( ((IProjectSourceLocation)locations[i]).getProject().getName() );
|
||||
|
||||
it = names.iterator();
|
||||
while ( it.hasNext() )
|
||||
{
|
||||
CDebugCorePlugin.log( e );
|
||||
Element child = doc.createElement( DISABLED_GENERIC_PROJECT_NAME );
|
||||
child.setAttribute( ATTR_PROJECT_NAME, (String)it.next() );
|
||||
node.appendChild( child );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -598,7 +592,7 @@ public class CSourceLocator implements ICSourceLocator, IPersistableSourceLocato
|
|||
if ( locations[i] instanceof IProjectSourceLocation &&
|
||||
((IProjectSourceLocation)locations[i]).isGeneric() )
|
||||
continue;
|
||||
Element child = doc.createElement( SOURCE_LOCATION_NAME );
|
||||
Element child = doc.createElement( ADDITIONAL_SOURCE_LOCATION_NAME );
|
||||
child.setAttribute( ATTR_CLASS, locations[i].getClass().getName() );
|
||||
try
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue