Eclipse Workbench UI

xiaoxiao2021-03-06  70

(Note: The above figure is the composition decomposition of the Eclipse 2.1.x version, the Eclipse 3.0.x version of the UI composition is the same as Eclipse 2.1.x, only the interface style has changed)

1, Workbench (iWorkBench interface)

l Eclipse platform UI root object

l includes a set of Workbench windows

2, Workbench window (iWorkbenchWindow interface)

l Eclipse platform UI top window

l Includes Actionbars and Workbench Pages

3, Actionbars (IActionBARS interface)

l includes a menu bar, a toolbar (or Cool toolbar, IActionBARS2 interface) and status bars

l These Actionbars managed by the corresponding manager: IMenumanager, Itoolbarmanager, ISTATUSLINMANAGER, and ICoolbarManager

l The short cut bar in the figure is actually used to switch the toolbar of the Workbench page.

l IACTION interface is used to indicate a non-UI command that can be triggered by the user, usually associated with buttons, menu items, toolbar items.

4, Workbench page (iWorkBenchPage interface)

l A group of Workbench section included in the Workbench window

l perspective (Perspectiive) is a layout template for the Workbench page, which is used to lay out in the Workbench section in the Workbench page.

5, Workbench section (iWorkbenchPart interface)

l There are two types: view (iViewPart interface) and editor (IEDITORPART interface), use extensions to create

l You can have your own private actionbars (where the status strip is shared with the parent window), and you can also have a pop-up menu.

l iWorkbenchPartSite interface is an intermediate interface between the Workbench section and Workbench, the corresponding view, and editor, extended the iViewSite and Ieditorsite interface, used to get superior containers, such as Workbars, Workbench window, and private actionbars, pop-up menus, etc.

l The internal part of the Workbench section consists of SWT widgets, using the specified layout method to layout

6, life cycle of the Workbench section

(1) When the Workbench section is created

l Instantiate the Workbench section

l Create the site of the Workbench section

l call part.init (site) method

(2) When the Workbench section is visible in Workbench

l Call Part.createControl (PARENT) method to create a real SWT widget

l Trigger a Partopened event

(3) When the Workbench section is activated or focused

l call part.setfocus () method

l Trigger a PartActivated event

(4) When the Workbench section is closed

l If you need to save, save; return if you fail or cancel

l If the Workbench is partially activated, it is not activated L to trigger a partclosed event.

l Remove the representation of the Workbench section; the control of the Workbench section is removed from the SWT widget tree structure

l call part.dispose () method (this is end signal)

转载请注明原文地址:https://www.9cbs.com/read-109416.html

New Post(0)