How to add Perspective Bar Switcher to pure eclipse 4 rcp application -


i have created pure eclipse e4 rich client platform application application model. created multiple perspectives using perspective stack, unable switch other perspective because there no default perspective bar or switcher icon present in eclipse e4. how implement perspective switcher in pure eclipse e4?

epartservice.switchperspective actual switch, have design , implement ui.

you use toolbar in window trim bar buttons each perspective. alternatively combo tool control list of perspectives, you.

to put control @ right of trim bar need add 2 tool control objects trim. like:

trim layout

the first tool control spacer fill center of bar.

on tags tab control add word stretch tell e4 stretch control on space possible:

stretch tag

you have specify class control. needs create empty composite occupy space. example:

public class spacercontrol {   @postconstruct   public void postconstruct(final composite parent)   {     composite body = new composite(parent, swt.none);      body.setlayout(new filllayout());   } } 

the second tool control contain combo control perspective switch. like:

public class combocontrol {   @postconstruct   public void creategui(final composite parent)   {     combo combo = new combo(parent, swt.read_only);      ... initialize combo, add listeners, ....   } } 

this should end looking this:

resulting app


Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -