I'm using some code from vogella.com which uses an handler to switch perspectives.
i modified the handler and added an parameter (also added this parameter in extensions)
NOTE: i am using an E3 app in Eclipse 4!