Community
Participate
Working Groups
Adding multiple IViewParts to a IWorkbenchPage using the path IWorkbench.openWorkbenchWindow(id, null) results in only the first IViewPart being visible. This was not the case in the past. The problem occurs when running an RCP application from with the Eclipse IDE and after building the RCP application. 1.IWorkbench.openWorkbenchWindow(id, null) 2.Where id points to class implementing IPerspectiveFactory layout.setEditorAreaVisible(false); IFolderLayout folder = layout.createFolder(folder_id, relationship, ratio, editorArea); view_id = "the_first_view"; folder.addView(view_id); view_id = "the_second_view"; folder.addView(view_id); ... When the Perspective/IWorkbenchPage is opened only the "the_first_view" is visible. The workaround: Add the following code after the call to IWorkbench.openWorkbenchWindow(id, null). IWorkbench workbench = PlatformUI.getWorkbench(); workbench.openWorkbenchWindow(Perspective.pID, null); IWorkbenchPage page = workbench.getActiveWorkbenchWindow().getActivePage(); for(IViewReference view : page.getViewReferences()) { view.getView(true);//forces view visible- I guess }
(In reply to Ralph Bosson from comment #0) It will help if you can add a minimal RCP application that demonstrates the problem.
(In reply to Ralph Bosson from comment #0) > This was not the case in the past. Can you be more specific about the past, i.e., in which version of Eclipse did it work and in which version did it stop working? This will save time for if anybody starts investigating the issue. The more details you provide the higher changes are some things get fixed. Moreover, any patches are more than welcome.
I have created a quick RCP Application. It does not produce the same result I get from our full multi-plugin RCP Application. It most likely is what we call around here a path error. Caused by our unique sequence of actions which results in the issue. Thanks for looking at this.