1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-16 12:45:41 +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,8 +352,17 @@ public class CDebugTarget extends CDebugElement
{ {
if ( !getConfiguration().supportsBreakpoints() ) if ( !getConfiguration().supportsBreakpoints() )
return false; return false;
if ( breakpoint instanceof ICBreakpoint )
{
ISourceLocator sl = getSourceLocator();
if ( sl != null && sl instanceof ICSourceLocator )
{
return ((ICSourceLocator)sl).contains( breakpoint.getMarker().getResource() );
}
return true; return true;
} }
return false;
}
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.debug.core.ILaunchListener#launchRemoved(ILaunch) * @see org.eclipse.debug.core.ILaunchListener#launchRemoved(ILaunch)