Package com.iizigo.term
Class TerminalView
java.lang.Object
org.eclipse.core.commands.common.EventManager
org.eclipse.ui.part.WorkbenchPart
org.eclipse.ui.part.ViewPart
com.iizigo.term.TerminalView
- All Implemented Interfaces:
- IActivationListener,- IWorkbenchPartIZ,- ITerminalStateListener,- IDisposedPart,- IAdaptable,- IExecutableExtension,- IPersistable,- IViewPart,- IWorkbenchPart,- IWorkbenchPart2,- IWorkbenchPart3,- IWorkbenchPartOrientation
public class TerminalView extends ViewPart implements ITerminalStateListener, IActivationListener, IWorkbenchPartIZ
The Terminal View Part shows one terminal session.
- Author:
- Christopher Mindus
- Field SummaryFieldsModifier and TypeFieldDescription- static final StringThe Terminal Sessions View Part ID "com.iizigo.term.TerminalView".- Fields inherited from interface org.eclipse.ui.IWorkbenchPart- PROP_TITLE
- Constructor SummaryConstructors
- Method SummaryModifier and TypeMethodDescription- static void- createOrShow- (Shell shell, EditorTerminalProps props) Creates a TerminalView for properties, or shows an existing one.- void- createPartControl- (Composite parent) Create contents of the view part.- void- dispose()Disposes of the view part.Gets the extensions framework.Gets the selection enabler instance.Gets the undo context.- booleanChecks if a host session is created.- voidInitializes this view with the given view site.- voidInitializes this view with the given view site.- booleanChecks if the part is disposed of.- void- onActivated- (boolean on) Called when activator or deactivated.- void- onClose()Called when about to close, but SWT is still there.- void- onTerminalFieldChanged- (HostSession hostSession, TerminalWindow tw) Called when the screen needs updates due to field change.- void- onTerminalStateUpdate- (HostSession hostSession, TerminalWindow tw) Called when state probably needs update or check.- voidSaves the object state within a memento.- void- setFocus()Sets focus to the terminal.- voidCalled when states needs to be updated.- Methods inherited from class org.eclipse.ui.part.ViewPart- checkSite, getViewSite, setContentDescription, setInitializationData, setPartName- Methods inherited from class org.eclipse.ui.part.WorkbenchPart- addPartPropertyListener, addPropertyListener, firePartPropertyChanged, firePropertyChange, getAdapter, getConfigurationElement, getContentDescription, getDefaultImage, getOrientation, getPartName, getPartProperties, getPartProperty, getSite, getTitle, getTitleImage, getTitleToolTip, removePartPropertyListener, removePropertyListener, setPartProperty, setSite, setTitle, setTitleImage, setTitleToolTip, showBusy- Methods inherited from class org.eclipse.core.commands.common.EventManager- addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject- Methods inherited from class java.lang.Object- clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait- Methods inherited from interface org.eclipse.core.runtime.IAdaptable- getAdapter- Methods inherited from interface org.eclipse.ui.IWorkbenchPart- addPropertyListener, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener- Methods inherited from interface com.iizigo.editor.IWorkbenchPartIZ- onComponentFocused
- Field Details- IDThe Terminal Sessions View Part ID "com.iizigo.term.TerminalView".
 
- Constructor Details- TerminalViewpublic TerminalView()Eclipse constructor.
 
- Method Details- createOrShowCreates a TerminalView for properties, or shows an existing one.- Parameters:
- shell- The shell.
- props- The terminal properties.
 
- hasHostSessionpublic boolean hasHostSession()Checks if a host session is created.- Returns:
- true if there is a session created, false otherwise.
 
- initInitializes this view with the given view site.- This method is automatically called by the workbench shortly after the part is instantiated. It marks the start of the views's life cycle. Clients must not call this method. - Specified by:
- initin interface- IViewPart
- Overrides:
- initin class- ViewPart
- Parameters:
- site- The view site.
- Throws:
- PartInitException- if this view was not initialized successfully.
 
- initInitializes 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 life cycle. 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.
 
- saveStateSaves the object state within a memento.
- createPartControlCreate contents of the view part.- Specified by:
- createPartControlin interface- IWorkbenchPart
- Specified by:
- createPartControlin class- WorkbenchPart
- Parameters:
- parent- The parent composite.
 
- disposepublic void dispose()Disposes of the view part.- Specified by:
- disposein interface- IWorkbenchPart
- Overrides:
- disposein class- WorkbenchPart
 
- getExtensionGets the extensions framework.- Specified by:
- getExtensionin interface- IWorkbenchPartIZ
 
- getSelectionEnablerGets the selection enabler instance.- Specified by:
- getSelectionEnablerin interface- IWorkbenchPartIZ
 
- isDisposedpublic boolean isDisposed()Checks if the part is disposed of.- Specified by:
- isDisposedin interface- IActivationListener
- Specified by:
- isDisposedin interface- IDisposedPart
- Specified by:
- isDisposedin interface- IWorkbenchPartIZ
- Returns:
- true if disposed of, false otherwise.
 
- setFocuspublic void setFocus()Sets focus to the terminal.- Specified by:
- setFocusin interface- IWorkbenchPart
- Specified by:
- setFocusin class- WorkbenchPart
 
- onTerminalStateUpdateCalled when state probably needs update or check.- Specified by:
- onTerminalStateUpdatein interface- ITerminalStateListener
- Parameters:
- hostSession- The host session, may be null.
- tw- The TerminalWindow, may be null when hostSession is null, not otherwise.
 
- onTerminalFieldChangedCalled when the screen needs updates due to field change.- Specified by:
- onTerminalFieldChangedin interface- ITerminalStateListener
- Parameters:
- hostSession- The host session, may be null.
- tw- The TerminalWindow, may be null when hostSession is null, not otherwise.
 
- updateStatespublic void updateStates()Called when states needs to be updated.- Specified by:
- updateStatesin interface- IActivationListener
 
- onActivatedpublic void onActivated- (boolean on) Called when activator or deactivated.- Specified by:
- onActivatedin interface- IActivationListener
 
- onClosepublic void onClose()Called when about to close, but SWT is still there.- Specified by:
- onClosein interface- IActivationListener
 
- getUndoRedoGets the undo context.- Specified by:
- getUndoRedoin interface- IWorkbenchPartIZ