[Monodevelop-devel] Adding a context menu item in an Add-In for MonoDevelop 2.4.2

Mike Krüger mkrueger at novell.com
Thu Mar 24 09:00:57 EDT 2011


Hi

The path  "/MonoDevelop/SourceEditor2/ContextMenu/Editor" is the correct 
one - you don't need to use  "/MonoDevelop/SourceEditor/ContextMenu/Editor".

Did you add the "SourceEditor2" into the dependencies - something like :

<Dependencies>
<Addin id="SourceEditor2" version="2.6"/>
</Dependencies>

Regards
Mike
> I'm writing an add-in for MonoDevelop, starting from
> http://monodevelop.com/Developers/Articles/Creating_a_Simple_Add-in. I
> have this working, and would like to add a context menu in the source
> code and the xml editors. Unfortunately the page
> http://monodevelop.com/Developers/Articles/The_Command_System has only
> "TODO" under the context menu section.
>
> Browsing the latest source from Git I've tried all of the following,
> but none of them work:
>
>      <Extension path = "/MonoDevelop/Ide/SourceEditor/ContextMenu/Editor">
>          <CommandItem
> id="MonoDevelop.Samples.DateInserter.DateInserterCommands.InsertDate"
> />
>      </Extension>
>
>      <Extension path = "/MonoDevelop/Ide/SourceEditor2/ContextMenu/Editor">
>          <CommandItem
> id="MonoDevelop.Samples.DateInserter.DateInserterCommands.InsertDate"
> />
>      </Extension>
>
>      <Extension path = "/MonoDevelop/SourceEditor/ContextMenu/Editor">
>          <CommandItem
> id="MonoDevelop.Samples.DateInserter.DateInserterCommands.InsertDate"
> />
>      </Extension>
>
>      <Extension path = "/MonoDevelop/SourceEditor2/ContextMenu/Editor">
>          <CommandItem
> id="MonoDevelop.Samples.DateInserter.DateInserterCommands.InsertDate"
> />
>      </Extension>
>
>
> btw I'd be happy to update that page, if appropriate.
>
> thanks,
>
> Jools
> _______________________________________________
> Monodevelop-devel-list mailing list
> Monodevelop-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/monodevelop-devel-list



More information about the Monodevelop-devel-list mailing list