Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
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/IDebugContextProvider2.java33
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/IDebugContextService.java59
2 files changed, 91 insertions, 1 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/IDebugContextProvider2.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/IDebugContextProvider2.java
new file mode 100644
index 000000000..7c093f306
--- /dev/null
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/IDebugContextProvider2.java
@@ -0,0 +1,33 @@
+/*****************************************************************
+ * Copyright (c) 2010 Texas Instruments 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:
+ * Patrick Chuong (Texas Instruments) - Allow multiple debug views and
+ * multiple debug context providers (Bug 327263)
+ *****************************************************************/
+package org.eclipse.debug.ui.contexts;
+
+/**
+ * IDebugContextProvider extension.
+ *
+ * @since 3.7
+ */
+public interface IDebugContextProvider2 extends IDebugContextProvider {
+ /**
+ * Return whether the provider can be set a an active provider for the
+ * window.
+ * <p>
+ * If <code>true</code> then upon the provider's part is
+ * activation this provider will become the active debug context provider
+ * for the whole window. If <code>false</code>, then this provider will
+ * only set the active context in a given workbench part.
+ *
+ * @return <code>true</code> if capable to be the active debug context
+ * provider for a window.
+ */
+ boolean isWindowContextProvider();
+}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/IDebugContextService.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/IDebugContextService.java
index 0d2eac26c..7b2a5d7fa 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/IDebugContextService.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/IDebugContextService.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 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
@@ -7,6 +7,8 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Patrick Chuong (Texas Instruments) - Allow multiple debug views and
+ * multiple debug context providers (Bug 327263)
*******************************************************************************/
package org.eclipse.debug.ui.contexts;
@@ -124,4 +126,59 @@ public interface IDebugContextService {
*/
public void removeDebugContextProvider(IDebugContextProvider provider);
+ /**
+ * Returns the active context in the specified part of this service's window
+ * or <code>null</code> if none.
+ *
+ * @param partId part identifier
+ * @param partSecondaryId part secondary identifier
+ * @return active context or <code>null</code>
+ * @since 3.7
+ */
+ ISelection getActiveContext(String partId, String partSecondaryId);
+
+ /**
+ * Registers for the given debug context listener for context notification
+ * from the specified part in this service's window.
+ *
+ * @param listener debug context listener
+ * @param partId part identifier
+ * @param partSecondaryId part secondary identifier
+ * @since 3.7
+ */
+ void addDebugContextListener(IDebugContextListener listener, String partId, String partSecondaryId);
+
+ /**
+ * Unregisters the given debug context listener for context change notification
+ * from the specified part in this service's window.
+ *
+ * @param listener debug context listener
+ * @param partId part identifier
+ * @param partSecondaryId part secondary identifier
+ * @since 3.7
+ */
+ void removeDebugContextListener(IDebugContextListener listener, String partId, String partSecondaryId);
+
+ /**
+ * Registers the given debug context listener for post context change notification
+ * in the specified part of this service's window. Post listeners are notified of
+ * context changes after all non-post listeners are notified.
+ *
+ * @param listener debug context listener
+ * @param partSecondaryId part secondary identifier
+ * @param partId part identifier
+ * @since 3.7
+ */
+ void addPostDebugContextListener(IDebugContextListener listener, String partId, String partSecondaryId);
+
+ /**
+ * Unregisters the given debug context listener for post context change notification
+ * in the specified part of this service's window.
+ *
+ * @param listener debug context listener
+ * @param partSecondaryId part secondary identifier
+ * @param partId part identifier
+ * @since 3.7
+ */
+ void removePostDebugContextListener(IDebugContextListener listener, String partId, String partSecondaryId);
}

Back to the top