I am currently trying to evaluate the e4 application framework and try to build a small sample app. I successfully worked through the tutorials of Tom Schindl and Lars Vogel, now I want to dig a bit deeper.
One question that bothers me at the moment is: How can I make my e4 app display a perspective bar similar to the one I know from Eclipse 3? I could not find any option in my e4xmi file, nor did I find anything about this on the web.
Any help is appreciated!
Thanks in advance.
Maybe, as a siednote: Is there any recommended further documentation that helps me getting a better understanding of e4?
The current perspective switcher is implemented using a ToolControl and
then the real work is done by an addon found in
The bad thing about this implementation is that it currently depends on
3.x API so you can't use it in native Eclipse 4.0 applications see bug
Am 31.01.11 15:46, schrieb Christoph:
> I am currently trying to evaluate the e4 application framework and try
> to build a small sample app. I successfully worked through the tutorials
> of Tom Schindl and Lars Vogel, now I want to dig a bit deeper.
> One question that bothers me at the moment is: How can I make my e4 app
> display a perspective bar similar to the one I know from Eclipse 3? I
> could not find any option in my e4xmi file, nor did I find anything
> about this on the web.
> Any help is appreciated!
> Thanks in advance.
> Maybe, as a siednote: Is there any recommended further documentation
> that helps me getting a better understanding of e4?
to my e4xmi file. The switcher is now partly visible but it has no Perspectives attached to ist and I keep getting this exception:
ERROR: Unable to create class 'org.eclipse.e4.ui.workbench.addons.perspectiveswitcher.Pers pectiveSwitcher' from bundle '60'
org.eclipse.e4.core.di.InjectionException: java.lang.IllegalStateException: Workbench has not been created yet.
As mentionned before you can only use this addon when you are running in
Compat-Mode! This is not working in an application written on top of the
vanilla Eclipse 4.0 Application Platform.
So you need to port the code found in there to NOT dependend on 3.x API
but solely working on the 4.0 ApplicationModel (i didn't yet had time to
dig into the code there).
Maybe we can do this as part of fixing #335733 but I can't promise but
if you want you can give it a shot and if you have a working
implementation post it to bug 335733.
Am 31.01.11 16:40, schrieb Christoph:
> Thanks, for the hint, Tom. But I still have trouble addming this to my app.
> I just added a ToolControl with the URI
> eclipse.e4.ui.workbench.addons.perspectiveswitcher.Perspecti veSwitcher
> to my e4xmi file. The switcher is now partly visible but it has no
> Perspectives attached to ist and I keep getting this exception:
> ERROR: Unable to create class
> pectiveSwitcher' from bundle '60'
> java.lang.IllegalStateException: Workbench has not been created yet.
From what I read op to now, I thought, that the compat layer was always loaded in e4 applications, at least if the necessary packages are loaded by the app. What would I do to activate the compat mode? This would be enough for me for now.
Jo Jaquinta Messages: 40 Registered: January 2013 Location: Boston
I didn't know there was a built in one, so I wrote my own one! My UI designer is going to want a specific look and feel anyway, so I knew I was going to have to do my own implementation.
I then just stuck it in my toolbar as a ToolControl.
It currently doesn't updated if there are dynamic updates to the model, or update selection if something else changes the current perspective. But that shouldn't be too hard to do by just listening to the model.
Hi Tom, I see that bug 335733 is marked fixed in 4.1 but that, in 4.3.1, the addon is still in the org.eclipse.ui.workbench plugin (albeit in an e4 package). Am I correct in thinking that I still cannot use it in a pure e4 application?
Hi, So I have a perspective switcher but I don't know how to add a perspective to it. The application is developed in Eclipse 3 and I am using The compat layer to add a new perspective developed in Eclipse 4. (Luna Eclipse 4.4) did anyone had the answer to that ?