Reputation: 1199
I have many views opened while My Eclipse RCP application is running.Could anyone show me the way how can i get view id(not secondary view id) of currently selected view in my workbench ?
Upvotes: 3
Views: 4523
Reputation: 1199
Finally, I got a way to get view ID of currently selected(opened) view in my application's workbench as following lines of code :
IWorkbenchPage wbp = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
String id = wbp.getActivePartReference().getId();
And it was what I was seeking for.
Upvotes: 10