1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-01 06:05:24 +02:00

Check if the breakpoint belongs to the project before setting.

This commit is contained in:
Mikhail Khodjaiants 2002-09-20 17:48:56 +00:00
parent 74a38d9081
commit 4eb6c43261

View file

@ -73,6 +73,7 @@ import org.eclipse.debug.core.model.IExpression;
import org.eclipse.debug.core.model.IMemoryBlock; import org.eclipse.debug.core.model.IMemoryBlock;
import org.eclipse.debug.core.model.IProcess; import org.eclipse.debug.core.model.IProcess;
import org.eclipse.debug.core.model.IRegisterGroup; import org.eclipse.debug.core.model.IRegisterGroup;
import org.eclipse.debug.core.model.ISourceLocator;
import org.eclipse.debug.core.model.IThread; import org.eclipse.debug.core.model.IThread;
/** /**
@ -351,7 +352,16 @@ public class CDebugTarget extends CDebugElement
{ {
if ( !getConfiguration().supportsBreakpoints() ) if ( !getConfiguration().supportsBreakpoints() )
return false; return false;
return true; if ( breakpoint instanceof ICBreakpoint )
{
ISourceLocator sl = getSourceLocator();
if ( sl != null && sl instanceof ICSourceLocator )
{
return ((ICSourceLocator)sl).contains( breakpoint.getMarker().getResource() );
}
return true;
}
return false;
} }
/* (non-Javadoc) /* (non-Javadoc)