Do you know the Perspective-Bar? - And have you ever tried to integrate the perspecitve-bar in your RCP? If yes, did you suceed?
From my experience, perspectives are really useful for representing
blocks of funtionality, something like a workflow or a set of
requirements that are bundled. The perspective-bar is a very nice
feature, necessary in the JDT but has a great disadvantage: The lack of
In my opinion perspectives have different goals: On the one hand
they have to provide different user-roles different presentations of an
application and on the other hand they have to bundle different views
that are responsible for a special set of functionality.
Unfortunately the Eclipse-Framework doesn’t provide the approach to
use this nice bar for different user-roles. Neither it’s possible to
contribute to this bar nor to filter or hide perspectives. This is
confusing, because everywhere you contribute your items, action, views,
etc. to the workbench, but not in this special case. You have to
reimplement the perspective-bar if you want to provide special behavior.
The art or reimplementing
The easiest way is to declare some actions, registering a
perspective-listener and contributing the actions, depending from your
business logic to a coolbar of the workbench-window. But that’s ugly,
I want to have a big and colored perspective-switcher (like in Lotus
Notes) without implementing a new Presentation using the
org.eclipse.ui.themes Extension-Point. But that’s not so easy, because
Eclipse doesn’t have a special “Area”, something like a Composite where
I can provide something, that’s always present.
A first try
I just had an idea. Using a standalone-View that is in all
perspectives on the same place could simulate a fully customizable
perspective-bar. Although it’s not a satisfying solution it’s the first
step of a better fully controllable perspective-switcher.
(The Example RCP with two Perspectives)
Download the Perspective-Switcher Example as RCP (Source included - 9,3 Mbyte)
CVS-Checkout (more info)