Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Barnes2005-11-21 16:10:22 +0000
committerKevin Barnes2005-11-21 16:10:22 +0000
commit1fa778c0a5c53b2869df5d597d31a4ddecc84531 (patch)
treef08a04d045beff96b33b8e5cbd62a2b2157333aa /org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts
parent6f61758dcf785a86427fe62929a0833c5178436e (diff)
downloadeclipse.platform.debug-1fa778c0a5c53b2869df5d597d31a4ddecc84531.tar.gz
eclipse.platform.debug-1fa778c0a5c53b2869df5d597d31a4ddecc84531.tar.xz
eclipse.platform.debug-1fa778c0a5c53b2869df5d597d31a4ddecc84531.zip
merging async_viewer_branch_2
Diffstat (limited to 'org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts')
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/IDebugContextListener.java41
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/IDebugContextManager.java99
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/IDebugContextProvider.java35
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/ISourceDisplayAdapter.java31
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/ISuspendTrigger.java26
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/ISuspendTriggerListener.java29
6 files changed, 261 insertions, 0 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/IDebugContextListener.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/IDebugContextListener.java
new file mode 100644
index 000000000..42240d61b
--- /dev/null
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/IDebugContextListener.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2005 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.debug.ui.contexts;
+
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.ui.IWorkbenchPart;
+
+/**
+ *
+ * @since 3.2
+ */
+public interface IDebugContextListener {
+
+ /**
+ * Notification the given selection contains the active context in the
+ * specified part.
+ *
+ * @param selection selection containing active context
+ * @param part workbench part or <code>null</code>
+ */
+ public void contextActivated(ISelection selection, IWorkbenchPart part);
+
+ /**
+ * Notification the context in the given selection has changed state
+ * in the specified part. Context changes are only sent for contexts
+ * that are active.
+ *
+ * @param selection selection containing changed context
+ * @param part workbench part or <code>null</code>
+ */
+ public void contextChanged(ISelection selection, IWorkbenchPart part);
+
+}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/IDebugContextManager.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/IDebugContextManager.java
new file mode 100644
index 000000000..1fff05031
--- /dev/null
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/IDebugContextManager.java
@@ -0,0 +1,99 @@
+/*******************************************************************************
+ * Copyright (c) 2005 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.debug.ui.contexts;
+
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.ui.IWorkbenchWindow;
+
+/**
+ * A debug context drives debugging - source lookup and action enablement in the
+ * debug user interface. The context service provides notification
+ * of changes in the active context specific to the workbench, a specific window, or a
+ * specific part.
+ * <p>
+ * Cleints provide a context policy to notifiy the context service of interesting
+ * contexts within a model. For example the debug platform provides a context policy
+ * that maps debug events to suspended contexts.
+ * </p>
+ * <p>
+ * Not intended to be implemented by clients.
+ * </p>
+ * @since 3.2
+ */
+public interface IDebugContextManager {
+
+ /**
+ * Registers the given debug context provider.
+ *
+ * @param provider
+ */
+ public void addDebugContextProvider(IDebugContextProvider provider);
+
+ /**
+ * Deregisters the given debug context provider.
+ *
+ * @param provider
+ */
+ public void removeDebugContextProvider(IDebugContextProvider provider);
+
+ /**
+ * Registers for context activation notification in the given window.
+ *
+ * @param listener
+ * @param window
+ */
+ public void addDebugContextListener(IDebugContextListener listener, IWorkbenchWindow window);
+ /**
+ * Deregisters for context activation notification in this service in the
+ * given window.
+ *
+ * @param listener
+ * @param window
+ */
+ public void removeDebugContextListener(IDebugContextListener listener, IWorkbenchWindow window);
+
+ /**
+ * Registers for context activation notification in the specified part of the
+ * specified window.
+ *
+ * @param listener
+ * @param window
+ * @param partId
+ */
+ public void addDebugContextListener(IDebugContextListener listener, IWorkbenchWindow window, String partId);
+
+ /**
+ * Deregisters for context activation notification in the specified part of
+ * the specified window.
+ *
+ * @param listener
+ * @param partId
+ */
+ public void removeDebugContextListener(IDebugContextListener listener, IWorkbenchWindow window, String partId);
+
+ /**
+ * Returns the active context in the given window
+ * or <code>null</code>.
+ *
+ * @param window
+ * @return
+ */
+ public ISelection getActiveContext(IWorkbenchWindow window);
+
+ /**
+ * Returns the active context in the specified part of the given
+ * window or <code>null</code>.
+ *
+ * @param partId
+ * @return
+ */
+ public ISelection getActiveContext(IWorkbenchWindow window, String partId);
+}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/IDebugContextProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/IDebugContextProvider.java
new file mode 100644
index 000000000..1052a4e4d
--- /dev/null
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/IDebugContextProvider.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2005 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.debug.ui.contexts;
+
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.ui.IWorkbenchPart;
+
+/**
+ * Provides a debug context.
+ *
+ * @since 3.2
+ */
+public interface IDebugContextProvider {
+
+ /**
+ * Returns the part associated with this provider.
+ *
+ * @return
+ */
+ public IWorkbenchPart getPart();
+
+ public void addDebugContextListener(IDebugContextListener listener);
+ public void removeDebugContextListener(IDebugContextListener listener);
+
+ public ISelection getActiveContext();
+
+}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/ISourceDisplayAdapter.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/ISourceDisplayAdapter.java
new file mode 100644
index 000000000..938e49278
--- /dev/null
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/ISourceDisplayAdapter.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2005 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.debug.ui.contexts;
+
+import org.eclipse.ui.IWorkbenchPage;
+
+/**
+ * An adpater that is capable of displaying source for an object.
+ * The adapter is obtained from an object in a debug context.
+ *
+ * @since 3.2
+ */
+public interface ISourceDisplayAdapter {
+
+ /**
+ * Displays source for the given context in the specified page.
+ *
+ * @param context debug context to display source for
+ * @param page the page in which to display source
+ */
+ public void displaySource(Object context, IWorkbenchPage page);
+
+}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/ISuspendTrigger.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/ISuspendTrigger.java
new file mode 100644
index 000000000..a5ce7e0bb
--- /dev/null
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/ISuspendTrigger.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2005 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.debug.ui.contexts;
+
+/**
+ * Adapter retrieved from an <code>ILaunch</code> that notifies
+ * listeners when it suspends. A suspend trigger is responsible
+ * for cleaning itself up when it's launch is no longer capable
+ * of suspending.
+ *
+ * @since 3.2
+ */
+public interface ISuspendTrigger {
+
+ public void addSuspendTriggerListener(ISuspendTriggerListener listener);
+ public void removeSuspendTriggerListener(ISuspendTriggerListener listener);
+
+}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/ISuspendTriggerListener.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/ISuspendTriggerListener.java
new file mode 100644
index 000000000..5daafe5e7
--- /dev/null
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/ISuspendTriggerListener.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2005 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.debug.ui.contexts;
+
+import org.eclipse.debug.core.ILaunch;
+
+/**
+ * @since 3.2
+ */
+public interface ISuspendTriggerListener {
+
+ /**
+ * Notification the given launch has suspended at the
+ * specified context.
+ *
+ * @param launch
+ * @param context
+ */
+ public void suspended(ILaunch launch, Object context);
+
+}

Back to the top