Skip to main content



      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 09:12 Go to next message
Eclipse UserFriend
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 12: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 13:14 Go to previous message
Eclipse UserFriend
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: Sat Jul 12 18:40:04 EDT 2025

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

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

Back to the top