CDT .cpp source file editor Popup menu help needed [message #77056] |
Thu, 24 July 2003 18:09  |
Eclipse User |
|
|
|
Hello I want to add a right click context menu items to the CDT C++ source
file editor.
I created an extension point like (I simplified it to protect company
information)
<extension point="org.eclipse.ui.popupMenus">
<!--popup menus for my addin-->
<viewerContribution id="com.xxx.Addin.CDTPopupActions"
targetID="#CompilationUnitEditorContext">
<action id="MyActionOnCppFile" label="Label DoSomething"
menubarPath="group.show" icon="path\morepath\mygif.gif" tooltip="a tooltip"
class="com.xxx.addin.interaction.MenuOnCDTEditor"/>
</viewerContribution>
</extension>
But its not showing up, when I open a cpp file and then right click on the
file.
I'm confused by a lot of the syntax
- is ViewerContribution id simply a unique ID I give to my menu item?
- Where do I find out details about what "#CompilationUnitEditorContext"
means and other defines, is this correct for CDT?
- Anything else I need to do, beyond adding this to my fragment, and
flushing out supporting the Java Interface?
- See anything glaringly wrong here?
Thanks for assistance here.
|
|
|
|
Re: CDT .cpp source file editor Popup menu help needed [message #77858 is a reply to message #77237] |
Mon, 04 August 2003 18:58  |
Eclipse User |
|
|
|
Thanks Andrew,
that did it, appreciate the help here :D
"Andrew Niefer" <aniefer@ca.ibm.com> wrote in message
news:bg3b0f$cot$1@eclipse.org...
> I think that for CDT , you want targetID="CEditorContext".
>
> That's the only thing I see wrong with your fragment, (as long as your
class
> MenuOnCDTEditor implements IEditorActionDelegate).
>
> -Andrew
>
>
>
> "Mike" <mboyersmith@rational.com> wrote in message
> news:bfplc9$1l3$1@eclipse.org...
> > Hello I want to add a right click context menu items to the CDT C++
source
> > file editor.
> >
> > I created an extension point like (I simplified it to protect company
> > information)
> >
> > <extension point="org.eclipse.ui.popupMenus">
> > <!--popup menus for my addin-->
> > <viewerContribution id="com.xxx.Addin.CDTPopupActions"
> > targetID="#CompilationUnitEditorContext">
> > <action id="MyActionOnCppFile" label="Label DoSomething"
> > menubarPath="group.show" icon="path\morepath\mygif.gif" tooltip="a
> tooltip"
> > class="com.xxx.addin.interaction.MenuOnCDTEditor"/>
> > </viewerContribution>
> > </extension>
> >
> >
> >
> > But its not showing up, when I open a cpp file and then right click on
the
> > file.
> >
> > I'm confused by a lot of the syntax
> >
> > - is ViewerContribution id simply a unique ID I give to my menu item?
> > - Where do I find out details about what
"#CompilationUnitEditorContext"
> > means and other defines, is this correct for CDT?
> > - Anything else I need to do, beyond adding this to my fragment, and
> > flushing out supporting the Java Interface?
> > - See anything glaringly wrong here?
> >
> > Thanks for assistance here.
> >
> >
> >
> >
> >
> >
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03876 seconds