Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

E4/EAS/Part Service

< E4‎ | EAS
Stop.png
This page has been superseded.
See Workbench Services for updated information.


In order to allow clients to easily work with the modeled workbench, there needs to be some convenience APIs present for them to perform simple operations like "show part X", "activate part Y", or "bring part Z to the top of its stack".

Eclipse 3.x API

In 3.x, there is IPartService and IWorkbenchPage, with IWorkbenchPage extending IPartService. Together, these two interfaces defines the general operations that clients often want to do.

Show view

// show the 'Project Explorer' view
workbenchPage.showView(IPageLayout.PROJECT_EXPLORER);

Activate a part

// activate the 'Project Explorer' part
workbenchPage.activate(projectExplorerPart);

Bring a part to the top of its stack

// bring the 'Project Explorer' part to the top of its stack
workbenchPage.bringToTop(projectExplorerPart);

e4 (Java)

In e4, the notion of a workbench page will not be present. The part service API will essentially be a merge of the existing 3.x IPartService and IWorkbenchPage interfaces.

Open questions

  • Should the API work with part ids or should they work with physical MPart model objects? There is no requirement at the moment that mandates that parts need an id. On the other hand, it is questionable how a client will get a hold of an MPart that is hidden and that they wish to show.
  • Since ids can be modified by the client, how should the part lookup algorithm look like? What will be returned by methods like findPart(String)?

Show view

// show the 'Project Explorer' view
partService.showView(IPageLayout.PROJECT_EXPLORER);

Activate a part

// activate the 'Project Explorer' part
partService.activate(projectExplorerPart);

Bring a part to the top of its stack

// bring the 'Project Explorer' part to the top of its stack
partService.bringToTop(projectExplorerPart);

Back to the top