1:在创建一般actionset的一个action扩展,并选择 style 为 pulldown
2:一般action继承IWorkbenchWindowActionDelegate ,这时候需要继承
IWorkbenchWindowPulldownDelegate
3:是在getMenu方法中写
MenuManager mm=new MenuManager();
Menu menu =mm.createContextMenu(parent);
mm.add(new Action("aaaaaaaaaaaaa"){});
return menu;
这里添加action 可以从 CommandService中得到对应的Action,前提是你的action在服务中注册了)。