+1  A: 

Hi!
My approach would be to create a sub-menu and add the actions to this submenu...
Heres a quick snippet which should clarify the usage:

            // submenu for selecting a color for a specific user
            MenuManager subMenu = new MenuManager("Change Status", null);

            // Actions for the color changing
            subMenu.add(someAction);

            // add the action to the submenu
            manager.add(subMenu);

HTH!

Put together:

public SessionViewContextMenu(ViewPart sessionView, TableViewer viewer,
final Action action) {

MenuManager manager = new MenuManager("#PopupMenu");

manager.setRemoveAllWhenShown(true);
manager.addMenuListener(new IMenuListener() {

    public void menuAboutToShow(IMenuManager manager) {
        manager.add(action);
        // submenu for selecting a color for a specific user
        MenuManager subMenu = new MenuManager("Change Status", null);

        // Actions for the color changing
        subMenu.add(someAction);

        // add the action to the submenu
        manager.add(subMenu);
    }
});
Gnark
+1  A: 

thanks a lot for the answer!

Now I am facing another problem:

I have the cascaded contextmenu. I have one action that is supposed to change the status of a selected user....
The problem is that I dont want to write a seperate action for each status change (change to invisible, change to away etc.).
But the MenuManager can only add Actions or ContributionItems - so my question basically is, how do I wrap the action in to such a thing?
The action has the selected User and should also receive information whcih action was set or in other word, what status should be set...