[MonoDevelop] Creating a pad

Matt Ward ward.matt at gmail.com
Sun Feb 19 11:35:56 UTC 2017


Your code looks fine to me. I ran a quick test with Xamarin Studio 6.2,
created a new addin maker project, added your MyPad class and added the
Extension you specified and it worked. The View - Pads menu has a Hello
menu item which when selected creates the MyPad class.

On 18 February 2017 at 20:36, José Cornado <jose.cornado at gmail.com> wrote:

> Hello,
>
> I went through the "create an add-in" how-to and it worked. Now I am
> trying to modify it to create a pad. It fails to instantiate the class. No
> breakpoints are hit. I see the message that the addin was loaded.
>
> It is probably a line in the configuration files but I can't seem to
> pinpoint it.
>
> Thanks a lot!
>
>
> This is what I have:
>
> namespace PadNS
> {
>     public class MyPad : PadContent
>     {
>         Widget control;
>
>         public MyPad()
>         {
>             Console.Out.WriteLine("hello");
>         }
>
>         public override Control Control
>         {
>             get
>             {
>                 return control;
>             }
>         }
>
>         protected override void Initialize(IPadWindow container)
>         {
>             base.Initialize(container);
>             control = new VBox();
>         }
>
>     }
> }
>
> ----------------------------------------
>
> <ExtensionModel>
>     <Extension path = "/MonoDevelop/Ide/Pads">
>         <Pad id = "PadNS.MyPad"
>             class = "PadNS.MyPad"
>             _label="Hello"
>             group = "Logs"
>             defaultLayout="*"
>             defaultPlacement="Bottom"
>             defaultStatus="AutoHide"
>             />
>     </Extension>
> </ExtensionModel>
>
> ----------------------------------------------------------------
>
> using System;
> using Mono.Addins;
> using Mono.Addins.Description;
>
> [assembly: Addin(
>     "MyAddIn",
>     Namespace = "PadNS",
>     Version = "1.0"
> )]
>
> [assembly: AddinName("MyAddIn")]
> [assembly: AddinCategory("IDE extensions")]
> [assembly: AddinDescription("MyPad")]
> [assembly: AddinAuthor("jose")]
> [assembly: AddinDependency("::MonoDevelop.Core", MonoDevelop.BuildInfo
> .Version)]
> [assembly: AddinDependency("::MonoDevelop.Ide", MonoDevelop.BuildInfo
> .Version)]
>
> _______________________________________________
> Monodevelop-list mailing list
> Monodevelop-list at lists.dot.net
> http://lists.dot.net/mailman/listinfo/monodevelop-list
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.dot.net/pipermail/monodevelop-list/attachments/20170219/03c74eef/attachment-0001.html>


More information about the Monodevelop-list mailing list