Eclipse Kepler RCP CoolBar Actions CSS

只愿长相守 提交于 2019-12-25 04:55:16

问题


Similar to this question's screenshot, my RCP App has those annoying spaces between actions on the coolbar. My guess is that it's because I'm using deprecated extensions in the plugin.xml (i.e. viewActions actionSets).

For now, I don't want to begin changing all those action implementations to comply with the new rules (mostly because there are A LOT of those actions).

Question: Can I somehow apply CSS styling to that CoolBar so that extra spaces are grabbed by the actions?

The road so far:

  1. NO e4 STUFF! This question does not satisfy mine.
  2. My other (similar) question. Feel free to complete that guy's answer.
  3. RAP CSS - does this apply to RCP as well?

回答1:


Looking at the debug plugin which does align the toolbar entries correctly it first defines a toolbar like this:

<extension 
     point="org.eclipse.ui.menus">
  <menuContribution
         locationURI="toolbar:org.eclipse.ui.main.toolbar?after=additions">
      <toolbar
            id="org.eclipse.debug.ui.main.toolbar"
            label="%DebugActionSet.label">
         <separator
               name="breakpointGroup"
               visible="true">
         </separator>
         <separator
               name="threadGroup"
               visible="true">
         </separator>
         <separator
               name="stepGroup">
         </separator>
         <separator
               name="stepIntoGroup">
         </separator>
         <separator
               name="stepOverGroup">
         </separator>
         <separator
               name="stepReturnGroup">
         </separator>
         <separator
               name="emptyStepGroup">
         </separator>
         <separator
               name="renderGroup"
               visible="true">
         </separator>
      </toolbar>
   </menuContribution>

and then in the actionSet references the defined toolbar:

      <action
           toolbarPath="org.eclipse.debug.ui.main.toolbar/breakpointGroup"
           ... other stuff ...
           id="org.eclipse.debug.ui.actions.SkipAllBreakpoints">
     </action>


来源:https://stackoverflow.com/questions/20385974/eclipse-kepler-rcp-coolbar-actions-css

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!