|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A view is a visual component within a workbench page. It is typically used to navigate a hierarchy of information (like the workspace), open an editor, or display properties for the active editor. Modifications made in a view are saved immediately (in contrast to an editor part, which conforms to a more elaborate open-save-close lifecycle).
Only one instance of a particular view type may exist within a workbench page. This policy is designed to simplify part management for a user.
This interface may be implemented directly. For convenience, a base
implementation is defined in ViewPart
.
A view is added to the workbench in two steps:
Views implement the IAdaptable
interface; extensions
are managed by the platform's adapter manager.
IWorkbenchPage.showView(java.lang.String)
,
ViewPart
Field Summary |
Fields inherited from interface org.eclipse.ui.IWorkbenchPart |
PROP_TITLE |
Method Summary | |
IViewSite |
getViewSite()
Returns the site for this view. |
void |
init(IViewSite site)
Initializes this view with the given view site. |
void |
init(IViewSite site,
IMemento memento)
Initializes this view with the given view site. |
void |
saveState(IMemento memento)
Saves the object state within a memento. |
Methods inherited from interface org.eclipse.ui.IWorkbenchPart |
addPropertyListener, createPartControl, dispose, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener, setFocus |
Methods inherited from interface org.eclipse.core.runtime.IAdaptable |
getAdapter |
Method Detail |
public IViewSite getViewSite()
public void init(IViewSite site) throws PartInitException
This method is automatically called by the workbench shortly after part construction. It marks the start of the views's lifecycle. Clients must not call this method.
site
- the view site
PartInitException
- if this view was not initialized successfullypublic void init(IViewSite site, IMemento memento) throws PartInitException
This method is automatically called by the workbench shortly after part construction. It marks the start of the views's lifecycle. Clients must not call this method.
site
- the view sitememento
- the IViewPart state or null if there is no previous saved state
PartInitException
- if this view was not initialized successfullypublic void saveState(IMemento memento)
memento
- a memento to receive the object state
|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |