From 4eb6c432611ec74b3bcf6caf037c6208c50ab57a Mon Sep 17 00:00:00 2001 From: Mikhail Khodjaiants Date: Fri, 20 Sep 2002 17:48:56 +0000 Subject: [PATCH] Check if the breakpoint belongs to the project before setting. --- .../cdt/debug/internal/core/model/CDebugTarget.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java index dcd362c49a2..f2b705eec2a 100644 --- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java @@ -73,6 +73,7 @@ import org.eclipse.debug.core.model.IExpression; import org.eclipse.debug.core.model.IMemoryBlock; import org.eclipse.debug.core.model.IProcess; import org.eclipse.debug.core.model.IRegisterGroup; +import org.eclipse.debug.core.model.ISourceLocator; import org.eclipse.debug.core.model.IThread; /** @@ -351,7 +352,16 @@ public class CDebugTarget extends CDebugElement { if ( !getConfiguration().supportsBreakpoints() ) 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)