|Adding menu item in contextmenu to appear in both Project Explorer and CEditor ? [message #974849]
||Wed, 07 November 2012 11:29
| RajuBabu Gurram
Registered: September 2012
I'm new to plug-in development in Eclipse.I am trying to add a menu item "compile" to popup menu in Project Explorer and C Editor area in Helios. And it should visible only when if the resource is .c or .cpp file. I'm doing it as follow
<command description="Compile sigle file"
<test property="org.eclipse.core.resources.name" value="*.c"/>
<test property="org.eclipse.core.resources.name" value="*.cpp"/>
<command commandId="com.abc.xyz.compilesinglefile" style="push">
It is working partially correct but behaves strangely.
1) First, if I click on files that are my type in Project Explorer, its working good and "Compile" is visible. Clicking on other files and folders the command is not visible, it is correct.
2) But, if I click on files that are my type in Editor Area, command visible. Then I tried to go back to Project Explorer and clicking on files and folders that are NOT my type, shows the command "Compile" in popup menu. In other cases working good except this case.
What is wrong with the code here?
Please help me on this.
Thanks in advance!!
Powered by FUDForum
. Page generated in 0.02923 seconds