Class TextConsolePage
- All Implemented Interfaces:
- EventListener,- IAdaptable,- IPropertyChangeListener,- IPage,- IPageBookViewPage
 Clients may contribute actions to the context menu of a text console page
 using the org.eclipse.ui.popupMenus extension point. The context
 menu identifier for a text console page is the associated console's type
 suffixed with .#ContextMenu. When a console does not specify
 a type, the context menu id is #ContextMenu.
 
Clients may subclass this class.
- Since:
- 3.1
- 
Field SummaryFields
- 
Constructor SummaryConstructorsConstructorDescriptionTextConsolePage(TextConsole console, IConsoleView view) Constructs a text console page for the given console in the given view.
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidprotected voidcontextMenuAboutToShow(IMenuManager menuManager) Fill the context menuprotected voidCreates actions.voidcreateControl(Composite parent) Creates the SWT control for this page under the given parent control.protected TextConsoleViewercreateViewer(Composite parent) Returns a viewer used to display the contents of this page's console.voiddispose()Disposes of this page.<T> TgetAdapter(Class<T> required) Returns an object which is an instance of the given class associated with this object.protected IConsoleReturns the console this page is displaying.protected IConsoleViewReturns the view this page is contained in.Returns the SWT control for this page.getSite()Returns the site for this page.Returns the viewer contained in this page.voidInitializes this page with the given page site.voidNotification that a property has changed.voidsetActionBars(IActionBars actionBars) Allows the page to make contributions to the given action bars.voidsetFocus()Asks this page to take focus within its pagebook view.protected voidsetGlobalAction(IActionBars actionBars, String actionID, IAction action) Configures an action for key bindings.voidsetViewer(TextConsoleViewer viewer) Sets the viewer contained in this page.protected voidupdateAction(String actionId) Updates the global action with the given idprotected voidUpdates selection dependent actions.
- 
Field Details- 
fGlobalActions
- 
fSelectionActions
- 
fClearOutputAction
 
- 
- 
Constructor Details- 
TextConsolePageConstructs a text console page for the given console in the given view.- Parameters:
- console- text console
- view- console view the page is contained in
 
 
- 
- 
Method Details- 
createViewerReturns a viewer used to display the contents of this page's console.- Parameters:
- parent- container for the viewer
- Returns:
- a viewer used to display the contents of this page's console
 
- 
getSiteDescription copied from interface:IPageBookViewPageReturns the site for this page. May benullif no site has been set.- Specified by:
- getSitein interface- IPageBookViewPage
- Returns:
- the page site or null
 
- 
initDescription copied from interface:IPageBookViewPageInitializes this page with the given page site.This method is automatically called by the workbench shortly after page construction. It marks the start of the pages's lifecycle. Clients must not call this method. - Specified by:
- initin interface- IPageBookViewPage
- Parameters:
- pageSite- the page site
- Throws:
- PartInitException- if this page was not initialized successfully
 
- 
updateSelectionDependentActionsprotected void updateSelectionDependentActions()Updates selection dependent actions.
- 
createControlDescription copied from interface:IPageCreates the SWT control for this page under the given parent control.Clients should not call this method (the workbench calls this method when it needs to, which may be never). - Specified by:
- createControlin interface- IPage
- Parameters:
- parent- the parent control
 
- 
disposepublic void dispose()Description copied from interface:IPageDisposes of this page.This is the last method called on the IPage. Implementors should clean up any resources associated with the page.Callers of this method should ensure that the page's control (if it exists) has been disposed before calling this method. However, for backward compatibilty, implementors must also ensure that the page's control has been disposed before this method returns. Note that there is no guarantee that createControl() has been called, so the control may never have been created. 
- 
getControlDescription copied from interface:IPageReturns the SWT control for this page.- Specified by:
- getControlin interface- IPage
- Returns:
- the SWT control for this page, or nullif this page does not have a control
 
- 
setActionBarsDescription copied from interface:IPageAllows the page to make contributions to the given action bars. The contributions will be visible when the page is visible.This method is automatically called shortly after createControlis called- Specified by:
- setActionBarsin interface- IPage
- Parameters:
- actionBars- the action bars for this page
 
- 
setFocuspublic void setFocus()Description copied from interface:IPageAsks this page to take focus within its pagebook view.
- 
propertyChangeDescription copied from interface:IPropertyChangeListenerNotification that a property has changed.This method gets called when the observed object fires a property change event. - Specified by:
- propertyChangein interface- IPropertyChangeListener
- Parameters:
- event- the property change event object describing which property changed and how
 
- 
createActionsprotected void createActions()Creates actions.
- 
setGlobalActionConfigures an action for key bindings.- Parameters:
- actionBars- action bars for this page
- actionID- action definition id
- action- associated action
 
- 
getAdapterDescription copied from interface:IAdaptableReturns an object which is an instance of the given class associated with this object. Returnsnullif no such object can be found.Clients may implement this method but should generally call Adapters.adapt(Object, Class, boolean)rather than invoking it directly.- Specified by:
- getAdapterin interface- IAdaptable
- Type Parameters:
- T- the class type
- Parameters:
- required- 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
 
- 
getConsoleViewReturns the view this page is contained in.- Returns:
- the view this page is contained in
 
- 
getConsoleReturns the console this page is displaying.- Returns:
- the console this page is displaying
 
- 
updateActionUpdates the global action with the given id- Parameters:
- actionId- action definition id
 
- 
contextMenuAboutToShowFill the context menu- Parameters:
- menuManager- menu
 
- 
configureToolBar
- 
getViewerReturns the viewer contained in this page.- Returns:
- the viewer contained in this page
 
- 
setViewerSets the viewer contained in this page.- Parameters:
- viewer- text viewer
 
 
-