|
Eclipse Platform Release 3.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.ui.part.WorkbenchPart org.eclipse.ui.part.ViewPart org.eclipse.ui.part.PageBookView org.eclipse.debug.ui.AbstractDebugView
Common function for views related to debugging. Clients implementing views for a debugger should subclass this class. Common function includes:
This class may be subclassed.
Nested Class Summary |
Nested classes inherited from class org.eclipse.ui.part.PageBookView |
PageBookView.PageRec, PageBookView.SelectionProvider |
Field Summary |
Fields inherited from interface org.eclipse.debug.ui.IDebugView |
COPY_ACTION, CUT_ACTION, DOUBLE_CLICK_ACTION, FIND_ACTION, PASTE_ACTION, REMOVE_ACTION, SELECT_ALL_ACTION |
Fields inherited from interface org.eclipse.ui.IWorkbenchPart |
PROP_TITLE |
Constructor Summary | |
AbstractDebugView()
Constructs a new debug view. |
Method Summary | |
void | add(IUpdate updatable)
Adds the given IUpdate to this view's collection of updatable objects. |
void | addContextMenuManager(IMenuManager contextMenuManager)
Adds a context menu manager that is relevant to this view. |
void | asyncExec(Runnable r)
Registers the given runnable with the display associated with this view's control, if any. |
protected void | becomesHidden()
Notification this view is now hidden. |
protected void | becomesVisible()
Notification this view is now visible. |
protected abstract void | configureToolBar(IToolBarManager tbm)
Subclasses implement this menu to contribute actions to the toolbar. |
protected abstract void | createActions()
Creates this view's actions. |
protected void | createContextMenu(Control menuControl)
Creates a pop-up menu on the given control. |
protected IPage | createDefaultPage(PageBook book)
The default page for a debug view is its viewer. |
void | createPartControl(Composite parent)
Creates this view's underlying viewer and actions. |
protected abstract Viewer | createViewer(Composite parent)
Creates and returns this view's underlying viewer. |
protected void | deregisterPartListener()
Deregisters and disposes this event handler's part listener. |
void | dispose()
Disposes of this workbench part. |
protected PageBookView.PageRec | doCreatePage(IWorkbenchPart part)
Creates a new page in the pagebook for a particular part. |
protected void | doDestroyPage(IWorkbenchPart part,
PageBookView.PageRec pageRecord)
Destroys a page in the pagebook for a particular part. |
void | doubleClick(DoubleClickEvent event)
Delegate to the DOUBLE_CLICK_ACTION, if any. |
protected abstract void | fillContextMenu(IMenuManager menu)
Subclasses must override this method to fill the context menu each time it is realized. |
protected IViewPart | findView(String id)
Returns the specified view in this view's page or null if none. |
protected String | generatePreferenceKey(IAction action)
Generate a String that can be used as a key into a preference store based on the specified action. |
IAction | getAction(String actionID)
Returns the action installed under the given action id. |
Object | getAdapter(Class 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 IWorkbenchPart | getBootstrapPart()
Returns the active, important workbench part for this view. |
IMenuManager | getContextMenuManager()
Returns the context menu manager for this view. |
List | getContextMenuManagers()
Returns the context menu managers relevant to this view. |
protected Control | getControl()
Returns the control for this view, or null if none. |
protected Control | getDefaultControl()
Returns the default control for this view. |
protected abstract String | getHelpContextId()
Returns this view's help context id, which is hooked to this view on creation. |
protected IMemento | getMemento()
Returns the memento that contains the persisted state of the view. |
protected MessagePage | getMessagePage()
Returns this view's message page |
protected IPreferenceStore | getPreferenceStore()
Convenience method to return the preference store for the Debug UI plugin. |
IDebugModelPresentation | getPresentation(String id)
Returns the debug model presentation for this view specified by the debug model identifier. |
Map | 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 StructuredViewer | getStructuredViewer()
Returns this view's viewer as a structured viewer, or null if none. |
protected TextViewer | getTextViewer()
Returns this view's viewer as a text viewer, or null if none. |
Viewer | getViewer()
Returns the viewer contained in this debug view. |
protected void | handleKeyPressed(KeyEvent event)
Handles key events in viewer. |
void | init(IViewSite site,
IMemento memento)
Initializes this view with the given view site. |
protected void | initActionState(IAction action)
Restores the persisted checked state of the specified action that was stored in preferences. |
protected void | initializeToolBar()
Configures this view's toolbar. |
boolean | isAvailable()
Returns whether this view's viewer is currently available. |
protected boolean | isImportant(IWorkbenchPart part)
Returns whether the given part should be added to this view. |
boolean | isVisible()
Returns whether this view is currently visible. |
protected void | registerPartListener()
Creates and registers a part listener with this event handler's page, if one does not already exist. |
void | remove(IUpdate updatable)
Removes the given IUpdate from this view's collection of updatable objects. |
protected void | saveAllCheckedActionStates()
Saves the checked state for all actions contributed to the toolbar manager that function as a toggleable action. |
protected void | saveCheckedActionState(IAction action)
Save the checked state of the specified action in the Debug UI plugin's preference store. |
void | setAction(String actionID,
IAction action)
Installs the given action under the given action id. |
protected void | setMemento(IMemento memento)
Sets the memento that contains the persisted state of the view. |
void | showMessage(String message)
Shows the given message in this view's message' page. |
void | showViewer()
Shows this view's viewer page. |
void | syncExec(Runnable r)
Registers the given runnable with the display associated with this view's control, if any. |
void | updateObjects()
Updates all the registered updatables. |
Methods inherited from class org.eclipse.ui.part.PageBookView |
doesPageExist, getCurrentContributingPart, getCurrentPage, getDefaultPage, getPageBook, getPageRec, getPageRec, getPageSite, getSelectionProvider, init, initPage, partActivated, partBroughtToTop, partClosed, partDeactivated, partOpened, setFocus, showPageRec |
Methods inherited from class org.eclipse.ui.part.ViewPart |
getViewSite, saveState, setContentDescription, setInitializationData, setPartName |
Methods inherited from class org.eclipse.ui.part.WorkbenchPart |
addPropertyListener, firePropertyChange, getConfigurationElement, getContentDescription, getDefaultImage, getPartName, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener, setSite, setTitle, setTitleImage, setTitleToolTip, showBusy |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.eclipse.ui.IViewPart |
getViewSite, init, saveState |
Methods inherited from interface org.eclipse.ui.IWorkbenchPart |
addPropertyListener, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener, setFocus |
Constructor Detail |
public AbstractDebugView()
Method Detail |
public Object getAdapter(Class adapter)
public void createPartControl(Composite parent)
protected IPage createDefaultPage(PageBook book)
protected abstract Viewer createViewer(Composite parent)
protected abstract void createActions()
protected abstract String getHelpContextId()
public void dispose()
This is the last method called on the IWorkbenchPart. At this point the part controls (if they were ever created) have been disposed as part of an SWT composite. There is no guarantee that createPartControl() has been called, so the part controls may never have been created.
Within this method a part may release any resources, fonts, images, etc. held by this part. It is also very important to deregister all listeners from the workbench.
Clients should not call this method (the workbench calls this method at appropriate times).
protected void saveAllCheckedActionStates()
protected void saveCheckedActionState(IAction action)
protected String generatePreferenceKey(IAction action)
protected IPreferenceStore getPreferenceStore()
public Viewer getViewer()
protected StructuredViewer getStructuredViewer()
protected TextViewer getTextViewer()
public IDebugModelPresentation getPresentation(String id)
protected void createContextMenu(Control menuControl)
public IMenuManager getContextMenuManager()
public List getContextMenuManagers()
protected abstract void fillContextMenu(IMenuManager menu)
protected void initializeToolBar()
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.
protected void initActionState(IAction action)
public void init(IViewSite site, IMemento memento) throws PartInitException
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.
protected abstract void configureToolBar(IToolBarManager tbm)
public void setAction(String actionID, IAction action)
public IAction getAction(String actionID)
public void updateObjects()
protected void handleKeyPressed(KeyEvent event)
public void doubleClick(DoubleClickEvent event)
public void asyncExec(Runnable r)
protected Control getControl()
public void syncExec(Runnable r)
protected IMemento getMemento()
protected void setMemento(IMemento memento)
protected IViewPart findView(String id)
protected boolean isImportant(IWorkbenchPart part)
Subclasses must implement this method.
protected PageBookView.PageRec doCreatePage(IWorkbenchPart part)
Subclasses must implement this method.
Subclasses must call initPage with the new page (if it is an IPageBookViewPage) before calling createControl on the page.
protected void doDestroyPage(IWorkbenchPart part, PageBookView.PageRec pageRecord)
Subclasses must implement this method.
protected IWorkbenchPart getBootstrapPart()
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 null if none found.
Subclasses must implement this method.
protected Control getDefaultControl()
protected MessagePage getMessagePage()
public void showMessage(String message)
public void showViewer()
public boolean isAvailable()
public void add(IUpdate updatable)
public void remove(IUpdate updatable)
public void addContextMenuManager(IMenuManager contextMenuManager)
protected void becomesVisible()
protected void becomesHidden()
public boolean isVisible()
protected void registerPartListener()
protected void deregisterPartListener()
public Map getPresentationAttributes(String modelId)
|
Eclipse Platform Release 3.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2004. All rights reserved.