KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > debug > ui > contexts > IDebugContextService


1 /*******************************************************************************
2  * Copyright (c) 2005, 2007 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.ui.contexts;
12
13 import org.eclipse.jface.viewers.ISelection;
14
15
16 /**
17  * Debug context service for a window. Clients may register for debug context
18  * notification with this service. A context service is obtained from the
19  * debug context manager.
20  * <p>
21  * Not intended to be implemented by clients.
22  * </p>
23  * @see IDebugContextManager
24  * @since 3.3
25  */

26 public interface IDebugContextService {
27     
28     /**
29      * Registers for the given listener for debug context change notification
30      * in this service's window.
31      *
32      * @param listener debug context listener
33      */

34     public void addDebugContextListener(IDebugContextListener listener);
35     /**
36      * Unregisters for the given listener for debug context change notification
37      * in this service's window.
38      *
39      * @param listener debug context listener
40      */

41     public void removeDebugContextListener(IDebugContextListener listener);
42     
43     /**
44      * Registers for the given debug context listener for context notification
45      * from the specified part in this service's window.
46      *
47      * @param listener debug context listener
48      * @param partId part identifier
49      */

50     public void addDebugContextListener(IDebugContextListener listener, String JavaDoc partId);
51     
52     /**
53      * Unregisters the given debug context listener for context change notification
54      * from the specified part in this service's window.
55      *
56      * @param listener debug context listener
57      * @param partId part identifier
58      */

59     public void removeDebugContextListener(IDebugContextListener listener, String JavaDoc partId);
60         
61     /**
62      * Returns the active context in this service's window
63      * or <code>null</code>.
64      *
65      * @return active context or <code>null</code>
66      */

67     public ISelection getActiveContext();
68     
69     /**
70      * Returns the active context in the specified part of this service's window
71      * or <code>null</code> if none.
72      *
73      * @param partId part identifier
74      * @return active context or <code>null</code>
75      */

76     public ISelection getActiveContext(String JavaDoc partId);
77     
78     /**
79      * Registers the given debug context listener for post context change notification
80      * in this service's window. Post listeners are notified of context changes after all
81      * non-post listeners are notified.
82      *
83      * @param listener debug context listener
84      */

85     public void addPostDebugContextListener(IDebugContextListener listener);
86     
87     /**
88      * Unregisters the given debug context listener for post context change notification
89      * in this service's window.
90      *
91      * @param listener debug context listener.
92      */

93     public void removePostDebugContextListener(IDebugContextListener listener);
94     
95     /**
96      * Registers the given debug context listener for post context change notification
97      * in the specified part of this service's window. Post listeners are notified of
98      * context changes after all non-post listeners are notified.
99      *
100      * @param listener debug context listener
101      * @param partId part identifier
102      */

103     public void addPostDebugContextListener(IDebugContextListener listener, String JavaDoc partId);
104     
105     /**
106      * Unregisters the given debug context listener for post context change notification
107      * in the specified part of this service's window.
108      *
109      * @param listener debug context listener
110      * @param partId part identifier
111      */

112     public void removePostDebugContextListener(IDebugContextListener listener, String JavaDoc partId);
113     
114     /**
115      * Registers the given debug context provider with this service.
116      *
117      * @param provider debug context provider
118      */

119     public void addDebugContextProvider(IDebugContextProvider provider);
120     
121     /**
122      * Unregisters the given debug context provider from this service.
123      *
124      * @param provider debug context provider
125      */

126     public void removeDebugContextProvider(IDebugContextProvider provider);
127     
128 }
129
Popular Tags