2 * Created on 25.11.2004
4 * TODO To change the template for this generated file go to
5 * Window - Preferences - Java - Code Style - Code Templates
7 package net.sourceforge.phpeclipse.xdebug.core;
9 import org.eclipse.core.resources.IMarker;
10 import org.eclipse.core.resources.IResource;
11 import org.eclipse.core.runtime.CoreException;
12 import org.eclipse.debug.core.model.IBreakpoint;
13 import org.eclipse.debug.core.model.LineBreakpoint;
14 import net.sourceforge.phpeclipse.xdebug.core.IXDebugConstants;
19 * TODO To change the template for this generated type comment go to
20 * Window - Preferences - Java - Code Style - Code Templates
22 public class XDebugLineBreakpoint extends LineBreakpoint {
25 * Default constructor is required for the breakpoint manager
26 * to re-create persisted breakpoints. After instantiating a breakpoint,
27 * the <code>setMarker(...)</code> method is called to restore
28 * this breakpoint's attributes.
30 public XDebugLineBreakpoint() {
34 * Constructs a line breakpoint on the given resource at the given
35 * line number. The line number is 1-based (i.e. the first line of a
36 * file is line number 1). The PDA VM uses 0-based line numbers,
37 * so this line number translation is done at breakpoint install time.
39 * @param resource file on which to set the breakpoint
40 * @param lineNumber 1-based line number of the breakpoint
41 * @throws CoreException if unable to create the breakpoint
43 public XDebugLineBreakpoint(IResource resource, int lineNumber) throws CoreException {
44 IMarker marker = resource.createMarker("org.eclipse.debug.examples.core.pda.lineBreakpoint.marker");
47 ensureMarker().setAttribute(IMarker.LINE_NUMBER, lineNumber);
48 ensureMarker().setAttribute(IBreakpoint.ID, IXDebugConstants.ID_XDEBUG_DEBUG_MODEL);
52 * @see org.eclipse.debug.core.model.IBreakpoint#getModelIdentifier()
54 public String getModelIdentifier() {
55 return IXDebugConstants.ID_XDEBUG_DEBUG_MODEL;