Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [e4-dev] How to create a pulldown toolbar entry?

Am 30.08.2011 18:01, schrieb Remy Suen:

Your XML seems strange.

The MMenu model is a 'menu' of an MToolItem, not a 'children'.

MMenus also cannot contain MHandledToolItems.

Remy

Ok, I corrected the xml to the following:
  <fragments xsi:type="fragment:StringModelFragment" xmi:id="_U3cDULOhEeCjau1PwZK1gw" featurename="children" parentElementId="toolbar:org.eclipse.ui.main.toolbar">
    ....
    <elements xsi:type="menu:HandledToolItem" elementId="de.wiese24.billingE4.merchants.toolitem.sendquestionnaire" label="Fragebogen" iconURI="platform:/plugin/de.wiese24.billingE4.merchants/src/images/sent_questionnaire16x16.png" tooltip="Fragebogen versenden" enabled="false" command="_JDgQ8NMLEeC5q_H-NgTNZA"/>
  </fragments>
  <fragments xsi:type="fragment:StringModelFragment"  featurename="menu" parentElementId="de.wiese24.billingE4.merchants.toolitem.sendquestionnaire">
    <elements xsi:type="menu:Menu" elementId="de.wiese24.billingE4.merchantmenu.dropdown" label="nochnmenu">
      <children xsi:type="menu:HandledMenuItem" elementId="submenu2" label="sub2" command="_X1UBMM2hEeCK3u-rhHrqXQ"/>
      <children xsi:type="menu:HandledMenuItem" elementId="submenu1" label="sub1" command="_aNzXoM_HEeCnKcaTRmmBRg"/>
    </elements>
  </fragments>

With that construct a dropdown is rendered but no submenu entries are shown. No exception. The same thing if I put the menu directly under the HandledToolItem in the xml. Is there anything else wrong? Or shall I open a bug?

Best regards, Stefan



Back to the top