X-Git-Url: http://secure.phpeclipse.com diff --git a/net.sourceforge.phpeclipse.xdebug.core/src/net/sourceforge/phpeclipse/xdebug/php/model/XDebugLineBreakpoint.java b/net.sourceforge.phpeclipse.xdebug.core/src/net/sourceforge/phpeclipse/xdebug/php/model/XDebugLineBreakpoint.java index 2ee792b..c50b626 100644 --- a/net.sourceforge.phpeclipse.xdebug.core/src/net/sourceforge/phpeclipse/xdebug/php/model/XDebugLineBreakpoint.java +++ b/net.sourceforge.phpeclipse.xdebug.core/src/net/sourceforge/phpeclipse/xdebug/php/model/XDebugLineBreakpoint.java @@ -42,7 +42,7 @@ public class XDebugLineBreakpoint extends XDebugBreakpoint implements ILineBrea * this breakpoint is located in. * (value "net.sourceforge.phpeclipse.debug.typeName"). This attribute is a String. */ - protected static final String TYPE_NAME = "net.sourceforge.phpeclipse.debug.typeName"; //$NON-NLS-1$ + protected static final String TYPE_NAME = "net.sourceforge.phpeclipse.debug.typeName"; //$NON-NLS-1$ // public PHPLineBreakpoint() { // } @@ -50,22 +50,22 @@ public class XDebugLineBreakpoint extends XDebugBreakpoint implements ILineBrea // public PHPLineBreakpoint(IResource resource, int lineNumber, int charStart, int charEnd, int hitCount, boolean add, Map attributes) throws DebugException { // this(resource, lineNumber, charStart, charEnd, hitCount, add, attributes, PHP_LINE_BREAKPOINT); // } -// +// // public PHPLineBreakpoint(IResource resource, int lineNumber, int hitCount, boolean add, Map attributes) throws DebugException { // this(resource, lineNumber, -1, -1, hitCount, add, attributes, PHP_LINE_BREAKPOINT); // } - + public static final String BREAKPOINT_ID ="XDebugLineBreakpointID"; - + public XDebugLineBreakpoint() { } - + /** * Constructs a line breakpoint on the given resource at the given * line number. The line number is 1-based (i.e. the first line of a * file is line number 1). - * + * * @param resource file on which to set the breakpoint * @param lineNumber 1-based line number of the breakpoint * @throws CoreException if unable to create the breakpoint @@ -73,7 +73,7 @@ public class XDebugLineBreakpoint extends XDebugBreakpoint implements ILineBrea public XDebugLineBreakpoint(final IResource resource, final int lineNumber) throws CoreException { IWorkspaceRunnable wr = new IWorkspaceRunnable() { public void run(IProgressMonitor monitor) throws CoreException { - + // create the marker setMarker(resource.createMarker(XDEBUG_LINE_BREAKPOINT)); @@ -83,15 +83,15 @@ public class XDebugLineBreakpoint extends XDebugBreakpoint implements ILineBrea // set attributes ensureMarker().setAttributes(attributes); - + // add to breakpoint manager if requested - register(true); + register(true); } }; run(getMarkerRule(resource), wr); } - + protected void register(boolean register) throws CoreException { if (register) { DebugPlugin.getDefault().getBreakpointManager().addBreakpoint(this); @@ -99,7 +99,7 @@ public class XDebugLineBreakpoint extends XDebugBreakpoint implements ILineBrea setRegistered(false); } } - + public void addLineBreakpointAttributes(Map attributes, String modelIdentifier, boolean enabled, int lineNumber, int charStart, int charEnd) { attributes.put(IBreakpoint.ID, modelIdentifier); attributes.put(IBreakpoint.ENABLED, new Boolean(enabled)); @@ -111,29 +111,33 @@ public class XDebugLineBreakpoint extends XDebugBreakpoint implements ILineBrea } attributes.put(TYPE_NAME, "typeName"); attributes.put(BREAKPOINT_ID,new Integer(-1)); - } + } + - /* (non-Javadoc) * @see org.eclipse.debug.core.model.IBreakpoint#getModelIdentifier() */ public String getModelIdentifier() { return IXDebugConstants.ID_PHP_DEBUG_MODEL; } - + public void setID(int id) throws CoreException { ensureMarker().setAttribute(BREAKPOINT_ID,id); } - + public int getID() throws CoreException { return ensureMarker().getAttribute(BREAKPOINT_ID,-1); } - + public int getHitCount() throws CoreException { return ensureMarker().getAttribute(HIT_COUNT,-1); //return fHitCount; } + public int getChangeID() throws CoreException { + return ensureMarker().getAttribute(CHANGE_ID, 1); + } + public void setHitCount(int newHitCount) throws CoreException { ensureMarker().setAttribute(HIT_COUNT,newHitCount); //fHitCount = newHitCount; @@ -170,4 +174,4 @@ public class XDebugLineBreakpoint extends XDebugBreakpoint implements ILineBrea } return -1; } -} \ No newline at end of file +}