Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugElement.java')
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugElement.java135
1 files changed, 0 insertions, 135 deletions
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugElement.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugElement.java
deleted file mode 100644
index 53fd618f7..000000000
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugElement.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.core;
-
-import org.eclipse.core.runtime.PlatformObject;
-import org.eclipse.debug.core.DebugEvent;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.model.IDebugElement;
-import org.eclipse.debug.core.model.IDebugTarget;
-import org.eclipse.debug.core.model.IProcess;
-import org.eclipse.debug.core.model.IStepFilters;
-
-/**
- * Implementation of common function for debug elements.
- * <p>
- * Clients may subclass this class.
- * TODO: in progress, make API
- * </p>
- * @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) {
- fTarget = target;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IDebugElement#getDebugTarget()
- */
- public IDebugTarget getDebugTarget() {
- return fTarget;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IDebugElement#getLaunch()
- */
- public ILaunch getLaunch() {
- return getDebugTarget().getLaunch();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
- */
- public Object getAdapter(Class adapter) {
- if (adapter == IDebugElement.class) {
- return this;
- }
- if (adapter == IStepFilters.class) {
- return getDebugTarget();
- }
- if (adapter == IDebugTarget.class) {
- return getDebugTarget();
- }
- if (adapter == ILaunch.class) {
- return getLaunch();
- }
- if (adapter == IProcess.class) {
- return getDebugTarget().getProcess();
- }
- return super.getAdapter(adapter);
- }
-
- /**
- * Fires a debug event.
- *
- * @param event debug event to fire
- */
- protected 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.
- */
- protected 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
- * as <code>DebugEvent.STEP_OVER</code>
- */
- protected 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>
- */
- protected void fireSuspendEvent(int detail) {
- fireEvent(new DebugEvent(this, DebugEvent.SUSPEND, detail));
- }
-
- /**
- * Fires a terminate event for this debug element.
- */
- protected void fireTerminateEvent() {
- fireEvent(new DebugEvent(this, DebugEvent.TERMINATE));
- }
-}

Back to the top