Community
Participate
Working Groups
Hi All: i can find a view from an active perspective by using: PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView (ViewID); but when i use : WorkbenchPage[] pages=PlatformUI.getWorkbench().getActiveWorkbenchWindow ().getPages(); for(int i=0;i<pages.length;i++){ return pages[i].findView(ViewID); } i can't find a view opened in an inactive perspective. Is there anyway to do this? Thanks
Since Eclipse 2.1, there is only (at most) one page per window, and the page may contain multiple perspectives. There is currently no way of querying the contents of inactive perspectives. Can you provide more details of your scenario and why it requires this?
Sure, our product is designed to be seperated into two perspective, both share the same model (base on EMF), and there's an action in the global toolbar, called switch server, i need to reset all opened views when user's switch to another server, whether they are active or inactive.
One way around this is to hook a part listener on the window when it is opened (e.g. from the advisor's preWindowOpen method), and track partOpened and partClosed calls, remembering the opened views in a collection.
(In reply to comment #3) > One way around this is to hook a part listener on the window when it is opened > (e.g. from the advisor's preWindowOpen method), and track partOpened and > partClosed calls, remembering the opened views in a collection. Thank you for your reply. I think this method do works. but still wish we can through the following way in the future. WorkbenchPage[] pages=PlatformUI.getWorkbench().getActiveWorkbenchWindow ().getPages(); for(int i=0;i<pages.length;i++){ return pages[i].findView(ViewID); } Thanks
Reassigning bugs in component areas that are changing ownership.
I want close particular views (multiple) in all perspective after closing database connection. It looks impossible in legacy eclipse.I can remember all views, but can't hide view in inactive perspective.
(In reply to comment #6) > I want close particular views (multiple) in all perspective after closing > database connection. > > It looks impossible in legacy eclipse.I can remember all views, but can't hide > view in inactive perspective. > See bug 57841.
Remy is now responsible for watching the [ViewMgmt] category.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.