Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » How to get secondary id of active view (multiple instances of same view)?
How to get secondary id of active view (multiple instances of same view)? [message #1708194] Mon, 14 September 2015 13:12 Go to next message
Deepak Chhetri is currently offline Deepak ChhetriFriend
Messages: 5
Registered: August 2015
Junior Member
I am new to Eclipse RCP framework.

I have created multiple instances of the same view by appending secondary id in the primary id of the view using following code:


folderLayout1.addPlaceholder(DiagramWindow.ID + ":*");

IWorkbenchPage activePage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
activePage.showView(DiagramWindow.ID, Integer.toString(DiagramList.viewIndex++),
IWorkbenchPage.VIEW_ACTIVATE);

Now when I try to get the id of the active view, then I get only the primary id of the view. I did not find any way to get the secondary id of the view. Due to this I always get the reference of the last opened view in the folderLayout.

Please provide some solution. I am stuck in this problem.

Thanks in advance.
Re: How to get secondary id of active view (multiple instances of same view)? [message #1708214 is a reply to message #1708194] Mon, 14 September 2015 16:41 Go to previous messageGo to next message
Eclipse UserFriend
You can get the secondary from the view's site: see IViewSite#getSecondaryId().
Re: How to get secondary id of active view (multiple instances of same view)? [message #1708220 is a reply to message #1708214] Mon, 14 September 2015 17:14 Go to previous message
Deepak Chhetri is currently offline Deepak ChhetriFriend
Messages: 5
Registered: August 2015
Junior Member
Thanks Brian for your quick reply.

But my issue is different.
There are many instances of same view on the tab folder.
My intention is to get the reference of view which currently has the focus out of all the opened views. (IOut of all opened views of same type, only one will have focus).

Thanks in advance.
Previous Topic:OSX menu item for About and Preference appear twice
Next Topic:Saving Modified Files Programmatically in eclipse without using editor
Goto Forum:
  


Current Time: Fri Mar 29 05:27:38 GMT 2024

Powered by FUDForum. Page generated in 0.02143 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top