X-Git-Url: http://git.phpeclipse.com diff --git a/net.sourceforge.phpeclipse.debug.core/src/net/sourceforge/phpdt/internal/debug/core/breakpoints/PHPBreakpoint.java b/net.sourceforge.phpeclipse.debug.core/src/net/sourceforge/phpdt/internal/debug/core/breakpoints/PHPBreakpoint.java index 8d4b084..a434a36 100644 --- a/net.sourceforge.phpeclipse.debug.core/src/net/sourceforge/phpdt/internal/debug/core/breakpoints/PHPBreakpoint.java +++ b/net.sourceforge.phpeclipse.debug.core/src/net/sourceforge/phpdt/internal/debug/core/breakpoints/PHPBreakpoint.java @@ -1,14 +1,14 @@ /********************************************************************** -Copyright (c) 2000, 2002 IBM Corp. and others. -All rights reserved. This program and the accompanying materials -are made available under the terms of the Common Public License v1.0 -which accompanies this distribution, and is available at -http://www.eclipse.org/legal/cpl-v10.html - -Contributors: - IBM Corporation - Initial implementation - Vicente Fernando - www.alfersoft.com.ar -**********************************************************************/ + Copyright (c) 2000, 2002 IBM Corp. and others. + All rights reserved. This program and the accompanying materials + are made available under the terms of the Common Public License v1.0 + which accompanies this distribution, and is available at + http://www.eclipse.org/legal/cpl-v10.html + + Contributors: + IBM Corporation - Initial implementation + Vicente Fernando - www.alfersoft.com.ar + **********************************************************************/ package net.sourceforge.phpdt.internal.debug.core.breakpoints; import net.sourceforge.phpdt.internal.debug.core.PHPDebugCorePlugin; @@ -23,50 +23,54 @@ import org.eclipse.debug.core.model.Breakpoint; import org.eclipse.debug.core.model.IBreakpoint; /** - * A breakpoint is capable of suspending the execution of a - * program at a specific location when a program is running - * in debug mode. Each breakpoint has an associated marker which - * stores and persists all attributes associated with a breakpoint. + * A breakpoint is capable of suspending the execution of a program at a + * specific location when a program is running in debug mode. Each breakpoint + * has an associated marker which stores and persists all attributes associated + * with a breakpoint. *
* A breakpoint is defined in two parts: *
"org.eclipse.debug.core.breakpoints"
"org.eclipse.debug.core.breakpoints"
- * For example, following is a definition of corresponding breakpoint
- * and breakpoint marker definitions. Note that the markerType
- * attribute defined by the breakpoint extension corresponds to the
- * type of the marker definition.
+ * For example, following is a definition of corresponding breakpoint and
+ * breakpoint marker definitions. Note that the markerType
+ * attribute defined by the breakpoint extension corresponds to the type of the
+ * marker definition.
+ *
*
- * <extension point="org.eclipse.debug.core.breakpoints"> - * <breakpoint - * id="com.example.Breakpoint" - * class="com.example.Breakpoint" - * markerType="com.example.BreakpointMarker"> - * </breakpoint> - * </extension> - * <extension point="org.eclipse.core.resources.markers"> - * <marker - * id="com.example.BreakpointMarker" - * super type="org.eclipse.debug.core.breakpointMarker" - * attribute name ="exampleAttribute"> - * </marker> - * </extension> + * <extension point="org.eclipse.debug.core.breakpoints"> + * <breakpoint + * id="com.example.Breakpoint" + * class="com.example.Breakpoint" + * markerType="com.example.BreakpointMarker"> + * </breakpoint> + * </extension> + * <extension point="org.eclipse.core.resources.markers"> + * <marker + * id="com.example.BreakpointMarker" + * super type="org.eclipse.debug.core.breakpointMarker" + * attribute name ="exampleAttribute"> + * </marker> + * </extension> *+ * *
- * The breakpoint manager instantiates persisted breakpoints by
- * traversing all markers that are a subtype of
- * "org.eclipse.debug.core.breakpointMarker"
, and
- * instantiating the class defined by the class
attribute
- * on the associated breakpoint extension. The method setMarker
- * is then called to associate a marker with the breakpoint.
+ * The breakpoint manager instantiates persisted breakpoints by traversing all
+ * markers that are a subtype of
+ * "org.eclipse.debug.core.breakpointMarker"
, and instantiating
+ * the class defined by the class
attribute on the associated
+ * breakpoint extension. The method setMarker
is then called to
+ * associate a marker with the breakpoint.
*
- * Breakpoints may or may not be registered with the breakpoint manager, and
- * are persisted and restored as such. Since marker definitions only allow
- * all or none of a specific marker type to be persisted, breakpoints define
- * a PERSISTED
attribute for selective persistence of breakpoints
+ * Breakpoints may or may not be registered with the breakpoint manager, and are
+ * persisted and restored as such. Since marker definitions only allow all or
+ * none of a specific marker type to be persisted, breakpoints define a
+ * PERSISTED
attribute for selective persistence of breakpoints
* of the same type.
*
"net.sourceforge.phpeclipse.debug.hitCount"
). This attribute is stored as an
- * int
.
+ * Breakpoint attribute storing a breakpoint's hit count value (value
+ * "net.sourceforge.phpeclipse.debug.hitCount"
). This
+ * attribute is stored as an int
.
*
- * For DBG the hit count is really a skip count.
- * Explanation: A hit count of e.g. 4 would break on the fourth occurence of the breakpoint.
- * A skip count means skip the first four occurences of the breakpoint, and break on the fifth occurence.
+ * For DBG the hit count is really a skip count. Explanation: A hit count of
+ * e.g. 4 would break on the fourth occurence of the breakpoint. A skip
+ * count means skip the first four occurences of the breakpoint, and break
+ * on the fifth occurence.
*/
protected static final String HIT_COUNT = "net.sourceforge.phpeclipse.debug.hitCount"; //$NON-NLS-1$
/**
- * Breakpoint attribute storing a breakpoint's changeID.
- * This is used for checking whether the breakpoint properties menu was finished with
- * a OK-button. Which means a possible change of breakpoint condition or skip count.
- * This is necessary because in method breakpointChanged in class PHPDebugTarget we need to know,
- * whether the breakpoint has changed or not (breakpointChanged is called also when
- * a PHP source file is modified and saved).
+ * Breakpoint attribute storing a breakpoint's changeID. This is used for
+ * checking whether the breakpoint properties menu was finished with a
+ * OK-button. Which means a possible change of breakpoint condition or skip
+ * count. This is necessary because in method breakpointChanged in class
+ * PHPDebugTarget we need to know, whether the breakpoint has changed or not
+ * (breakpointChanged is called also when a PHP source file is modified and
+ * saved).
*/
protected static final String CHANGE_ID = "net.sourceforge.phpeclipse.debug.changeID"; //$NON-NLS-1$
/**
- * Breakpoint attribute storing a breakpoint's condition
- * (value "net.sourceforge.phpeclipse.debug.condition"
). This attribute is stored as an
- * string
.
+ * Breakpoint attribute storing a breakpoint's condition (value
+ * "net.sourceforge.phpeclipse.debug.condition"
). This
+ * attribute is stored as an string
.
*/
protected static final String CONDITION = "net.sourceforge.phpeclipse.debug.condition"; //$NON-NLS-1$
/**
- * Breakpoint attribute storing whether a breakpoint's condition is enabled or not
- * (value "net.sourceforge.phpeclipse.debug.conditionEnabled"
). This attribute is stored as an
- * boolean
.
+ * Breakpoint attribute storing whether a breakpoint's condition is enabled
+ * or not (value
+ * "net.sourceforge.phpeclipse.debug.conditionEnabled"
).
+ * This attribute is stored as an boolean
.
*/
protected static final String CONDITION_ENABLED = "net.sourceforge.phpeclipse.debug.conditionEnabled"; //$NON-NLS-1$
/**
- * Breakpoint attribute storing the fully qualified name of the type
- * this breakpoint is located in.
- * (value "net.sourceforge.phpeclipse.debug.typeName"
). This attribute is a String
.
+ * Breakpoint attribute storing the fully qualified name of the type 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$
/**
- * Root breakpoint marker type
- * (value "org.eclipse.debug.core.breakpoint"
).
+ * Root breakpoint marker type (value
+ * "org.eclipse.debug.core.breakpoint"
).
*/
- public static final String BREAKPOINT_MARKER = DebugPlugin.getUniqueIdentifier() + ".breakpointMarker"; //$NON-NLS-1$
-
+ public static final String BREAKPOINT_MARKER = DebugPlugin
+ .getUniqueIdentifier()
+ + ".breakpointMarker"; //$NON-NLS-1$
+
/**
- * Line breakpoint marker type
- * (value "org.eclipse.debug.core.lineBreakpoint"
).
+ * Line breakpoint marker type (value
+ * "org.eclipse.debug.core.lineBreakpoint"
).
*/
- public static final String LINE_BREAKPOINT_MARKER = DebugPlugin.getUniqueIdentifier() + ".lineBreakpointMarker"; //$NON-NLS-1$
-
+ public static final String LINE_BREAKPOINT_MARKER = DebugPlugin
+ .getUniqueIdentifier()
+ + ".lineBreakpointMarker"; //$NON-NLS-1$
+
/**
- * Enabled breakpoint marker attribute (value "org.eclipse.debug.core.enabled"
).
- * The attribute is a boolean
corresponding to the
- * enabled state of a breakpoint.
- *
+ * Enabled breakpoint marker attribute (value
+ * "org.eclipse.debug.core.enabled"
). The attribute is a
+ * boolean
corresponding to the enabled state of a
+ * breakpoint.
+ *
* @see org.eclipse.core.resources.IMarker#getAttribute(String, boolean)
*/
- public static final String ENABLED= "org.eclipse.debug.core.enabled"; //$NON-NLS-1$
-
+ public static final String ENABLED = "org.eclipse.debug.core.enabled"; //$NON-NLS-1$
+
/**
- * Debug model identifier breakpoint marker attribute (value "org.eclipse.debug.core.id"
).
- * The attribute is a String
corresponding to the
- * identifier of the debug model a breakpoint is associated with.
+ * Debug model identifier breakpoint marker attribute (value
+ * "org.eclipse.debug.core.id"
). The attribute is a
+ * String
corresponding to the identifier of the debug model
+ * a breakpoint is associated with.
*/
- public static final String ID= "org.eclipse.debug.core.id"; //$NON-NLS-1$
-
+ public static final String ID = "org.eclipse.debug.core.id"; //$NON-NLS-1$
+
/**
- * Registered breakpoint marker attribute (value "org.eclipse.debug.core.registered"
).
- * The attribute is a boolean
corresponding to
- * whether a breakpoint has been registered with the breakpoint manager.
- *
+ * Registered breakpoint marker attribute (value
+ * "org.eclipse.debug.core.registered"
). The attribute is a
+ * boolean
corresponding to whether a breakpoint has been
+ * registered with the breakpoint manager.
+ *
* @see org.eclipse.core.resources.IMarker#getAttribute(String, boolean)
*/
- public static final String REGISTERED= "org.eclipse.debug.core.registered"; //$NON-NLS-1$
-
+ public static final String REGISTERED = "org.eclipse.debug.core.registered"; //$NON-NLS-1$
+
/**
- * Persisted breakpoint marker attribute (value "org.eclipse.debug.core.persisted"
).
- * The attribute is a boolean
corresponding to
- * whether a breakpoint is to be persisted accross workspace
- * invocations.
- *
+ * Persisted breakpoint marker attribute (value
+ * "org.eclipse.debug.core.persisted"
). The attribute is a
+ * boolean
corresponding to whether a breakpoint is to be
+ * persisted accross workspace invocations.
+ *
* @see org.eclipse.core.resources.IMarker#getAttribute(String, boolean)
*/
- public static final String PERSISTED= "org.eclipse.debug.core.persisted"; //$NON-NLS-1$
+ public static final String PERSISTED = "org.eclipse.debug.core.persisted"; //$NON-NLS-1$
- private int DBGBpNo=0;
+ private int DBGBpNo = 0;
public PHPBreakpoint() {
- }
+ }
/**
* @see IBreakpoint#setMarker(IMarker)
@@ -175,10 +190,10 @@ public abstract class PHPBreakpoint extends Breakpoint implements IBreakpoint {
public void setMarker(IMarker marker) throws CoreException {
super.setMarker(marker);
}
-
+
/**
- * Add this breakpoint to the breakpoint manager,
- * or sets it as unregistered.
+ * Add this breakpoint to the breakpoint manager, or sets it as
+ * unregistered.
*/
protected void register(boolean register) throws CoreException {
if (register) {
@@ -187,7 +202,7 @@ public abstract class PHPBreakpoint extends Breakpoint implements IBreakpoint {
setRegistered(false);
}
}
-
+
/**
* Execute the given workspace runnable
*/
@@ -196,7 +211,7 @@ public abstract class PHPBreakpoint extends Breakpoint implements IBreakpoint {
ResourcesPlugin.getWorkspace().run(wr, null);
} catch (CoreException e) {
throw new DebugException(e.getStatus());
- }
+ }
}
/**
@@ -205,26 +220,26 @@ public abstract class PHPBreakpoint extends Breakpoint implements IBreakpoint {
public String getModelIdentifier() {
return PHPDebugCorePlugin.getUniqueIdentifier();
}
-
+
public void setDBGBpNo(int bpNo) {
this.DBGBpNo = bpNo;
}
-
+
public int getDBGBpNo() {
return this.DBGBpNo;
}
-
- public int getHitCount () throws CoreException {
- return getMarker ().getAttribute (HIT_COUNT, -1);
+
+ public int getHitCount() throws CoreException {
+ return getMarker().getAttribute(HIT_COUNT, -1);
}
-
- public void setHitCount (int hitCount) throws CoreException {
+
+ public void setHitCount(int hitCount) throws CoreException {
if (hitCount > 0) {
- if (!isEnabled ()) {
- getMarker ().setAttribute (ENABLED, true);
+ if (!isEnabled()) {
+ getMarker().setAttribute(ENABLED, true);
}
}
-
- getMarker ().setAttribute (HIT_COUNT, hitCount);
+
+ getMarker().setAttribute(HIT_COUNT, hitCount);
}
}