|Contributing Popup Menus for CDT Projects [message #1086161]
||Tue, 13 August 2013 22:36
| Robert Bartlett-Schneider
Registered: August 2013
I've been attempting to create a plugin that contributes an item to contextual menus in the project explorer. What I've got is this:|
name="Do the thing">
label="Do the thing"
Ideally, the menu should only show up when files with the extension ".z" or ".cc" are selected, and then perform the associated action. However, the menu shows up only when selecting files of the aforementioned extension in Java Projects. The menu is absent in C++ projects when right clicking on a file. I can't seem to find an appropriate place for the locationURI that will get it to show up in C++ projects.
Out of curiosity, I tried the plugin in a separate install of Eclipse which lacked the JDT and the menu was nowhere to be found as well. I also used the plugin wizard for "popup menu" addition, and without making any changes, loaded it up and found that the menu contributed by the sample code only shows up in Java projects as well, and is absent from C++ projects.
I hope I'm just missing something here, possibly a different locationURI Any advice is appreciated.
Edit: One thing I tried out of curiosity was editing the .project file and removing the C nature & CC natures from the project, and replacing them with the Java nature. The project looked a tad funky, but the menu did indeed show up. It doesn't show up if I just added the Java nature and left the C/CC natures in place.
[Updated on: Thu, 15 August 2013 14:46]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.07086 seconds