KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > debug > ui > IDebugView


1 /*******************************************************************************
2  * Copyright (c) 2000, 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.ui;
12
13
14 import org.eclipse.jface.action.IAction;
15 import org.eclipse.jface.action.IMenuManager;
16 import org.eclipse.jface.viewers.Viewer;
17 import org.eclipse.ui.IViewPart;
18 import org.eclipse.ui.actions.ActionFactory;
19 import org.eclipse.ui.texteditor.IUpdate;
20
21 /**
22  * Common function for debug views. Provides access to the underlying viewer and
23  * debug model presentation being used by a viewer. This allows clients to do
24  * such things as add and remove filters to a viewer, and configure a debug
25  * model presentation.
26  * <p>
27  * Clients may implement this interface. Generally, clients should subclass
28  * <code>AbstractDebugView</code> when creating a new debug view.
29  * </p>
30  * @see org.eclipse.core.runtime.IAdaptable
31  * @see org.eclipse.debug.ui.IDebugModelPresentation
32  * @see org.eclipse.debug.ui.AbstractDebugView
33  * @since 2.0
34  */

35
36 public interface IDebugView extends IViewPart {
37     
38     /**
39      * Action id for a view's copy action. Any view
40      * with a copy action that should be invoked when
41      * CTRL+C is pressed should store their
42      * copy action with this key.
43      *
44      * @see #setAction(String, IAction)
45      */

46     public static final String JavaDoc COPY_ACTION = ActionFactory.COPY.getId();
47
48     /**
49      * Action id for a view's cut action. Any view
50      * with a cut action that should be invoked when
51      * CTRL+X is pressed should store their
52      * copy action with this key.
53      *
54      * @see #setAction(String, IAction)
55      */

56     public static final String JavaDoc CUT_ACTION = ActionFactory.CUT.getId();
57
58     /**
59      * Action id for a view's double-click action. Any view
60      * with an action that should be invoked when
61      * the mouse is double-clicked should store their
62      * action with this key.
63      *
64      * @see #setAction(String, IAction)
65      */

66     public static final String JavaDoc DOUBLE_CLICK_ACTION = "Double_Click_ActionId"; //$NON-NLS-1$
67

68     /**
69      * Action id for a view's find action. Any view
70      * with a find action that should be invoked when
71      * CTRL+F is pressed should store their
72      * copy action with this key.
73      *
74      * @see #setAction(String, IAction)
75      */

76     public static final String JavaDoc FIND_ACTION = ActionFactory.FIND.getId();
77
78     /**
79      * Action id for a view's paste action. Any view
80      * with a paste action that should be invoked when
81      * CTRL+V is pressed should store their
82      * copy action with this key.
83      *
84      * @see #setAction(String, IAction)
85      */

86     public static final String JavaDoc PASTE_ACTION = ActionFactory.PASTE.getId();
87
88     /**
89      * Action id for a view's remove action. Any view
90      * with a remove action that should be invoked when
91      * the delete key is pressed should store their
92      * remove action with this key.
93      *
94      * @see #setAction(String, IAction)
95      */

96     public static final String JavaDoc REMOVE_ACTION = "Remove_ActionId"; //$NON-NLS-1$
97

98     /**
99      * Action id for a view's select all action. Any view
100      * with a select all action that should be invoked when
101      * CTRL+A is pressed should store their
102      * select all action with this key.
103      *
104      * @see #setAction(String, IAction)
105      */

106     public static final String JavaDoc SELECT_ALL_ACTION = ActionFactory.SELECT_ALL.getId();
107     
108     /**
109      * Returns the viewer contained in this debug view.
110      *
111      * @return viewer
112      */

113     public Viewer getViewer();
114     
115     /**
116      * Returns the debug model presentation for this view specified
117      * by the debug model identifier.
118      *
119      * @param id the debug model identifier that corresponds to the <code>id</code>
120      * attribute of a debug model presentation extension
121      * @return the debug model presentation, or <code>null</code> if no
122      * presentation is registered for the specified id
123      */

124     public IDebugModelPresentation getPresentation(String JavaDoc id);
125     
126     /**
127      * Installs the given action under the given action id.
128      *
129      * If the action has an id that maps to one of the global
130      * action ids defined by this interface, the action is registered
131      * as a global action handler.
132      *
133      * If the action is an instance of <code>IUpdate</code> it is added/remove
134      * from the collection of updateables associated with this view.
135      *
136      * @param actionID the action id
137      * @param action the action, or <code>null</code> to clear it
138      * @see #getAction
139      */

140     public void setAction(String JavaDoc actionID, IAction action);
141     
142     /**
143      * Adds the given IUpdate to this view's collection of updatable
144      * objects. Allows the view to periodically update these registered
145      * objects.
146      * Has no effect if an identical IUpdate is already registered.
147      *
148      * @param updatable The IUpdate instance to be added
149      */

150     public void add(IUpdate updatable);
151     
152     /**
153      * Removes the given IUpdate from this view's collection of updatable
154      * objects.
155      * Has no effect if an identical IUpdate was not already registered.
156      *
157      * @param updatable The IUpdate instance to be removed
158      */

159     public void remove(IUpdate updatable);
160     
161     /**
162      * Returns the action installed under the given action id.
163      *
164      * @param actionID the action id
165      * @return the action, or <code>null</code> if none
166      * @see #setAction
167      */

168     public IAction getAction(String JavaDoc actionID);
169     
170     /**
171      * Returns the context menu manager for this view.
172      *
173      * @return the context menu manager for this view, or <code>null</code> if none
174      * @deprecated See AbstractDebugView#getContextMenuManagers()
175      */

176     public IMenuManager getContextMenuManager();
177 }
178
Popular Tags