Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.ui.console
Class TextConsolePage


java.lang.Object
  extended by 
org.eclipse.ui.console.TextConsolePage
All Implemented Interfaces:
EventListener, IAdaptable, IPropertyChangeListener, IPage, IPageBookViewPage

public class TextConsolePage
extends Object
implements IPageBookViewPage, IPropertyChangeListener, IAdaptable

A page for a text console.

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 Summary
protected   ClearOutputAction fClearOutputAction
           
protected   Map fGlobalActions
           
protected   ArrayList fSelectionActions
           
 
Constructor Summary
TextConsolePage ( TextConsole console, IConsoleView view)
          Constructs a text console page for the given console in the given view.
 
Method Summary
protected  void configureToolBar ( IToolBarManager mgr)
           
protected  void contextMenuAboutToShow ( IMenuManager menuManager)
          Fill the context menu
protected  void createActions ()
          Creates actions.
 void createControl ( Composite parent)
          Creates the SWT control for this page under the given parent control.
protected   TextConsoleViewer createViewer ( Composite parent)
          Returns a viewer used to display the contents of this page's console.
 void dispose ()
          Disposes of this page.
  Object getAdapter ( Class required)
          Returns an object which is an instance of the given class associated with this object.
protected   IConsole getConsole ()
          Returns the console this page is displaying.
protected   IConsoleView getConsoleView ()
          Returns the view this page is contained in.
  Control getControl ()
          Returns the SWT control for this page.
  IPageSite getSite ()
          Returns the site for this page.
  TextConsoleViewer getViewer ()
          Returns the viewer contained in this page.
 void init ( IPageSite pageSite)
          Initializes this page with the given page site.
 void propertyChange ( PropertyChangeEvent event)
          Notification that a property has changed.
 void setActionBars ( IActionBars actionBars)
          Allows the page to make contributions to the given action bars.
 void setFocus ()
          Asks this page to take focus within its pagebook view.
protected  void setGlobalAction ( IActionBars actionBars, String actionID, IAction action)
          Configures an action for key bindings.
 void setViewer ( TextConsoleViewer viewer)
          Sets the viewer contained in this page.
protected  void updateAction ( String actionId)
          Updates the global action with the given id
protected  void updateSelectionDependentActions ()
          Updates selection dependent actions.
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fGlobalActions

protected 
Map fGlobalActions

fSelectionActions

protected 
ArrayList fSelectionActions

fClearOutputAction

protected 
ClearOutputAction fClearOutputAction
Constructor Detail

TextConsolePage

public TextConsolePage(
TextConsole console,
                       
IConsoleView view)
Constructs 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 Detail

createViewer

protected 
TextConsoleViewer createViewer(
Composite parent)
Returns 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

getSite

public 
IPageSite getSite()
Description copied from interface: IPageBookViewPage
Returns the site for this page. May be null if no site has been set.

Specified by:
getSite in interface IPageBookViewPage
Returns:
the page site or null

init

public void init(
IPageSite pageSite)
          throws 
PartInitException
Description copied from interface: IPageBookViewPage
Initializes 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:
init in interface IPageBookViewPage
Parameters:
pageSite - the page site
Throws:
PartInitException - if this page was not initialized successfully

updateSelectionDependentActions

protected void updateSelectionDependentActions()
Updates selection dependent actions.


createControl

public void createControl(
Composite parent)
Description copied from interface: IPage
Creates 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:
createControl in interface IPage
Parameters:
parent - the parent control

dispose

public void dispose()
Description copied from interface: IPage
Disposes 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.

Specified by:
dispose in interface IPage

getControl

public 
Control getControl()
Description copied from interface: IPage
Returns the SWT control for this page.

Specified by:
getControl in interface IPage
Returns:
the SWT control for this page, or null if this page does not have a control

setActionBars

public void setActionBars(
IActionBars actionBars)
Description copied from interface: IPage
Allows 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 createControl is called

Specified by:
setActionBars in interface IPage
Parameters:
actionBars - the action bars for this page

setFocus

public void setFocus()
Description copied from interface: IPage
Asks this page to take focus within its pagebook view.

Specified by:
setFocus in interface IPage

propertyChange

public void propertyChange(
PropertyChangeEvent event)
Description copied from interface: IPropertyChangeListener
Notification that a property has changed.

This method gets called when the observed object fires a property change event.

Specified by:
propertyChange in interface IPropertyChangeListener
Parameters:
event - the property change event object describing which property changed and how

createActions

protected void createActions()
Creates actions.


setGlobalAction

protected void setGlobalAction(
IActionBars actionBars,
                               
String actionID,
                               
IAction action)
Configures an action for key bindings.

Parameters:
actionBars - action bars for this page
actionID - action definition id
action - associated action

getAdapter

public 
Object getAdapter(
Class required)
Description copied from interface: IAdaptable
Returns an object which is an instance of the given class associated with this object. Returns null if no such object can be found.

Specified by:
getAdapter in interface IAdaptable
Parameters:
required - the adapter class to look up
Returns:
a object castable to the given class, or null if this object does not have an adapter for the given class

getConsoleView

protected 
IConsoleView getConsoleView()
Returns the view this page is contained in.

Returns:
the view this page is contained in

getConsole

protected 
IConsole getConsole()
Returns the console this page is displaying.

Returns:
the console this page is displaying

updateAction

protected void updateAction(
String actionId)
Updates the global action with the given id

Parameters:
actionId - action definition id

contextMenuAboutToShow

protected void contextMenuAboutToShow(
IMenuManager menuManager)
Fill the context menu

Parameters:
menuManager - menu

configureToolBar

protected void configureToolBar(
IToolBarManager mgr)

getViewer

public 
TextConsoleViewer getViewer()
Returns the viewer contained in this page.

Returns:
the viewer contained in this page

setViewer

public void setViewer(
TextConsoleViewer viewer)
Sets the viewer contained in this page.

Parameters:
viewer - text viewer

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire