Class AbstractDebugView
- All Implemented Interfaces:
- IAdaptable,- IExecutableExtension,- IDebugView,- IDoubleClickListener,- IPartListener,- IPersistable,- IViewPart,- IWorkbenchPart,- IWorkbenchPart2,- IWorkbenchPart3,- IWorkbenchPartOrientation
- Debug view adapter implementation - IDebugView
- Action registry - actions can be stored in this view
                with a key. Actions that implement IUpdateare updated whenupdateActions()is called.
- Hooks the context menu associated with this view's underlying viewer and registers the menu with this view's site, such that other plug-ins may contribute.
- Hooks a key press listener, and invokes the
                REMOVE_ACTIONwhen the delete key is pressed.
- Hooks a double-click listener, and invokes the
                DOUBLE_CLICK_ACTIONwhen the mouse is double-clicked.
- Provides a mechanism for displaying an error message
                in the view, via the PageBookViewmechanism. By default, a page book is created with a page showing this view's viewer. A message page is also created and shown whenshowMessage(String)is called.
- Notification when this view becomes visible and becomes
                hidden via becomesVisible()andbecomesHidden().
- Linking of a help context id via getHelpContextId().
This class may be sub-classed.
- Since:
- 2.0
- 
Nested Class SummaryNested classes/interfaces inherited from class org.eclipse.ui.part.PageBookViewPageBookView.PageRec, PageBookView.SelectionProvider
- 
Field SummaryFields inherited from interface org.eclipse.debug.ui.IDebugViewCOPY_ACTION, CUT_ACTION, DOUBLE_CLICK_ACTION, FIND_ACTION, PASTE_ACTION, REMOVE_ACTION, SELECT_ALL_ACTIONFields inherited from interface org.eclipse.ui.IWorkbenchPartPROP_TITLE
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidAdds the given IUpdate to this view's collection of updatable objects.voidaddContextMenuManager(IMenuManager contextMenuManager) Adds a context menu manager that is relevant to this view.voidRegisters the given runnable with the display associated with this view's control, if any.protected voidNotification this view is now hidden.protected voidNotification this view is now visible.protected abstract voidSubclasses implement this menu to contribute actions to the toolbar.protected abstract voidCreates this view's actions.protected voidcreateContextMenu(Control menuControl) Creates a pop-up menu on the given control.protected IPagecreateDefaultPage(PageBook book) The default page for a debug view is its viewer.voidcreatePartControl(Composite parent) Creates this view's underlying viewer and actions.protected abstract ViewercreateViewer(Composite parent) Creates and returns this view's underlying viewer.protected voidUnregisters and disposes this event handler's part listener.voiddispose()ThePageBookViewimplementation of thisIWorkbenchPartmethod cleans up all the pages.protected PageBookView.PageRecdoCreatePage(IWorkbenchPart part) Creates a new page in the pagebook for a particular part.protected voiddoDestroyPage(IWorkbenchPart part, PageBookView.PageRec pageRecord) Destroys a page in the pagebook for a particular part.voiddoubleClick(DoubleClickEvent event) Delegate to theDOUBLE_CLICK_ACTION, if any.protected abstract voidfillContextMenu(IMenuManager menu) Subclasses must override this method to fill the context menu each time it is realized.protected IViewPartReturns the specified view in this view's page ornullif none.protected StringgeneratePreferenceKey(IAction action) Generate a String that can be used as a key into a preference store based on the specified action.Returns the action installed under the given action id.<T> TgetAdapter(Class<T> adapter) Debug views implement the debug view adapter which provides access to a view's underlying viewer and debug model presentation for a specific debug model.protected IWorkbenchPartReturns the active, important workbench part for this view.Deprecated, for removal: This API element is subject to removal in a future version.Returns the context menu managers relevant to this view.protected ControlReturns the control for this view, ornullif none.protected ControlReturns the default control for this view.protected abstract StringReturns this view's help context id, which is hooked to this view on creation.protected IMementoReturns the memento that contains the persisted state of the view.protected MessagePageReturns this view's message pageprotected IPreferenceStoreConvenience method to return the preference store for the Debug UI plug-in.Returns the debug model presentation for this view specified by the debug model identifier.getPresentationAttributes(String modelId) Returns a map of the current attribute settings in the model presentation in this view associated with the given debug model.protected StructuredViewerReturns this view's viewer as a structured viewer, ornullif none.protected TextViewerReturns this view's viewer as a text viewer, ornullif none.Returns the viewer contained in this debug view.protected voidhandleKeyPressed(KeyEvent event) Handles key events in viewer.voidInitializes this view with the given view site.protected voidinitActionState(IAction action) Restores the persisted checked state of the specified action that was stored in preferences.protected voidConfigures this view's toolbar.booleanReturns whether this view's viewer is currently available.protected booleanisImportant(IWorkbenchPart part) Returns whether the given part should be added to this view.booleanReturns whether this view is currently visible.protected voidCreates and registers a part listener with this event handler's page, if one does not already exist.voidRemoves the given IUpdate from this view's collection of updatable objects.protected voidSaves the checked state for all actions contributed to the toolbar manager that function as a toggle action.protected voidsaveCheckedActionState(IAction action) Save the checked state of the specified action in the Debug UI plugin's preference store.voidInstalls the given action under the given action id.protected voidsetMemento(IMemento memento) Sets the memento that contains the persisted state of the view.protected voidSets the viewer for this view.voidshowMessage(String message) Shows the given message in this view's message' page.voidShows this view's viewer page.voidRegisters the given runnable with the display associated with this view's control, if any.voidUpdates all the registered updatables.Methods inherited from class org.eclipse.ui.part.PageBookViewdoesPageExist, getCurrentContributingPart, getCurrentPage, getDefaultPage, getPageBook, getPageRec, getPageRec, getPageSite, getSelectionProvider, getViewAdapter, init, initPage, partActivated, partBroughtToTop, partClosed, partDeactivated, partHidden, partOpened, partVisible, setFocus, showPageRecMethods inherited from class org.eclipse.ui.part.ViewPartcheckSite, getViewSite, saveState, setContentDescription, setInitializationData, setPartNameMethods inherited from class org.eclipse.ui.part.WorkbenchPartaddPartPropertyListener, addPropertyListener, firePartPropertyChanged, firePropertyChange, getConfigurationElement, getContentDescription, getDefaultImage, getOrientation, getPartName, getPartProperties, getPartProperty, getSite, getTitle, getTitleImage, getTitleToolTip, removePartPropertyListener, removePropertyListener, setPartProperty, setSite, setTitle, setTitleImage, setTitleToolTip, showBusyMethods inherited from class org.eclipse.core.commands.common.EventManageraddListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObjectMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.ui.IViewPartgetViewSite, init, saveStateMethods inherited from interface org.eclipse.ui.IWorkbenchPartaddPropertyListener, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener, setFocus
- 
Constructor Details- 
AbstractDebugViewpublic AbstractDebugView()Constructs a new debug view.
 
- 
- 
Method Details- 
getAdapterDebug views implement the debug view adapter which provides access to a view's underlying viewer and debug model presentation for a specific debug model.- Specified by:
- getAdapterin interface- IAdaptable
- Overrides:
- getAdapterin class- PageBookView
- Type Parameters:
- T- the class type
- Parameters:
- adapter- the adapter class to look up
- Returns:
- a object of the given class, or nullif this object does not have an adapter for the given class
- See Also:
 
- 
createPartControlCreates this view's underlying viewer and actions. Hooks a pop-up menu to the underlying viewer's control, as well as a key listener. When the delete key is pressed, theREMOVE_ACTIONis invoked. Hooks help to this view. Subclasses must implement the following methods which are called in the following order when a view is created:- createViewer(Composite)- the context menu is hooked to the viewer's control.
- createActions()
- configureToolBar(IToolBarManager)
- getHelpContextId()
 - Specified by:
- createPartControlin interface- IWorkbenchPart
- Overrides:
- createPartControlin class- PageBookView
- Parameters:
- parent- the parent control
- See Also:
 
- 
createDefaultPageThe default page for a debug view is its viewer.- Specified by:
- createDefaultPagein class- PageBookView
- Parameters:
- book- the pagebook control
- Returns:
- the default page
- See Also:
 
- 
createViewerCreates and returns this view's underlying viewer. The viewer's control will automatically be hooked to display a pop-up menu that other plug-ins may contribute to. Subclasses must override this method.- Parameters:
- parent- the parent control
- Returns:
- the new Viewer
 
- 
createActionsprotected abstract void createActions()Creates this view's actions. Subclasses must override this method, which is called aftercreateViewer(Composite)
- 
getHelpContextIdReturns this view's help context id, which is hooked to this view on creation.- Returns:
- help context id
 
- 
disposepublic void dispose()Description copied from class:PageBookViewThePageBookViewimplementation of thisIWorkbenchPartmethod cleans up all the pages. Subclasses may extend.- Specified by:
- disposein interface- IWorkbenchPart
- Overrides:
- disposein class- PageBookView
- See Also:
 
- 
saveAllCheckedActionStatesprotected void saveAllCheckedActionStates()Saves the checked state for all actions contributed to the toolbar manager that function as a toggle action. The states are saved in the Debug UI plugin's preference store.- Since:
- 2.1
 
- 
saveCheckedActionStateSave the checked state of the specified action in the Debug UI plugin's preference store. The specified action is expected to be enabled and support the styleIAction.AS_CHECK_BOX.- Parameters:
- action- the enabled, toggle action whose checked state will be saved in preferences
- Since:
- 2.1
 
- 
generatePreferenceKeyGenerate a String that can be used as a key into a preference store based on the specified action. The resulting String will be unique across views.- Parameters:
- action- the action to generate a key for
- Returns:
- a String suitable for use as a preference store key for the given action
- Since:
- 2.1
 
- 
getPreferenceStoreConvenience method to return the preference store for the Debug UI plug-in.- Returns:
- the preference store for the Debug UI plug-in
- Since:
- 2.1
 
- 
getViewerDescription copied from interface:IDebugViewReturns the viewer contained in this debug view.- Specified by:
- getViewerin interface- IDebugView
- Returns:
- viewer
- See Also:
 
- 
getStructuredViewerReturns this view's viewer as a structured viewer, ornullif none.- Returns:
- this view's viewer as a structured viewer
        or null
 
- 
getTextViewerReturns this view's viewer as a text viewer, ornullif none.- Returns:
- this view's viewer as a text viewer
        or null
 
- 
getPresentationDescription copied from interface:IDebugViewReturns the debug model presentation for this view specified by the debug model identifier.- Specified by:
- getPresentationin interface- IDebugView
- Parameters:
- id- the debug model identifier that corresponds to the- idattribute of a debug model presentation extension
- Returns:
- the debug model presentation, or nullif no presentation is registered for the specified id
- See Also:
 
- 
createContextMenuCreates a pop-up menu on the given control. The menu is registered with this view's site, such that other plug-ins may contribute to the menu. Subclasses should call this method, specifying the menu control as the control used in their viewer (for example, tree viewer). Subclasses must implement the method#fillContextMenu(IMenuManager)which will be called each time the context menu is realized.- Parameters:
- menuControl- the control with which the pop-up menu will be associated with.
 
- 
getContextMenuManagerDeprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IDebugViewReturns the context menu manager for this view.- Specified by:
- getContextMenuManagerin interface- IDebugView
- Returns:
- the context menu manager for this view, or nullif none
- See Also:
 
- 
getContextMenuManagersReturns the context menu managers relevant to this view.- Returns:
- the context menu managers relevant to this view
- Since:
- 2.1
 
- 
fillContextMenuSubclasses must override this method to fill the context menu each time it is realized.- Parameters:
- menu- the context menu
 
- 
initializeToolBarprotected void initializeToolBar()Configures this view's toolbar. Subclasses implement#configureToolBar(IToolBarManager)to contribute actions to the toolbar.To properly initialize toggle actions that are contributed to this view, state is restored for toggle actions that have a persisted state in the Debug UI plugin's preferences. As well, any toggle actions that have an initial state of 'checked' are invoked. The actions' states are restored and the actions are invoked in a runnable, after the view is created. 
- 
initActionStateRestores the persisted checked state of the specified action that was stored in preferences. If the action is disabled, its persisted state is not restored (because a disabled action cannot be run).- Parameters:
- action- the action whose checked state will be restored
- Since:
- 2.1
 
- 
initDescription copied from interface:IViewPartInitializes this view with the given view site. A memento is passed to the view which contains a snapshot of the views state from a previous session. Where possible, the view should try to recreate that state within the part controls.This method is automatically called by the workbench shortly after the part is instantiated. It marks the start of the views's lifecycle. Clients must not call this method. - Specified by:
- initin interface- IViewPart
- Overrides:
- initin class- ViewPart
- Parameters:
- site- the view site
- memento- the IViewPart state or null if there is no previous saved state
- Throws:
- PartInitException- if this view was not initialized successfully
- See Also:
 
- 
setViewerSets the viewer for this view.- Parameters:
- viewer- viewer
- Since:
- 3.1
 
- 
configureToolBarSubclasses implement this menu to contribute actions to the toolbar. This method is called aftercreateActions().- Parameters:
- tbm- the tool bar manager for this view's site
- See Also:
 
- 
setActionDescription copied from interface:IDebugViewInstalls 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 ofIUpdateit is added/remove from the collection of updateables associated with this view.- Specified by:
- setActionin interface- IDebugView
- Parameters:
- actionID- the action id
- action- the action, or- nullto clear it
- See Also:
 
- 
getActionDescription copied from interface:IDebugViewReturns the action installed under the given action id.- Specified by:
- getActionin interface- IDebugView
- Parameters:
- actionID- the action id
- Returns:
- the action, or nullif none
- See Also:
 
- 
updateObjectspublic void updateObjects()Updates all the registered updatables.
- 
handleKeyPressedHandles key events in viewer. Invokes- REMOVE_ACTIONwhen the delete key is pressed
 - Parameters:
- event- the- KeyEvent
 
- 
doubleClickDelegate to theDOUBLE_CLICK_ACTION, if any.- Specified by:
- doubleClickin interface- IDoubleClickListener
- Parameters:
- event- event object describing the double-click
- See Also:
 
- 
asyncExecRegisters the given runnable with the display associated with this view's control, if any.- Parameters:
- r- the- Runnableto run
- See Also:
 
- 
getControlReturns the control for this view, ornullif none.- Returns:
- the control for this view, or nullif none
- Since:
- 3.0
 
- 
syncExecRegisters the given runnable with the display associated with this view's control, if any.- Parameters:
- r- the- Runnableto run
- See Also:
 
- 
getMementoReturns the memento that contains the persisted state of the view. May benull.- Returns:
- the current IMemento
 
- 
setMementoSets the memento that contains the persisted state of the view.- Parameters:
- memento- the new- IMemento
 
- 
findViewReturns the specified view in this view's page ornullif none.- Parameters:
- id- view identifier
- Returns:
- view part
 
- 
isImportantDescription copied from class:PageBookViewReturns whether the given part should be added to this view.Subclasses must implement this method. - Specified by:
- isImportantin class- PageBookView
- Parameters:
- part- the input part
- Returns:
- trueif the part is relevant, and- falseotherwise
- See Also:
 
- 
doCreatePageDescription copied from class:PageBookViewCreates a new page in the pagebook for a particular part. This page will be made visible whenever the part is active, and will be destroyed with a call todoDestroyPage.Subclasses must implement this method. Subclasses must call initPage with the new page (if it is an IPageBookViewPage) before calling createControl on the page.- Specified by:
- doCreatePagein class- PageBookView
- Parameters:
- part- the input part
- Returns:
- the record describing a new page for this view
- See Also:
 
- 
doDestroyPageDescription copied from class:PageBookViewDestroys a page in the pagebook for a particular part. This page was returned as a result fromdoCreatePage.Subclasses must implement this method. - Specified by:
- doDestroyPagein class- PageBookView
- Parameters:
- part- the input part
- pageRecord- a page record for the part
- See Also:
 
- 
getBootstrapPartDescription copied from class:PageBookViewReturns the active, important workbench part for this view.When the page book view is created it has no idea which part within the workbook should be used to generate the first page. Therefore, it delegates the choice to subclasses of PageBookView.Implementors of this method should return an active, important part in the workbench or nullif none found.Subclasses must implement this method. - Specified by:
- getBootstrapPartin class- PageBookView
- Returns:
- the active important part, or nullif none
- See Also:
 
- 
getDefaultControlReturns the default control for this view. By default, this view's viewer's control is returned. Subclasses should override if required - for example, if this view has its viewer nested inside other controls.- Returns:
- this view's default control.
 
- 
getMessagePageReturns this view's message page- Returns:
- message page
 
- 
showMessageShows the given message in this view's message' page. Makes the message page the visible page.- Parameters:
- message- the message to display
 
- 
showViewerpublic void showViewer()Shows this view's viewer page.
- 
isAvailablepublic boolean isAvailable()Returns whether this view's viewer is currently available.- Returns:
- whether this view's viewer is currently available
 
- 
addDescription copied from interface:IDebugViewAdds 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.- Specified by:
- addin interface- IDebugView
- Parameters:
- updatable- The IUpdate instance to be added
- See Also:
 
- 
removeDescription copied from interface:IDebugViewRemoves the given IUpdate from this view's collection of updatable objects. Has no effect if an identical IUpdate was not already registered.- Specified by:
- removein interface- IDebugView
- Parameters:
- updatable- The IUpdate instance to be removed
- See Also:
 
- 
addContextMenuManagerAdds a context menu manager that is relevant to this view.- Parameters:
- contextMenuManager- The contextMenuManager to add
- Since:
- 2.1
 
- 
becomesVisibleprotected void becomesVisible()Notification this view is now visible.- Since:
- 2.1
 
- 
becomesHiddenprotected void becomesHidden()Notification this view is now hidden.- Since:
- 2.1
 
- 
isVisiblepublic boolean isVisible()Returns whether this view is currently visible.- Returns:
- whether this view is currently visible
- Since:
- 2.1
 
- 
registerPartListenerprotected void registerPartListener()Creates and registers a part listener with this event handler's page, if one does not already exist.- Since:
- 2.1
 
- 
deregisterPartListenerprotected void deregisterPartListener()Unregisters and disposes this event handler's part listener.- Since:
- 2.1
 
- 
getPresentationAttributesReturns a map of the current attribute settings in the model presentation in this view associated with the given debug model.- Parameters:
- modelId- the debug model identifier
- Returns:
- a map of the current attribute settings in the model presentation in this view associated with the given debug model
- Since:
- 3.0
 
 
-