Community
Participate
Working Groups
Created attachment 241486 [details] It's way too big I've just noticed that my workbench.xmi files have gotten huge. This workbench.xmi is 783kB and it resides in an Eclipse installation version: Eclipse SDK Version: Luna (4.4) Build id: I20140325-0830 It's predecessor, still in use, is also a whopping 760kB large, it's being used in an Eclipse installation version: Eclipse SDK Version: Luna (4.4) Build id: I20140123-1600 The previous version has huge problems with Compare view and EGit, trying to close such a view pretty much always causes errors about duplicate handlers and leaves the workbench in unstable condition. This would be my guess as to how things have gotten to this point. This seems to have gotten better, thankfully. But the bloat remains. Is there anything that can be done to clean this up?
Created attachment 241530 [details] After opening a new window and closing the previous one, the file size of workbench.xmi is now 319kB.
Every restart of clean Eclipse (no extra plugins, no projects, Welcome page closed) duplicates the following DirectToolItems: debug org.eclipse.debug.internal.ui.actions.DebugDropDownAction org.eclipse.debug.internal.ui.actions.RunDropDownAction org.eclipse.ui.externaltools.ExternalToolMenuDelegateToolbar JavaWizards org.eclipse.jdt.ui.actions.OpenProjectWizard org.eclipse.jdt.ui.actions.OpenPackageWizard org.eclipse.jdt.ui.actions.NewTypeDropDown Search openType org.eclipse.search.OpenSearchDialogPage
It seems that children of action set toolbars are being duplicated. The tool items mentioned in the previous comment come from the following toolbars: org.eclipse.search.searchActionSet org.eclipse.jdt.ui.JavaElementCreationActionSet org.eclipse.debug.ui.launchActionSet
The problem is that WorkbenchWindow.updateActionBars() (called in WorkbenchWindow.setup()) recreates toolbar items ignoring the fact the items are already in model (restored earlier from worbench.e4xmi). Now I am working on the fix.
Traditionally on shutdown we tend to clear out menus and toolbars. Are these not included in that clean up? PW
The bug has been introduced in M4 with the fix for bug 416746.
Reverting the commit not only reintroduces the bug 416746, but also causes a problem with Quick Access positioning.
I'll have a patch in a minute for a dispose when closing a WorkbenchWindow. That's probably the best place to remove the model elements. Any idea why moving a call to set TBR to false would leak tool item model elements? PW
Opaque tool items are a runtime artifact. Remove them from the model on workbench window dispose: https://git.eclipse.org/r/26523 PW
Wojtek, Eric, could you please review the fix? PW
Committed: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=d0348d7fd188979e9f54aad0253dd9f799717792 At some point we may want to check all the trim rather than just the top but for now this is fine...
In 4.4.0.I20140522-1330 PW