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:
- A view extension is contributed to the workbench registry. This extension defines the extension id and extension class.
- The view is included in the default layout for a perspective. Alternatively, the user may open the view from the Perspective menu.
Views implement the IAdaptable
interface; extensions are managed by the platform's adapter manager.
@see IWorkbenchPage#showView
@see org.eclipse.ui.part.ViewPart