I have an Eclipse RCP based Application, in which I have a menu of one item added through extensions, which is called kill.
I am using this item to be shown upon right click of a tree viewer items. Now, for the various tree items, I add different Actions for different tree items (to be shown in right click of each item).
For TreeItem1 I added additional actions such as do and Dont. For TreeItem2 I added additional Action that is love.
On the right click of items, custom menus are shown (as needed) but the kill is shown at the end of the menu that pops up on the right click. Can anyone have an idea and help me please to make at at the beginning?
current behavior:
TreeItem1->rightclick-> do, dont, kill.
TreeItem2->rightclick-> love, kill
TreeItem3->rightclick-> kill.
Desired behavior:
TreeItem1->rightclick-> kill, do, dont.
TreeItem2->rightclick-> kill, love.
TreeItem3->rightclick-> kill.
Thank you
You can add named separators to the menu using extensions and use the names (or IDs, depending on the extension point) of those separators in menu bar path (or location URI) of the action contribution and when adding actions to menu programmatically.