Package org.eclipse.ui.console
Class AbstractConsole
java.lang.Object
org.eclipse.ui.console.AbstractConsole
- All Implemented Interfaces:
- IConsole
- Direct Known Subclasses:
- TextConsole
Common function for consoles.
 
Clients implementing consoles should subclass this class.
- Since:
- 3.0
- 
Constructor SummaryConstructorsConstructorDescriptionAbstractConsole(String name, String type, ImageDescriptor imageDescriptor, boolean autoLifecycle) Constructs a new console with the given name, type, image and lifecycle.AbstractConsole(String name, ImageDescriptor imageDescriptor) Constructs a new console with the given name and image.AbstractConsole(String name, ImageDescriptor imageDescriptor, boolean autoLifecycle) Constructs a new console with the given name and image.
- 
Method SummaryModifier and TypeMethodDescriptionvoidactivate()Shows this console in all console views.voidAdds a listener for changes to properties of this console.final voiddestroy()Disposes this console.protected voiddispose()Called when this console is removed from the console manager.voidfirePropertyChange(Object source, String property, Object oldValue, Object newValue) Notify all listeners that the given property has changed.Returns the help context identifier for this console, ornullif none.Returns an image descriptor for this console, ornullif none.getName()Returns the name of this console.getType()Returns a unique identifier for this console's type, ornullif unspecified.protected voidinit()Called when this console is added to the console manager.final voidInitializes this console.voidRemoves the given property listener from this console page.protected voidsetImageDescriptor(ImageDescriptor imageDescriptor) Sets the image descriptor for this console to the specified value and notifies property listeners of the change.protected voidSets the name of this console to the specified value and notifies property listeners of the change.protected voidSets this console's type identifier.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.ui.console.IConsolecreatePage
- 
Constructor Details- 
AbstractConsoleConstructs a new console with the given name and image.- Parameters:
- name- console name, cannot be- null
- imageDescriptor- image descriptor, or- nullif none
- autoLifecycle- whether this console's lifecycle methods should be called automatically when it is added (- initialize()) and removed (- destroy()) from the console manager. When- false, clients are responsible for calling the lifecycle methods.
- Since:
- 3.1
 
- 
AbstractConsolepublic AbstractConsole(String name, String type, ImageDescriptor imageDescriptor, boolean autoLifecycle) Constructs a new console with the given name, type, image and lifecycle.- Parameters:
- name- console name, cannot be- null
- type- console type identifier or- null
- imageDescriptor- image descriptor, or- nullif none
- autoLifecycle- whether this console's lifecycle methods should be called automatically when it is added (- initialize()) and removed (- destroy()) from the console manager. When- false, clients are responsible for calling the lifecycle methods.
- Since:
- 3.1
 
- 
AbstractConsoleConstructs a new console with the given name and image. The console's lifecycle methodsinit()anddispose()will be called when the console is added and removed from the console manager.- Parameters:
- name- console name, cannot be- null
- imageDescriptor- image descriptor, or- nullif none
 
 
- 
- 
Method Details- 
getNameDescription copied from interface:IConsoleReturns the name of this console.
- 
setNameSets the name of this console to the specified value and notifies property listeners of the change.- Parameters:
- name- the new name
 
- 
getImageDescriptorDescription copied from interface:IConsoleReturns an image descriptor for this console, ornullif none.- Specified by:
- getImageDescriptorin interface- IConsole
- Returns:
- an image descriptor for this console, or nullif none
 
- 
setImageDescriptorSets the image descriptor for this console to the specified value and notifies property listeners of the change.- Parameters:
- imageDescriptor- the new image descriptor
 
- 
addPropertyChangeListenerDescription copied from interface:IConsoleAdds a listener for changes to properties of this console. Has no effect if an identical listener is already registered.The changes supported by the console view are as follows: - IBasicPropertyConstants.P_TEXT- indicates the name of a console has changed
- IBasicPropertyConstants.P_IMAGE- indicates the image of a console has changed
 Consoles may define additional properties as required. - Specified by:
- addPropertyChangeListenerin interface- IConsole
- Parameters:
- listener- a property change listener
 
- 
removePropertyChangeListenerDescription copied from interface:IConsoleRemoves the given property listener from this console page. Has no effect if an identical listener is not already registered.- Specified by:
- removePropertyChangeListenerin interface- IConsole
- Parameters:
- listener- a property listener
 
- 
firePropertyChangeNotify all listeners that the given property has changed.- Parameters:
- source- the object on which a property has changed
- property- identifier of the property that has changed
- oldValue- the old value of the property, or- null
- newValue- the new value of the property, or- null
 
- 
initializepublic final void initialize()Initializes this console. This method should only be called by clients managing a console's lifecycle, otherwise this method will be called automatically when this console is added to the console manager. The method is called once to initialize this console, marking the beginning of its lifecycle.- Since:
- 3.1
 
- 
initprotected void init()Called when this console is added to the console manager. Default implementation does nothing. Subclasses may override.Since 3.1, this method is only called automatically if this console was created with an automatic lifecycle. 
- 
destroypublic final void destroy()Disposes this console. This method should only be called by clients managing a console's lifecycle, otherwise this method will be called automatically when this console is removed from the console manager. The method is called once to dispose this console, after which this console will no longer be used.- Since:
- 3.1
 
- 
disposeprotected void dispose()Called when this console is removed from the console manager. Default implementation does nothing. Subclasses may override.Since 3.1, this methods is only called automatically if this console was created with an automatic lifecycle. 
- 
activatepublic void activate()Shows this console in all console views. This console will be become visible if another console is currently pinned.- Since:
- 3.1
 
- 
setTypeSets this console's type identifier.- Parameters:
- typeIdentifier- the type identifier for this console
- Since:
- 3.1
 
- 
getTypeDescription copied from interface:IConsoleReturns a unique identifier for this console's type, ornullif unspecified.
- 
getHelpContextIdReturns the help context identifier for this console, ornullif none. When a non-nullvalue is returned the associated help will be installed for this console.- Returns:
- help context id or null
- Since:
- 3.2
 
 
-