|Can I Obtained perspective ID of a hidden view [message #1037225]
||Tue, 09 April 2013 09:58
| Vijit Neema
Registered: April 2013
In one of the application there are different perspectives and user will frequently switched between these perspective. Now below is scenario -
1. User has opened a View V1 (Which is also a listener to an event) in a Perspective P1.
2 .User switched perspective from P1 to P2, in this case View V1 gets hidden
3. Now from perspective P2 the event gets fired and as view V1 was listing to that Event, the view V1 event listener gets called.
4. In that listener I wanted to check the perspective ID of the view V1.
I am trying following code
String perspectiveID1 = v1.getViewSite().getPage().getPerspective().getId();
String perspectiveID2 = v1..getViewSite().getWorkbenchWindow().getActivePage().getPerspective().getId();
Both the lines are returning me the active perspective ID that is P2, but my view V1 is belong to P1.
Is there any way I can get the perspective ID of the view?
Powered by FUDForum
. Page generated in 0.17042 seconds