Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: d6e6b6b45f1de153a1e4f7d45ccdda176537dd4d (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
/*******************************************************************************
 * Copyright (c) 2000, 2013 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.ui;


import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.ui.IViewPart;
import org.eclipse.ui.actions.ActionFactory;
import org.eclipse.ui.texteditor.IUpdate;

/**
 * Common function for debug views. Provides access to the underlying viewer and
 * debug model presentation being used by a viewer. This allows clients to do
 * such things as add and remove filters to a viewer, and configure a debug
 * model presentation.
 * <p>
 * Clients may implement this interface. Generally, clients should subclass
 * <code>AbstractDebugView</code> when creating a new debug view.
 * </p>
 * @see org.eclipse.core.runtime.IAdaptable
 * @see org.eclipse.debug.ui.IDebugModelPresentation
 * @see org.eclipse.debug.ui.AbstractDebugView
 * @since 2.0
 */

public interface IDebugView extends IViewPart {
	
	/**
	 * Action id for a view's copy action. Any view
	 * with a copy action that should be invoked when
	 * CTRL+C is pressed should store their
	 * copy action with this key.
	 * 
	 * @see #setAction(String, IAction)
	 */
	public static final String COPY_ACTION = ActionFactory.COPY.getId();

	/**
	 * Action id for a view's cut action. Any view
	 * with a cut action that should be invoked when
	 * CTRL+X is pressed should store their
	 * cut action with this key.
	 * 
	 * @see #setAction(String, IAction)
	 */
	public static final String CUT_ACTION = ActionFactory.CUT.getId();

	/**
	 * Action id for a view's double-click action. Any view
	 * with an action that should be invoked when
	 * the mouse is double-clicked should store their
	 * double-click action with this key.
	 * 
	 * @see #setAction(String, IAction)
	 */
	public static final String DOUBLE_CLICK_ACTION = "Double_Click_ActionId";	 //$NON-NLS-1$

	/**
	 * Action id for a view's find action. Any view
	 * with a find action that should be invoked when
	 * CTRL+F is pressed should store their
	 * find action with this key.
	 * 
	 * @see #setAction(String, IAction)
	 */
	public static final String FIND_ACTION = ActionFactory.FIND.getId();

	/**
	 * Action id for a view's paste action. Any view
	 * with a paste action that should be invoked when
	 * CTRL+V is pressed should store their
	 * paste action with this key.
	 * 
	 * @see #setAction(String, IAction)
	 */
	public static final String PASTE_ACTION = ActionFactory.PASTE.getId();

	/**
	 * Action id for a view's remove action. Any view
	 * with a remove action that should be invoked when
	 * the delete key is pressed should store their
	 * remove action with this key.
	 * 
	 * @see #setAction(String, IAction)
	 */
	public static final String REMOVE_ACTION = "Remove_ActionId"; //$NON-NLS-1$

	/**
	 * Action id for a view's select all action. Any view
	 * with a select all action that should be invoked when
	 * CTRL+A is pressed should store their
	 * select all action with this key.
	 * 
	 * @see #setAction(String, IAction)
	 */
	public static final String SELECT_ALL_ACTION = ActionFactory.SELECT_ALL.getId();
	
	/**
	 * Returns the viewer contained in this debug view.
	 *
	 * @return viewer
	 */
	public Viewer getViewer();
	
	/**
	 * Returns the debug model presentation for this view specified
	 * by the debug model identifier.
	 *
	 * @param id the debug model identifier that corresponds to the <code>id</code>
	 *     attribute of a debug model presentation extension
	 * @return the debug model presentation, or <code>null</code> if no
	 *     presentation is registered for the specified id
	 */
	public IDebugModelPresentation getPresentation(String id);
	
	/**
	 * Installs the given action under the given action id.
	 *
	 * If the action has an id that maps to one of the global
	 * action ids defined by this interface, the action is registered 
	 * as a global action handler.
	 *
	 * If the action is an instance of <code>IUpdate</code> it is added/remove
	 * from the collection of updateables associated with this view.
	 * 
	 * @param actionID the action id
	 * @param action the action, or <code>null</code> to clear it
	 * @see #getAction
	 */
	public void setAction(String actionID, IAction action);
	
	/**
	 * Adds the given IUpdate to this view's collection of updatable
	 * objects.  Allows the view to periodically update these registered
	 * objects.  
	 * Has no effect if an identical IUpdate is already registered.
	 * 
	 * @param updatable The IUpdate instance to be added
	 */
	public void add(IUpdate updatable);
	
	/**
	 * Removes the given IUpdate from this view's collection of updatable
	 * objects.
 	 * Has no effect if an identical IUpdate was not already registered.
 	 * 
	 * @param updatable The IUpdate instance to be removed
	 */
	public void remove(IUpdate updatable);
	
	/**
	 * Returns the action installed under the given action id.
	 *
	 * @param actionID the action id
	 * @return the action, or <code>null</code> if none
	 * @see #setAction
	 */
	public IAction getAction(String actionID);
	
	/**
	 * Returns the context menu manager for this view.
	 *
	 * @return the context menu manager for this view, or <code>null</code> if none
	 * @deprecated See AbstractDebugView#getContextMenuManagers()
	 */
	@Deprecated
	public IMenuManager getContextMenuManager();
}

Back to the top