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

Fix in the 'supportsBreakpoints' method of CDebugTarget.

This commit is contained in:
Mikhail Khodjaiants 2002-12-29 23:41:52 +00:00
parent ef4c0537c6
commit ece05b22c6
2 changed files with 9 additions and 2 deletions

View file

@ -1,3 +1,7 @@
2002-12-29 Mikhail Khodjaiants
Fix in the 'supportsBreakpoints' method of CDebugTarget
* CDebugTarget.java: No need to check if the breakpoint file belongs to the source locator.
2002-12-18 Mikhail Khodjaiants 2002-12-18 Mikhail Khodjaiants
Implementing the 'Source Lookup' property page. Implementing the 'Source Lookup' property page.
* CDirectorySourceLocation.java * CDirectorySourceLocation.java

View file

@ -385,18 +385,21 @@ public class CDebugTarget extends CDebugElement
*/ */
public boolean supportsBreakpoint( IBreakpoint breakpoint ) public boolean supportsBreakpoint( IBreakpoint breakpoint )
{ {
/*
if ( !getConfiguration().supportsBreakpoints() ) if ( !getConfiguration().supportsBreakpoints() )
return false; return false;
if ( breakpoint instanceof ICBreakpoint ) if ( breakpoint instanceof ICBreakpoint )
{ {
ISourceLocator sl = getSourceLocator(); ISourceLocator sl = getSourceLocator();
if ( sl != null && sl instanceof ICSourceLocator ) if ( sl != null && sl instanceof IAdaptable && ((IAdaptable)sl).getAdapter( ICSourceLocator.class ) != null )
{ {
return ((ICSourceLocator)sl).contains( breakpoint.getMarker().getResource() ); return ((ICSourceLocator)((IAdaptable)sl).getAdapter( ICSourceLocator.class )).contains( breakpoint.getMarker().getResource() );
} }
return true; return true;
} }
return false; return false;
*/
return getConfiguration().supportsBreakpoints();
} }
/* (non-Javadoc) /* (non-Javadoc)