Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.debug.core/core/org/eclipse/debug/core/model/DebugElement.java')
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/model/DebugElement.java62
1 files changed, 33 insertions, 29 deletions
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/model/DebugElement.java b/org.eclipse.debug.core/core/org/eclipse/debug/core/model/DebugElement.java
index bf5a31865..71e606570 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/core/model/DebugElement.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/core/model/DebugElement.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2011 IBM Corporation and others.
+ * Copyright (c) 2005, 2013 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -27,13 +27,13 @@ import org.eclipse.debug.core.ILaunchConfiguration;
* @since 3.1
*/
public abstract class DebugElement extends PlatformObject implements IDebugElement {
-
+
private IDebugTarget fTarget;
/**
* Constructs a debug element referring to an artifact in the given
* debug target.
- *
+ *
* @param target debug target containing this element
*/
public DebugElement(IDebugTarget target) {
@@ -41,34 +41,38 @@ public abstract class DebugElement extends PlatformObject implements IDebugEleme
}
/* (non-Javadoc)
- *
+ *
* Debug target implementation should override this method.
- *
+ *
* @see org.eclipse.debug.core.model.IDebugElement#getDebugTarget()
*/
- public IDebugTarget getDebugTarget() {
+ @Override
+ public IDebugTarget getDebugTarget() {
return fTarget;
}
/* (non-Javadoc)
* @see org.eclipse.debug.core.model.IDebugElement#getLaunch()
*/
- public ILaunch getLaunch() {
+ @Override
+ public ILaunch getLaunch() {
return getDebugTarget().getLaunch();
}
/* (non-Javadoc)
* @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
*/
- public Object getAdapter(Class adapter) {
+ @Override
+ public Object getAdapter(Class adapter) {
if (adapter == IDebugElement.class) {
return this;
}
-
+
// a debug target may not implement IStepFilters
if (adapter == IStepFilters.class) {
- if (getDebugTarget() instanceof IStepFilters)
+ if (getDebugTarget() instanceof IStepFilters) {
return getDebugTarget();
+ }
}
if (adapter == IDebugTarget.class) {
return getDebugTarget();
@@ -88,81 +92,81 @@ public abstract class DebugElement extends PlatformObject implements IDebugEleme
/**
* Fires a debug event.
- *
+ *
* @param event debug event to fire
*/
public void fireEvent(DebugEvent event) {
DebugPlugin.getDefault().fireDebugEventSet(new DebugEvent[] {event});
- }
+ }
/**
* Fires a change event for this debug element
* with the specified detail code.
- *
+ *
* @param detail detail code for the change event,
* such as <code>DebugEvent.STATE</code> or <code>DebugEvent.CONTENT</code>
*/
public void fireChangeEvent(int detail) {
fireEvent(new DebugEvent(this, DebugEvent.CHANGE, detail));
}
-
+
/**
* Fires a creation event for this debug element.
*/
public void fireCreationEvent() {
fireEvent(new DebugEvent(this, DebugEvent.CREATE));
- }
-
+ }
+
/**
* Fires a resume for this debug element with
* the specified detail code.
- *
- * @param detail detail code for the resume event, such
+ *
+ * @param detail detail code for the resume event, such
* as <code>DebugEvent.STEP_OVER</code>
*/
public void fireResumeEvent(int detail) {
fireEvent(new DebugEvent(this, DebugEvent.RESUME, detail));
}
-
+
/**
* Fires a suspend event for this debug element with
* the specified detail code.
- *
+ *
* @param detail detail code for the suspend event, such
* as <code>DebugEvent.BREAKPOINT</code>
*/
public void fireSuspendEvent(int detail) {
fireEvent(new DebugEvent(this, DebugEvent.SUSPEND, detail));
- }
-
+ }
+
/**
* Fires a terminate event for this debug element.
*/
public void fireTerminateEvent() {
fireEvent(new DebugEvent(this, DebugEvent.TERMINATE));
- }
-
+ }
+
/**
* Throws a debug exception with a status code of <code>TARGET_REQUEST_FAILED</code>.
- *
+ *
* @param message exception message
* @param e underlying exception or <code>null</code>
* @throws DebugException if a problem is encountered
*/
protected void requestFailed(String message, Throwable e) throws DebugException {
- throw new DebugException(new Status(IStatus.ERROR, DebugPlugin.getUniqueIdentifier(),
+ throw new DebugException(new Status(IStatus.ERROR, DebugPlugin.getUniqueIdentifier(),
DebugException.TARGET_REQUEST_FAILED, message, e));
}
-
+
/**
* Throws a debug exception with a status code of <code>NOT_SUPPORTED</code>.
- *
+ *
* @param message exception message
* @param e underlying exception or <code>null</code>
* @throws DebugException if a problem is encountered
*/
protected void notSupported(String message, Throwable e) throws DebugException {
- throw new DebugException(new Status(IStatus.ERROR, DebugPlugin.getUniqueIdentifier(),
+ throw new DebugException(new Status(IStatus.ERROR, DebugPlugin.getUniqueIdentifier(),
DebugException.NOT_SUPPORTED, message, e));
}
}

Back to the top