-
IWorkbench
public interface IWorkbench
-
extends IAdaptable, IServiceLocator
A workbench is the root object for the eclipse platform user interface.
AWorkbenchHas one or more main windows which present to the end user information based on some underlying model, typically on resources in an underlying workspace. a workbench usually starts with a single
Open window, and automatically closes when its last window closes.
EachWorkbench windowHas a collection
Pages; The active page is the one that is being presented to the end user; at most one page is active in a window at a time.
Each workbench page has a collectionWorkbench parts, Of which there are two kinds: Views and editors. A Page's parts are arranged (tiled or stacked) for presentation on the screen. The arrangement is not fixed;
The user can arrange the parts as they see fit.Perspective
Is a template for a page, capturing a collection of parts and their arrangement.
The platform creates a workbench when the workbench plug-in is activated; since this happens at most once during the life of the running platform, there is only one workbench instance. due to its singular nature, it is commonly referred to
The workbench.
As mentioned above, a workbench contains one or more workbenchwindows (which should be well understood), a workbenchwindow contains many workbenchpages, and a workbenchpage contains many workbenchparts (editor or view ). Perspective is equivalent to the manager used to layout the workbenchpage. It also controls the display of actionsets, newwizardshortcut, viewshortcut, and perspectiveshortcut.
-
IWorkbenchWindow
public interface IWorkbenchWindow
-
extends IPageService, IRunnableContext, IServiceLocator, IShellProvider
A workbench window is a top level window in a workbench. visually, a workbench window has a menubar, a toolbar, a status bar, and a main area for displaying a single page consisting of a collection of views and editors.
Each workbench window has a collection of 0 or more pages; the active page is the one that is being presented to the end user; at most one page is active in a window at a time.
Note: A workbenchwindow contains 0 or multiple workbenchpages. In addition, according to my tests, a workbenchwindow can contain at most one workbenchpage.
Iworkbenchpage
Public interfaceIworkbenchpage
-
-
Extends ipartservice, iselectionservice, org. Eclipse. UI. Internal. icompatibleworkbenchpage
A workbench page consists of an arrangement of views and editors intended to be presented together to the user in a single workbench window.
A page can contain 0 or more views and 0 or more editors. these views and editors are contained wholly within the page and are not shared with other pages. the layout and visible action set for the page is defined by a perspective.
Note: a workbench contains 0 or n (n> 0) views (or editors ).
As for perspective, I personally think it should belong to the content in workbenchpage. The source code of workbenchpage can be confirmed. workbenchpage has such a variable Declaration: "Private perspectivelist persplist = new perspectivelist ();".
The following figure shows the eclipse workbench structure.