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.
Eclipse4/RCP/EAS/Workbench Services
< Eclipse4 | RCP | EAS
Revision as of 10:05, 12 April 2011 by Unnamed Poltroon (Talk) (New page: ==Part Service== 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 ...)
Contents
Part Service
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".
API Comparison
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.
In Eclipse 4, the notion of a workbench page is not present. The part service API is basically a merge of the existing 3.x IPartService and IWorkbenchPage interfaces.
Show a view |
|
Eclipse 3.x | Eclipse 4.x |
// show the 'Project Explorer' view workbenchPage.showView(IPageLayout.PROJECT_EXPLORER); |
// show the 'Project Explorer' view partService.showView(IPageLayout.PROJECT_EXPLORER); |
Activate a part |
// activate the 'Project Explorer' part workbenchPage.activate(projectExplorerPart); |
// 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 workbenchPage.bringToTop(projectExplorerPart); |
// bring the 'Project Explorer' part to the top of its stack partService.bringToTop(projectExplorerPart); |