}
- protected PHPLineBreakpoint(final IResource resource, final int lineNumber, final int charStart, final int charEnd, final int hitCount, final boolean add, final Map attributes, final String markerType) throws DebugException {
+ protected PHPLineBreakpoint (final IResource resource,
+ final int lineNumber,
+ final int charStart,
+ final int charEnd,
+ final int hitCount,
+ final boolean add,
+ final Map attributes,
+ final String markerType) throws DebugException {
IWorkspaceRunnable wr= new IWorkspaceRunnable() {
public void run(IProgressMonitor monitor) throws CoreException {
setMarker(resource.createMarker(markerType));
// add attributes
- addLineBreakpointAttributes(attributes, getModelIdentifier(), true, lineNumber, charStart, charEnd);
+ addLineBreakpointAttributes(attributes, getModelIdentifier(), true, lineNumber, charStart, charEnd, hitCount);
// set attributes
ensureMarker().setAttributes(attributes);
}
- public void addLineBreakpointAttributes(Map attributes, String modelIdentifier, boolean enabled, int lineNumber, int charStart, int charEnd) {
+ public void addLineBreakpointAttributes(Map attributes, String modelIdentifier, boolean enabled, int lineNumber, int charStart, int charEnd, int hitCount) {
attributes.put(IBreakpoint.ID, modelIdentifier);
attributes.put(IBreakpoint.ENABLED, new Boolean(enabled));
attributes.put(IMarker.LINE_NUMBER, new Integer(lineNumber));
attributes.put(IMarker.CHAR_END, new Integer(charEnd));
}
attributes.put(TYPE_NAME, "typeName");
+ attributes.put(PHPBreakpoint.HIT_COUNT, new Integer(hitCount));
+ attributes.put(PHPBreakpoint.CONDITION, new String(""));
+ attributes.put(PHPBreakpoint.CONDITION_ENABLED, new Boolean(false));
+ attributes.put(PHPBreakpoint.CHANGE_ID, new Integer(0));
}
/**
*/
public static String getMarkerType() {
return PHP_LINE_BREAKPOINT;
- }
+ }
+
+ public int getHitCount() throws CoreException {
+ return ensureMarker().getAttribute(PHPBreakpoint.HIT_COUNT, 1);
+ }
+
+ public int getChangeID() throws CoreException {
+ return ensureMarker().getAttribute(CHANGE_ID, 1);
+ }
+
+ public void setChangeID(int changeID) throws CoreException {
+ ensureMarker().setAttribute(CHANGE_ID, changeID);
+ }
+
+ public String getCondition () throws CoreException {
+ return ensureMarker ().getAttribute (CONDITION, "");
+ }
+
+ public void setCondition (String condition) throws CoreException {
+ ensureMarker ().setAttribute (CONDITION, condition);
+ }
+
+ public void setConditionEnabled (boolean enabled) throws CoreException {
+ ensureMarker ().setAttribute (CONDITION_ENABLED, enabled);
+ }
+
+ public boolean isConditionEnabled () throws CoreException {
+ return ensureMarker ().getAttribute (CONDITION_ENABLED, false);
+ }
}
\ No newline at end of file