We are using an Eclipse application, currently developed on Eclipse 3 architecture. We have developed a custom plugin for that application. We are now upgrading this application to a new version that's based on Eclipse 4 architecture. I am tasked with migrating the custom plugin from Eclipse 3 to Eclipse 4 architecture to be used with the upgraded version of the application. I have bit of Eclipse plugin development experience, but migrating from Eclipse 3 to Eclipse 4 architecture is my first. So, excuse me while I explain/ask my questions.
I found one existing question - eclipse rcp 4 - customize workbench. But that question is not answered.
The plugin on Eclipse 3 architecture customizes the workbench, to provide tabs for open and commonly used perspectives (as shown in screenshot), by:
- Defined an extension for
org.eclipse.core.runtime.applications. Implementation of this extension is inCustomApplicationclass.CustomApplicationclass extends the application class from the Eclipse application. - Inside the
CustomApplicationclass, calledPlatformUI.createAndRunWorkbench()by passing custom implementation ofWorkbenchAdvisor-CustomWorkbenchAdvisorclass. - Inside the
createWorkbenchWindowAdvisor()method of theCustomWorkbenchAdvisor, created customWorkbenchWindowAdvisor-CustomWorkbenchWindowAdvisorclass. - Inside the
createWindowContents()method of theCustomWorkbenchWindowAdvisor, created a customCustomPerspectiveHeaderclass to manage those tabs. This class creates tab representation of open & commonly used perspectives. This allows user to switch perspective just by clicking on the tab instead of going through Windows menu. It also provides important information on the perspective header space - such as the user name and group/role that user has logged in. When user clicks on a tab, that perspective opens below.
Eclipse 4 has new mechanism to customize windows layout using application model (via e4xmi file), and createWindowContents() method of the WorkbenchWindowAdvisor is deprecated.
I don't understand how to create/setup/configure e4xmi file for my custom plugin to provide for the Perspective Header space on top of the application UI. I followed tutorial from https://www.vogella.com/ but those tutorials refer to application model in the context of new Eclipse application develipment and not in the context of plugin development for an existing application.
Using application model (e4xmi file) can I just add my plugin workbench changes (the perspective header) on top of what the application provides or do I need to provide the entire workbench layout in my plugin application model?
