Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-ui-dev] ACTIONSET menubarPath not working as expected (2.1 M5)

So far no answer to this in the newsgroups.  Can anyone here fill me in?

---------------------------------------------------

My aim is to have my custom perspective display several menu items the
File/New menu but so far I'm not able to make that happen using actionSet.
I've seen messages in the news group saying that is possible (detail
missing) and have read the tutorials.  Seems like it ought to be easy, but
so far I'm not having any fun.

Questions:

1.  Why doesn't the action set at the end of this message give me a menu
structure like this
[]File
[  ]New
[    ]Project
[    ]----------
[    ]File
[    ]Folder
[    ]----------
[    ]MyItem1  // Expect these to appear in
[    ]MyItem2  // File/New Hierarchy

Instead of one like this:

[]File
[  ]New
[    ]Project
[    ]----------
[    ]File
[    ]Folder
[]<other items...>
[]MyItem1  // Instead they appear as additions
[]MyItem2  // to File

2. Assuming I'm doing something wrong, what is the right way to structure
the action set?

3. Assuming I can get what I want, how can I add a separator between my
items and the File/New/Folder menu item?

Here's the action set:

<extension point="org.eclipse.ui.actionSets">

  <actionSet
    label="%actionset.label"
    id="org.foo.bar.actionset">

    <action
      label="MyItem1"
      icon="icons/cview16/action1.gif"
      menubarPath="file/new"
      toolbarPath="Normal/actions"
      class="org.foo.bar.Action1Delegate"
      id="org.foo.bar.actionset.action1">
    </action>

    <action
      label="MyItem2"
      icon="icons/cview16/action2.gif"
      menubarPath="file/new"
      toolbarPath="Normal/actions"
      class="org.foo.bar.Action2Delegate"
      id="org.foo.bar.actionset.action2">
    </action>
  </actionSet>

</extension>






Back to the top