Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 690c2ec7ef1c2d279344938063464186f7217ca8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
/*******************************************************************************
 * 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
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * 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;

import org.eclipse.jface.viewers.ISelection;


/**
 * Debug context service for a window. Clients may register for debug context
 * notification with this service. A context service is obtained from the
 * debug context manager.
 * @see IDebugContextManager
 * @since 3.3
 * @noimplement This interface is not intended to be implemented by clients.
 * @noextend This interface is not intended to be extended by clients.
 */
public interface IDebugContextService {

	/**
	 * Registers for the given listener for debug context change notification
	 * in this service's window.
	 *
	 * @param listener debug context listener
	 */
	public void addDebugContextListener(IDebugContextListener listener);
	/**
	 * Unregisters for the given listener for debug context change notification
	 * in this service's window.
	 *
	 * @param listener debug context listener
	 */
	public void removeDebugContextListener(IDebugContextListener listener);

	/**
	 * 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
	 */
	public void addDebugContextListener(IDebugContextListener listener, String partId);

	/**
	 * 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
	 */
	public void removeDebugContextListener(IDebugContextListener listener, String partId);

	/**
	 * Returns the active context in this service's window
	 * or <code>null</code>.
	 *
	 * @return active context or <code>null</code>
	 */
	public ISelection getActiveContext();

	/**
	 * Returns the active context in the specified part of this service's window
	 * or <code>null</code> if none.
	 *
	 * @param partId part identifier
	 * @return active context or <code>null</code>
	 */
	public ISelection getActiveContext(String partId);

	/**
	 * Registers the given debug context listener for post context change notification
	 * in this service's window. Post listeners are notified of context changes after all
	 * non-post listeners are notified.
	 *
	 * @param listener debug context listener
	 */
	public void addPostDebugContextListener(IDebugContextListener listener);

	/**
	 * Unregisters the given debug context listener for post context change notification
	 * in this service's window.
	 *
	 * @param listener debug context listener.
	 */
	public void removePostDebugContextListener(IDebugContextListener listener);

	/**
	 * 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 partId part identifier
	 */
	public void addPostDebugContextListener(IDebugContextListener listener, String partId);

	/**
	 * 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 partId part identifier
	 */
	public void removePostDebugContextListener(IDebugContextListener listener, String partId);

	/**
	 * Registers the given debug context provider with this service.
	 *
	 * @param provider debug context provider
	 */
	public void addDebugContextProvider(IDebugContextProvider provider);

	/**
	 * Unregisters the given debug context provider from this service.
	 *
	 * @param provider debug context provider
	 */
	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