I am currently working on a E4 RCP application where I need to detect when ever perspective is chnaged or switched so I need to add listener .Previously in eclipse 3x i used to do like below code .
PlatformUI.getWorkbench().getActiveWorkbenchWindow().addPerspectiveListener()
But this code will not work in E4 as platformui is not acessible in E4.
I tried searching on web and I came across below tutorial. http://www.vogella.com/tutorials/Eclipse4ModelEvents/article.html#exercise_perspective_switch
Is there any other way available without listening to whole @EventTopic(UIEvents.ElementContainer.TOPIC_SELECTEDELEMENT)
and only listening to only perspective change