Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 2c3c90a167599f547a54c65ad5ee752321b60f2c (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
/*******************************************************************************
 * Copyright (c) 2005, 2006 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.internal.ui.contexts.provisional;

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>
 * Clients provide a context policy to notify 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);
	
	/**
	 * Unregisters 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);
	/**
	 * Unregisters 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);
	
	/**
	 * Unregisters 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);	
	
	/**
	 * Registers for context activation notification in all windows.
	 * 
	 * @param listener
	 */	
	public void addDebugContextListener(IDebugContextListener listener);
	
	/**
	 * Unregisters for context activation notification in all windows.
	 * 
	 * @param listener
	 */	
	public void removeDebugContextListener(IDebugContextListener listener);		
}

Back to the top