dev09
dev09

Reputation: 169

how to identify which instance of viewpart is running in eclipse rcp application

i have multiple instances of view open in my eclipse rcp application. Can any one tell me how can i identify which instance of viewpart is running. and also how can i switch to different instances of same ViewId programmatically ?

Thanks

Upvotes: 2

Views: 649

Answers (1)

Tonny Madsen
Tonny Madsen

Reputation: 12718

I assume you have set allowMultiple in the view declaration.

Use getViewSite().getSecondaryId() in your code to get the secondary id of the current view.

And use IWorkbenchPage.showView(String viewId, String secondaryId, int mode) to activate a different view...

Upvotes: 2

Related Questions