# HG changeset patch # User timkelly # Date 1249667220 18000 # Node ID a612e067382b97f96c6d66fb0441f39ff3382bed # Parent cc2106dba4d1003d66a7fed5618f52818c98ff9e fix bad merge on CSourceLookupParticipant.java diff -r cc2106dba4d1 -r a612e067382b cdt/cdt_6_0_x/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CSourceLookupParticipant.java --- a/cdt/cdt_6_0_x/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CSourceLookupParticipant.java Fri Aug 07 12:24:40 2009 -0500 +++ b/cdt/cdt_6_0_x/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CSourceLookupParticipant.java Fri Aug 07 12:47:00 2009 -0500 @@ -82,14 +82,13 @@ /* (non-Javadoc) * @see org.eclipse.debug.core.sourcelookup.AbstractSourceLookupParticipant#findSourceElements(java.lang.Object) */ - @Override + public Object[] findSourceElements( Object object ) throws CoreException { + // Check the cache Object[] results = fCachedResults.get(object); if (results != null) return results; - public Object[] findSourceElements( Object object ) throws CoreException { - // Workaround for BUG247977 // FIXME: Remove having switched to 3.5 platform initContainersSourceDirector(); @@ -104,9 +103,9 @@ if ( name == null || name.length() == 0 ) { if (object instanceof IDebugElement) - results = new Object[] { new CSourceNotFoundElement( (IDebugElement) object ) }; + results = new Object[] { new CSourceNotFoundElement( (IDebugElement) object ) }; else - results = new Object[] { gfNoSource }; + results = new Object[] { gfNoSource }; fCachedResults.put(object, results); return results; } @@ -124,10 +123,10 @@ name = (String)object; } - fCachedResults.put(object, foundElements); // Actually query the source containers for the requested resource Object[] foundElements = super.findSourceElements(object); - + fCachedResults.put(object, foundElements); + // If none found, invoke the absolute path container directly if (foundElements.length == 0 && (object instanceof IDebugElement)) { // debugger could have resolved it itself and "name" is an absolute path @@ -156,6 +155,7 @@ // FIXME: remove when BUG247977 is fixed endContainersSourceDirector(); + fCachedResults.put(object, foundElements); return foundElements; }