diff options
Diffstat (limited to 'deprecated/org.atl.eclipse.adt.debug/src/org/atl/eclipse/adt/debug/core/AtlBreakpoint.java')
-rw-r--r-- | deprecated/org.atl.eclipse.adt.debug/src/org/atl/eclipse/adt/debug/core/AtlBreakpoint.java | 90 |
1 files changed, 0 insertions, 90 deletions
diff --git a/deprecated/org.atl.eclipse.adt.debug/src/org/atl/eclipse/adt/debug/core/AtlBreakpoint.java b/deprecated/org.atl.eclipse.adt.debug/src/org/atl/eclipse/adt/debug/core/AtlBreakpoint.java deleted file mode 100644 index 78062d1a..00000000 --- a/deprecated/org.atl.eclipse.adt.debug/src/org/atl/eclipse/adt/debug/core/AtlBreakpoint.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Created on 6 mai 2004 - */ -package org.atl.eclipse.adt.debug.core; - -import org.atl.eclipse.adt.debug.AtlDebugPlugin; -import org.eclipse.core.resources.IMarker; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.resources.IWorkspaceRunnable; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.debug.core.DebugException; -import org.eclipse.debug.core.model.IBreakpoint; -import org.eclipse.debug.core.model.LineBreakpoint; - -/** - * @author idrissi - * - */ -public class AtlBreakpoint extends LineBreakpoint -{ - public static final String ATL_BREAKPOINT_MARKER = "org.atl.eclipse.adt.debug.atlBreakpointMarker"; - - public AtlBreakpoint() {} - - public AtlBreakpoint(final IResource resource, final String location, final int lineNumber, final int charStart, final int charEnd) throws DebugException { - IWorkspaceRunnable wr= new IWorkspaceRunnable() { - public void run(IProgressMonitor monitor) throws CoreException { - // create the marker - setMarker(resource.createMarker(ATL_BREAKPOINT_MARKER)); - // add attributes - addBreakpointAttributes(getModelIdentifier(), location, true, lineNumber, charStart, charEnd); - // add to breakpoint manager - setRegistered(true); - } - }; - run(wr); - } - - - /** - * Adds the standard attributes of a line breakpoint - * The standard attributes are: - * <ol> - * <li>IBreakpoint.ID</li> - * <li>IBreakpoint.ENABLED</li> - * <li>IMarker.LINE_NUMBER</li> - * <li>IMarker.CHAR_START</li> - * <li>IMarker.CHAR_END</li> - * </ol> - * - */ - private void addBreakpointAttributes(String modelIdentifier, String location, boolean enabled, int lineNumber, int charStart, int charEnd) - { - try { - IMarker marker = ensureMarker(); - marker.setAttribute(IBreakpoint.ID, modelIdentifier); - marker.setAttribute(IMarker.LOCATION, location); - marker.setAttribute(IBreakpoint.ENABLED, new Boolean(enabled)); - marker.setAttribute(IMarker.LINE_NUMBER, new Integer(lineNumber)); - marker.setAttribute(IMarker.CHAR_START, new Integer(charStart)); - marker.setAttribute(IMarker.CHAR_END, new Integer(charEnd)); - marker.setAttribute(IBreakpoint.REGISTERED, false); // breakpoint has not been registered yet - } catch(CoreException e) { - System.err.println(e); - } - } - - - /** - * @see org.eclipse.debug.core.model.IBreakpoint#getModelIdentifier() - */ - public String getModelIdentifier() - { - // return "org.atl.eclipse.adt.debug"; - return AtlDebugPlugin.getUniqueIdentifier(); - } - - /** - * Execute the given workspace runnable - */ - protected void run(IWorkspaceRunnable wr) throws DebugException { - try { - ResourcesPlugin.getWorkspace().run(wr, null); - } catch (CoreException e) { - throw new DebugException(e.getStatus()); - } - } -} |