1 11 package org.eclipse.ant.internal.ui.debug.model; 12 13 import org.eclipse.ant.internal.ui.AntUIPlugin; 14 import org.eclipse.ant.internal.ui.debug.IAntDebugConstants; 15 import org.eclipse.core.runtime.IStatus; 16 import org.eclipse.core.runtime.Status; 17 import org.eclipse.debug.core.DebugException; 18 import org.eclipse.debug.core.DebugPlugin; 19 import org.eclipse.debug.core.model.DebugElement; 20 21 24 public abstract class AntDebugElement extends DebugElement { 25 26 32 public AntDebugElement(AntDebugTarget target) { 33 super(target); 34 } 35 36 39 public String getModelIdentifier() { 40 return IAntDebugConstants.ID_ANT_DEBUG_MODEL; 41 } 42 43 protected void abort(String message, Throwable e) throws DebugException { 44 throw new DebugException(new Status(IStatus.ERROR, AntUIPlugin.getUniqueIdentifier(), 45 DebugPlugin.INTERNAL_ERROR, message, e)); 46 } 47 48 52 protected void throwDebugException(String message) throws DebugException { 53 throw new DebugException(new Status(IStatus.ERROR, AntUIPlugin.getUniqueIdentifier(), 54 DebugException.TARGET_REQUEST_FAILED, message, null)); 55 } 56 57 protected AntDebugTarget getAntDebugTarget() { 58 return (AntDebugTarget)super.getDebugTarget(); 59 } 60 } 61 | Popular Tags |