Community
Participate
Working Groups
Attempting to hide a view by invoking hideView() in the current perspective works and in the debug mode i could see that legacyPart variable in the ViewReference object is set to null after hideView() is called. Whereas when the perspective is switched the same code hideView() does not work and the view is not getting closed, the debug mode shows that legacyPart variable in the ViewReference object is not set to null and it still contains the view details. This shows that ViewReference object loses control when the perspective is changed.
Moving to Platform UI
This bug impacts views with secondary ids. Such views do not get refreshed since the call to hideView() did not execute as expected and the old view is displayed again, after a refresh. Would be glad to know any work around that I can implement to overcome this bug. Thanks, Jay
Could someone respond to my comment 2, with workarounds if any? Pls treat this as urgent.
(In reply to Jayatheerthan Krishnamurthy from comment #3) > Could someone respond to my comment 2, with workarounds if any? Pls treat > this as urgent. Please attach a demo plugin that provides 2 perspectives that can show the problem. PW
Created attachment 238020 [details] DemoPlugin demonstrating the issue here. Uploading a demo plugin as requested. Instructions inside the zip file.
Created attachment 238059 [details] Information on demo plugin and instructions for reproducing the issue.
Any updates?
So are there any workarounds/alternatives for avoiding this issue?
I reproduced the behaviour described in the Readme.txt file using the attached plug-in, but I am not sure what the problem is. The plug-in works in the same way in Eclipse 3.7.2, 4.2.2 and 4.4 and it seems to work as expected. When the DemoPerspective2 is active (and Subviews are not open in it), the SampleView.showSubview(*) method is not called after pressing the 'Recreate Sample View' button, because the IWorkbenchPage.findViewReference(*) and IWorkbenchPage.getViewReferences() methods return views only from active perspective. Also, I think there is a bug in the attached plugin. In the SampleView.showSubview() method there is "final IViewReference prevView = wbPage.findViewReference(viewId, label);". I believe it should be wbPage.findViewReference(viewId) or wbPage.findViewReference(Subview.ID, label). What behaviour do you expect?
As mentioned in comment 9, I don't think it is a bug. Removing from 4.5 plan until more information is provided.