[MonoDevelop] StartupHandler
Steven Schermerhorn
stevens at ischyrus.com
Wed Jan 19 19:20:23 EST 2011
An embedded and charset-unspecified text was scrubbed...
Name: TestAddin.zip.txt
Url: http://lists.ximian.com/pipermail/monodevelop-list/attachments/20110119/7fa284af/attachment.txt
-------------- next part --------------
That does seem to have done the trick either. To help make this easier, I created a play extension and attached it. If you drop this into ~/main/src/addins and add it to Main.sln it should be pretty easy to see that it isn't working.
I seem to get erratic messaging too. For example, sometimes it'll tell me there is an error and other times it just does nothing.
-Steven
On Jan 19, 2011, at 3:21 AM, Lluis Sanchez Gual wrote:
> Hi,
>
> You need to declare a dependency to the MonoDevelop.Ide addin:
>
> [assembly:AddinDependency ("MonoDevelop.Ide", "2.4"]
>
> Lluis
>
> El dt 18 de 01 de 2011 a les 22:11 -0800, en/na Steven Schermerhorn va
> escriure:
>> I am trying to create an Addin that runs at startup and am having some
>> problems.
>>
>>
>> I set breakpoints in each of the methods below, however they don't get
>> hit however my extension does appear in the Addins dialog as being
>> installed and enabled.
>>
>>
>> Here is my extension:
>>
>>
>> [assembly: Addin("MyTestExtension")]
>> namespace MyTestExtension
>> {
>> [Extension("/MonoDevelop/Ide/StartupHandlers")]
>> class MyTest : CommandHandler
>> {
>>
>> public MyTest()
>> {
>> System.Console.WriteLine("MyTest creatd!");
>> }
>>
>> protected override void Run ()
>> {
>> System.Console.WriteLine("MyTest ran!!");
>> System.Diagnostics.Debugger.Break();
>> int i = 0;
>> i += 3;
>>
>> base.Run ();
>> }
>>
>> protected override void Run (object state)
>> {
>> int i = 0;
>> i += 3;
>> }
>> }
>> }
>>
>>
>> I also tried using a config file rather than attributes, however get
>> the same result:
>>
>>
>> <Addin id="MyTestExtension"
>> namespace="MonoDevelop"
>> name="MyTestExtension"
>> author="Steven Schermerhorn"
>> copyright="MIT X11"
>> url="http://sample.com"
>> description="MyTestExtension"
>> category="IDE extensions"
>> version="2.6">
>>
>> <Extension path = "/MonoDevelop/Ide/StartupHandlers">
>> <Class class="MyTestExtension.MyTest" />
>> </Extension>
>> </Addin>
>>
>>
>> I am running this against the latest monodevelop. I have attempted
>> using my own build of Mono.Addins so that I can step through what is
>> going on but haven't gotten that far yet.
>>
>>
>> Can anyone see anything obviously wrong?
>>
>>
>> -Steven
>>
>>
>> _______________________________________________
>> Monodevelop-list mailing list
>> Monodevelop-list at lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/monodevelop-list
>
>
More information about the Monodevelop-list
mailing list