I have created a pure Eclipse e4 rich client platform application application model. I created multiple perspectives using perspective stack, but I am unable to switch other perspective because there is no default perspective bar or switcher icon present in Eclipse e4. How to implement a perspective switcher in pure Eclipse e4?
相关问题
- Eclipse and Mylyn : how to disable grey files in t
- Installing Pydev for Eclipse throws error
- Error in Scala Compiler: java.lang.AssertionError:
- How to remove unused imports using Eclipse and not
- Assume/switch role in aws toolkit for eclipse 2.0
相关文章
- selenium+eclipse 打开网页时报错
- Eclipse failing to open
- Eclipse how can I indent C++ preprocessor macros
- Why is FindBugs ignoring my check for null?
- Eclipse cleanup - what are the “.index” files - ca
- Eclipse plugin to find out unused methods in a cla
- Spring NamespaceHandler issue when launching Maven
- Google USB Package isn't showing in SDK Manang
EPartService.switchPerspective
will do the actual switch, but you will have to design and implement the UI.You could use a
ToolBar
in the window Trim Bar with buttons for each perspective. Alternatively a Combo as a Tool Control with a list of the perspectives, it is up to you.To put a control at the right of a Trim Bar you need to add two Tool Control objects to the trim. Something like:
The first Tool Control is just a spacer to fill the center of the bar.
On the tags tab for the control add the word
stretch
to tell e4 to stretch this control over as much space as possible:You will also have to specify a class for the control. This just needs to create an empty
Composite
to occupy the space. For example:The second Tool Control will contain your Combo control for the perspective switch. Something like:
This should end up looking something like this: