How to display all possible actions in popup menu when use my own object that adapted to IResource? [message #462155] |
Wed, 24 January 2007 00:09 |
Eclipse User |
|
|
|
Originally posted by: askxuefeng.gmail.com
Hi everybody!
I'm new to eclipse plugin dev, now I have to write my own project explorer
to re-arrange the structure of our own project just like JDT's "package
explorer".
I use my own objects (MyProject, MyFolder, MyFile extends PlatformObject)
for tree viewer and adapted it to IResource, but when right click an element
in tree, only team-related actions appears:
-----------------------------
Action 1
Action 2
-----------------------------
Go Home
Go Back
Go Into
-----------------------------
Team
Compare With
Replace With
Restore from Local History
PDE Tools
-----------------------------
I want to display all possible actions including "New", "Cut", "Copy",
"Refresh"..., is there any other interface that i should have to implement?
Or something wrong with my popup menu code:
private void fillContextMenu(IMenuManager manager) {
manager.add(my_action1);
manager.add(my_action2);
manager.add(new Separator());
drillDownAdapter.addNavigationActions(manager);
// Other plug-ins can contribute there actions here
manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
}
Thanks!
Yours,
sincerely,
Liao Xuefeng
Email: askxuefeng@gmail.com
|
|
|
Powered by
FUDForum. Page generated in 0.03544 seconds