Community
Participate
Working Groups
Created attachment 188474 [details] After Workbench restore In the view class (extends ViewPart), the toolbar is created as follows: IToolBarManager toolbarManager = getViewSite().getActionBars().getToolBarManager(); toolbarManager.add(action1); toolbarManager.add(action2); toolbarManager.add(...); What happens? When the view is opening, the Toolbar is created on the left side (on the title place) and then on the correct side. [url=http://dl.dropbox.com/u/126065/Imagens/Screens/Colibri_toolbar_bug.jpg] http://dl.dropbox.com/u/126065/Imagens/Screens/Colibri_toolbar_bug.jpg[/url] When the view is opened, the "duplicated" left toolbar disappears! [url=http://dl.dropbox.com/u/126065/Imagens/Screens/Colibri_toolbar_ok.jpg] http://dl.dropbox.com/u/126065/Imagens/Screens/Colibri_toolbar_ok.jpg[/url] The worst problem is on the Workbench restore side (and i believe it's related with this behavior): when there is more than one view to restore, a "duplicated" version of the Toolbar of the first view opened is created on the left side of the Workbench itself!!! And it does not go away until i swap to the view under it. NOTE: This never happened with previous versions of Eclipse.
Might be related to bug 329754.
This is the "generic" code i use to open views: try{ IWorkbenchPage activePage=...getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage(); IViewReference viewreference=activePage.findViewReference(id, secondaryId); IViewPart view=activePage.showView(id, secondaryId, IWorkbenchPage.VIEW_ACTIVATE); if(viewreference==null){ /* * initialize * set icon * set title * set focus * etc */ } }catch(PartInitException e){ }
Marco, it may well be worth trying this once M6 comes out. While I cannot guarantee that this is a dup of 329754 the scenarios seem similar enough to warrant a try.
Tested with Indigo Release Build id: 20110319-2305. FIXED.