blob: 110a583647da9c95f0faca3956a12bdaf81b678f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
|
package org.eclipse.debug.core.model;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.runtime.CoreException;
/**
* 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 each breakpoint.
* <p>
* A breakpoint is defined in two parts:
* <ol>
* <li>By an extension of kind <code>"org.eclipse.debug.core.breakpoints"</li>
* <li>By a marker definition that corresnponds to the above breakpoint extension</li>
* </ol>
* <p>
* For example, following is a definition of corresponding breakpoint
* and breakpoint marker defintions. Note that the <ocde>markerType</code>
* attribute defined by the breakpoint extension corresponds to the
* type of the marker definition.
* <pre>
* <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>
* </pre>
* <p>
* The breakpoint manager instantiates persisted breakpoints by
* traversing all markers that are a subtype of
* <code>"org.eclipse.debug.core.breakpointMarker"</code>, and
* instantiating the class defined by the <code>class</code> attribute
* on the associated breakpoint extension. The method <code>setMarker</code>
* is then called to associated a marker with the breakpoint.
*/
public interface IBreakpoint {
/**
* Deletes this breakpoint's underlying marker, and removes
* this breakpoint from the breakpoint manager.
*
* @exception CoreException if deleting the underlying marker throws
* a <code>CoreException<code>.
*/
public void delete() throws CoreException;
/**
* Returns the marker associated with this breakpoint, or
* <code>null</code> if no marker is associated with this breakpoint.
*
* @return associated marker, or <code>null</code> if there is
* no associated marker.
*/
public IMarker getMarker();
/**
* Sets the marker associated with this breakpoint. This method is
* only called at breakpoint creation, when restoring a persisted
* marker.
*
* @param marker the marker to associate with this breakpoint
* @exception CoreException if an error occurrs accessing the marker
*/
public void setMarker(IMarker marker) throws CoreException;
/**
* Returns the identifier of the debug model this breakpoint is
* asscoiated with.
*
* @return the identifier of the debug model this breakpoint is
* associated with
*/
public String getModelIdentifier();
/**
* Returns whether this breakpoint is enabled
*
* @exception CoreException if a <code>CoreException</code> is
* thrown when retrieving the enabled attribute from the underlying marker
* @return whether this breakpoint is enabled
*/
public boolean isEnabled() throws CoreException;
/**
* Sets the enabled state of this breakpoint. This has no effect
* if the current enabled state is the same as specified by the
* enabled parameter.
*
* @param enabled whether this breakpoint should be enabled
* @exception CoreException if a <code>CoreException</code> is thrown
* when setting the attribute on the underlying marker.
*/
public void setEnabled(boolean enabled) throws CoreException;
}
|