Hiding Duplicate Toolbars Items in Eclipse

Viewed 3775

I don't know how, but my STS has got duplicate toolbars items and I am not sure how to remove them. Here is how my duplicated toolbar looks like.

enter image description here

I want to get rid of these. I tried to hide the toolbar but that didn't help. Does anybody have any idea how to get rid of the duplicate ones?

5 Answers

This appears to be an issue in the core Eclipse platform. While the screenshot shows pretty icons thanks to Darkest Dark, it does not appear related at this time to Darkest Dark plugin as Howlger has indicated. Instead, it appears that duplicate contribution entries appear in the workbench.xmi file. In our testing (I contribute to Darkest Dark), we can see these entries happening in a standalone Eclipse, though haven't been able to track down the root cause yet in where entries get added again to the workbench.xmi.

Interestingly, a user has posted on an old Eclipse bug with what looks like a screenshot of Eclipse Classic exhibiting the same problem today.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=402561

Screenshot from Eclipse Bug

I can't say why this happened in the first place, but I do know how to get rid of the duplicate entries. We've experienced the same problem on our Eclipse based product.

Window > New Window

Close the old window and be free of the duplicate actions weighing you down.

Not an actual answer, more additional info that I hope will help track down the problem. I am having the same issue with Version: 2018-12 (4.10.0), Build: 20181214-0600.

I opened the workbench.xmi file mentioned above. This was the section I found by searching for "Open a Terminal", which is the tooltip on a repeated icon.

<children xsi:type="menu:ToolBar" xmi:id="_tODFlzriEem5AdcasuU54g" elementId="org.eclipse.tm.terminal.view.ui.toolbar">
  <tags>Draggable</tags>
  <children xsi:type="menu:HandledToolItem" xmi:id="_tODFmDriEem5AdcasuU54g" elementId="org.eclipse.tm.terminal.view.ui.commands.launchToolbar"
       iconURI="platform:/plugin/org.eclipse.tm.terminal.view.ui/icons/eview16/console_view.png" tooltip="Open a Terminal" command="_tOOFADriEem5AdcasuU54g">
    <persistedState key="IIdentifier" value="org.eclipse.tm.terminal.view.ui/org.eclipse.tm.terminal.view.ui.commands.launchToolbar"/>
  </children>
  <children xsi:type="menu:HandledToolItem" xmi:id="_tODFmTriEem5AdcasuU54g" elementId="org.eclipse.tm.terminal.view.ui.commands.launchToolbar"
       iconURI="platform:/plugin/org.eclipse.tm.terminal.view.ui/icons/eview16/console_view.png" tooltip="Open a Terminal" command="_tOOFADriEem5AdcasuU54g">
    <persistedState key="IIdentifier" value="org.eclipse.tm.terminal.view.ui/org.eclipse.tm.terminal.view.ui.commands.launchToolbar"/>
  </children>
  <children xsi:type="menu:HandledToolItem" xmi:id="_tODFmjriEem5AdcasuU54g" elementId="org.eclipse.tm.terminal.view.ui.commands.launchToolbar"
       iconURI="platform:/plugin/org.eclipse.tm.terminal.view.ui/icons/eview16/console_view.png" tooltip="Open a Terminal" command="_tOOFADriEem5AdcasuU54g">
    <persistedState key="IIdentifier" value="org.eclipse.tm.terminal.view.ui/org.eclipse.tm.terminal.view.ui.commands.launchToolbar"/>
  </children>
  <children xsi:type="menu:HandledToolItem" xmi:id="_tODFmzriEem5AdcasuU54g" elementId="org.eclipse.tm.terminal.view.ui.commands.launchToolbar"
       iconURI="platform:/plugin/org.eclipse.tm.terminal.view.ui/icons/eview16/console_view.png" tooltip="Open a Terminal" command="_tOOFADriEem5AdcasuU54g">
    <persistedState key="IIdentifier" value="org.eclipse.tm.terminal.view.ui/org.eclipse.tm.terminal.view.ui.commands.launchToolbar"/>
  </children>
  <children xsi:type="menu:HandledToolItem" xmi:id="_tODFnDriEem5AdcasuU54g" elementId="org.eclipse.tm.terminal.view.ui.commands.launchToolbar"
       iconURI="platform:/plugin/org.eclipse.tm.terminal.view.ui/icons/eview16/console_view.png" tooltip="Open a Terminal" command="_tOOFADriEem5AdcasuU54g">
    <persistedState key="IIdentifier" value="org.eclipse.tm.terminal.view.ui/org.eclipse.tm.terminal.view.ui.commands.launchToolbar"/>
  </children>
  <children xsi:type="menu:HandledToolItem" xmi:id="_tODFnTriEem5AdcasuU54g" elementId="org.eclipse.tm.terminal.view.ui.commands.launchToolbar"
       iconURI="platform:/plugin/org.eclipse.tm.terminal.view.ui/icons/eview16/console_view.png" tooltip="Open a Terminal" command="_tOOFADriEem5AdcasuU54g">
    <persistedState key="IIdentifier" value="org.eclipse.tm.terminal.view.ui/org.eclipse.tm.terminal.view.ui.commands.launchToolbar"/>
  </children>
  <children xsi:type="menu:HandledToolItem" xmi:id="_tODFnjriEem5AdcasuU54g" elementId="org.eclipse.tm.terminal.view.ui.commands.launchToolbar"
       iconURI="platform:/plugin/org.eclipse.tm.terminal.view.ui/icons/eview16/console_view.png" tooltip="Open a Terminal" command="_tOOFADriEem5AdcasuU54g">
    <persistedState key="IIdentifier" value="org.eclipse.tm.terminal.view.ui/org.eclipse.tm.terminal.view.ui.commands.launchToolbar"/>
  </children>
  <children xsi:type="menu:HandledToolItem" xmi:id="_tODFnzriEem5AdcasuU54g" elementId="org.eclipse.tm.terminal.view.ui.commands.launchToolbar"
       iconURI="platform:/plugin/org.eclipse.tm.terminal.view.ui/icons/eview16/console_view.png" tooltip="Open a Terminal" command="_tOOFADriEem5AdcasuU54g">
    <persistedState key="IIdentifier" value="org.eclipse.tm.terminal.view.ui/org.eclipse.tm.terminal.view.ui.commands.launchToolbar"/>
  </children>
</children>
  • Stopped eclipse.
  • Edited this down to one menu:HandledToolItem child.
  • Started eclipse.

When I refreshed workbench.xmi I found this (two icons appear):

<children xsi:type="menu:ToolBar" xmi:id="_FzpBgzrrEemLeYohrjtX4w" elementId="org.eclipse.tm.terminal.view.ui.toolbar">
  <tags>Draggable</tags>
  <children xsi:type="menu:HandledToolItem" xmi:id="_FzpBhDrrEemLeYohrjtX4w" elementId="org.eclipse.tm.terminal.view.ui.commands.launchToolbar"
       iconURI="platform:/plugin/org.eclipse.tm.terminal.view.ui/icons/eview16/console_view.png" tooltip="Open a Terminal" command="_Fzw9IzrrEemLeYohrjtX4w">
    <persistedState key="IIdentifier" value="org.eclipse.tm.terminal.view.ui/org.eclipse.tm.terminal.view.ui.commands.launchToolbar"/>
  </children>
  <children xsi:type="menu:HandledToolItem" xmi:id="_FzpBhTrrEemLeYohrjtX4w" elementId="org.eclipse.tm.terminal.view.ui.commands.launchToolbar"
       iconURI="platform:/plugin/org.eclipse.tm.terminal.view.ui/icons/eview16/console_view.png" tooltip="Open a Terminal" command="_Fzw9IzrrEemLeYohrjtX4w">
    <persistedState key="IIdentifier" value="org.eclipse.tm.terminal.view.ui/org.eclipse.tm.terminal.view.ui.commands.launchToolbar"/>
  </children>
</children>

I notice, also, that the ids have been updated.

John

Related