KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > debug > internal > ui > contexts > provisional > IDebugContextManager


1 /*******************************************************************************
2  * Copyright (c) 2005, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.debug.internal.ui.contexts.provisional;
12
13 import org.eclipse.jface.viewers.ISelection;
14 import org.eclipse.ui.IWorkbenchWindow;
15
16 /**
17  * A debug context drives debugging - source lookup and action enablement in the
18  * debug user interface. The context service provides notification
19  * of changes in the active context specific to the workbench, a specific window, or a
20  * specific part.
21  * <p>
22  * Clients provide a context policy to notify the context service of interesting
23  * contexts within a model. For example the debug platform provides a context policy
24  * that maps debug events to suspended contexts.
25  * </p>
26  * <p>
27  * Not intended to be implemented by clients.
28  * </p>
29  * @since 3.2
30  */

31 public interface IDebugContextManager {
32     
33     /**
34      * Registers the given debug context provider.
35      *
36      * @param provider
37      */

38     public void addDebugContextProvider(IDebugContextProvider provider);
39     
40     /**
41      * Unregisters the given debug context provider.
42      *
43      * @param provider
44      */

45     public void removeDebugContextProvider(IDebugContextProvider provider);
46     
47     /**
48      * Registers for context activation notification in the given window.
49      *
50      * @param listener
51      * @param window
52      */

53     public void addDebugContextListener(IDebugContextListener listener, IWorkbenchWindow window);
54     /**
55      * Unregisters for context activation notification in this service in the
56      * given window.
57      *
58      * @param listener
59      * @param window
60      */

61     public void removeDebugContextListener(IDebugContextListener listener, IWorkbenchWindow window);
62     
63     /**
64      * Registers for context activation notification in the specified part of the
65      * specified window.
66      *
67      * @param listener
68      * @param window
69      * @param partId
70      */

71     public void addDebugContextListener(IDebugContextListener listener, IWorkbenchWindow window, String JavaDoc partId);
72     
73     /**
74      * Unregisters for context activation notification in the specified part of
75      * the specified window.
76      *
77      * @param listener
78      * @param partId
79      */

80     public void removeDebugContextListener(IDebugContextListener listener, IWorkbenchWindow window, String JavaDoc partId);
81         
82     /**
83      * Returns the active context in the given window
84      * or <code>null</code>.
85      *
86      * @param window
87      * @return
88      */

89     public ISelection getActiveContext(IWorkbenchWindow window);
90     
91     /**
92      * Returns the active context in the specified part of the given
93      * window or <code>null</code>.
94      *
95      * @param partId
96      * @return
97      */

98     public ISelection getActiveContext(IWorkbenchWindow window, String JavaDoc partId);
99     
100     /**
101      * Registers for context activation notification in all windows.
102      *
103      * @param listener
104      */

105     public void addDebugContextListener(IDebugContextListener listener);
106     
107     /**
108      * Unregisters for context activation notification in all windows.
109      *
110      * @param listener
111      */

112     public void removeDebugContextListener(IDebugContextListener listener);
113 }
114
Popular Tags