Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikhail Khodjaiants2008-03-15 18:18:14 +0000
committerMikhail Khodjaiants2008-03-15 18:18:14 +0000
commit57316d3144f598943fd121260398541a04719cda (patch)
tree17ebd74bc658a80d22426eb5271c826edccfe596 /debug/org.eclipse.cdt.debug.core
parent650153071e4ad367422b0eea95c7441f4ed0c5b7 (diff)
downloadorg.eclipse.cdt-57316d3144f598943fd121260398541a04719cda.tar.gz
org.eclipse.cdt-57316d3144f598943fd121260398541a04719cda.tar.xz
org.eclipse.cdt-57316d3144f598943fd121260398541a04719cda.zip
Added disassembly context related interfaces.
Diffstat (limited to 'debug/org.eclipse.cdt.debug.core')
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/disassembly/IDisassemblyContextListener.java42
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/disassembly/IDisassemblyContextProvider.java32
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/disassembly/IDisassemblyContextService.java61
3 files changed, 135 insertions, 0 deletions
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/disassembly/IDisassemblyContextListener.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/disassembly/IDisassemblyContextListener.java
new file mode 100644
index 00000000000..37d5d5f47db
--- /dev/null
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/disassembly/IDisassemblyContextListener.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2008 ARM Limited 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * ARM Limited - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.debug.core.disassembly;
+
+/**
+ * The instances of this interface are notified when
+ * a disassembly context is registered or unregistered
+ * with <code>IDisassemblyContextService</code>.
+ * <p>
+ * This interface is used by the disassembly UI components.
+ * </p>
+ * <p>
+ * The clients may implement this interface.
+ * </p>
+ */
+public interface IDisassemblyContextListener {
+
+ /**
+ * Indicates that <code>context</code> has been registered
+ * with <code>IDisassemblyContextService</code>.
+ *
+ * @param context the disassembly context that is registered
+ */
+ public void contextAdded( Object context );
+
+ /**
+ * Indicates that <code>context</code> has been unregistered
+ * with <code>IDisassemblyContextService</code>.
+ *
+ * @param context the disassembly context that is unregistered
+ */
+ public void contextRemoved( Object context );
+}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/disassembly/IDisassemblyContextProvider.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/disassembly/IDisassemblyContextProvider.java
new file mode 100644
index 00000000000..35a3b05da81
--- /dev/null
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/disassembly/IDisassemblyContextProvider.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2008 ARM Limited 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * ARM Limited - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.debug.core.disassembly;
+
+/**
+ * Provides disassembly context for given element.
+ * <p>
+ * Clients must implements this interface to plug into
+ * the diassembly framework.
+ * </p>
+ */
+public interface IDisassemblyContextProvider {
+
+ /**
+ * Returns the disassembly context object for <code>element</code>
+ *
+ * @param element the element being queried for disassembly context
+ * @return an object that represents the disassembly context
+ * for the given element, or <code>null</code> if the given element
+ * doesn't provide a disassembly context
+ */
+ public Object getDisassemblyContext( Object element );
+}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/disassembly/IDisassemblyContextService.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/disassembly/IDisassemblyContextService.java
new file mode 100644
index 00000000000..94f904607e2
--- /dev/null
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/disassembly/IDisassemblyContextService.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2008 ARM Limited 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * ARM Limited - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.debug.core.disassembly;
+
+/**
+ * Interface for registering the disassembly context objects.
+ * <p>
+ * Clients interested in the context change notifications
+ * may register a listener.
+ * </p>
+ * <p>
+ * This interface is not intended to be implemented by clients.
+ * It can be accessed from <code>CDebugCorePlugin</code>.
+ * </p>
+ * @see org.eclipse.cdt.debug.core.IDisassemblyContextListener
+ */
+public interface IDisassemblyContextService {
+
+ /**
+ * Adds the given listener to the collection of registered listeners.
+ * Has no effect if an identical listener is already registered.
+ *
+ * @param listener the listener to add
+ */
+ public void addDisassemblyContextListener( IDisassemblyContextListener listener );
+
+ /**
+ * Removes the given listener from the collection of registered listeners.
+ * Has no effect if an identical listener is not already registered.
+ *
+ * @param listener the listener to remove
+ */
+ public void removeDisassemblyContextListener( IDisassemblyContextListener listener );
+
+ /**
+ * Registers the given context with this service.
+ * Has no effect if an identical context has already been registered.
+ * The corresponding notifications will be sent to all registered listeners.
+ *
+ * @param disassemblyContext the context to register.
+ */
+ public void register( Object disassemblyContext );
+
+ /**
+ * Unregisters the given context with this service.
+ * Has no effect if an identical context has not been registered.
+ * The corresponding notifications will be sent to all registered listeners.
+ *
+ * @param disassemblyContext the context to unregister.
+ */
+ public void unregister( Object disassemblyContext );
+}

Back to the top