Protege 4, EditorKitHook and plugin instantiation order

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Protege 4, EditorKitHook and plugin instantiation order

Mariano Rodriguez-Muro
Hi this is a question/request,

Is there any way to ensure that the initialise() method of a  
EditorKitHook
method is called after the it is 100% that all other EditorKitHook  
plugins have
been initialized? Or, to ensure that the initialize method of all  
EditorKitHook
plugins is called in the order defined by the dependencies declared in  
the
META-INF/MANIFEST Require-Bundle: field?

I ask because I have a couple of plugins in which some EditorKit  
dependant
objects are created. There is one of these plugins that requires a  
customization
on the editorkit to be done (using the editorKit.put(key,value)  
method), prior
to his initialization. The initialization of that plugin fails right  
now since
the procedure which initialize all hooks does it in a different order  
than the
expected one.

If its not possible to do right now, could this be added in the future?

Any help will be truly appreciated,

Best regards,
Mariano




Mariano Rodriguez Muro
http://www.inf.unibz.it/~rodriguez/
------------------------------------------------------
KRDB Research Center
Faculty of Computer Science
Free University of Bozen-Bolzano (FUB)
Via della Mostra 4
I-39100 Bozen-Bolzano BZ, Italy



_______________________________________________
protege-owl mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03
Reply | Threaded
Open this post in threaded view
|

Re: Protege 4, EditorKitHook and plugin instantiation order

Nick Drummond
Hi Mariano,

So you are saying that you have multiple EditorKitHooks in separate
bundles? Do they need to be independent of each other?
I could add an ordering attribute to the hooks and then sort them
before initialising - much like the menu ordering mechanism.
I can't use the require-bundle as the ordering mechanism because
multiple EditorKitHooks may exist in one bundle.

Nick

2009/7/21 Mariano Rodriguez <[hidden email]>:

> Hi this is a question/request,
>
> Is there any way to ensure that the initialise() method of a EditorKitHook
> method is called after the it is 100% that all other EditorKitHook plugins
> have
> been initialized? Or, to ensure that the initialize method of all
> EditorKitHook
> plugins is called in the order defined by the dependencies declared in the
> META-INF/MANIFEST Require-Bundle: field?
>
> I ask because I have a couple of plugins in which some EditorKit dependant
> objects are created. There is one of these plugins that requires a
> customization
> on the editorkit to be done (using the editorKit.put(key,value) method),
> prior
> to his initialization. The initialization of that plugin fails right now
> since
> the procedure which initialize all hooks does it in a different order than
> the
> expected one.
>
> If its not possible to do right now, could this be added in the future?
>
> Any help will be truly appreciated,
>
> Best regards,
> Mariano
>
>
>
>
> Mariano Rodriguez Muro
> http://www.inf.unibz.it/~rodriguez/
> ------------------------------------------------------
> KRDB Research Center
> Faculty of Computer Science
> Free University of Bozen-Bolzano (FUB)
> Via della Mostra 4
> I-39100 Bozen-Bolzano BZ, Italy
>
>
>
> _______________________________________________
> protege-owl mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/protege-owl
>
> Instructions for unsubscribing:
> http://protege.stanford.edu/doc/faq.html#01a.03
>
_______________________________________________
protege-owl mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03
Reply | Threaded
Open this post in threaded view
|

Re: Protege 4, EditorKitHook and plugin instantiation order

Mariano Rodriguez-Muro
Hi Nick,

> So you are saying that you have multiple EditorKitHooks in separate
> bundles?

Thats the scenario indeed.

> Do they need to be independent of each other?

Yes, there is one central bundle which provides a base API. On top of it
there is a set of bundles dependent on it and independent from each
other.

> I could add an ordering attribute to the hooks and then sort them
> before initialising - much like the menu ordering mechanism.
> I can't use the require-bundle as the ordering mechanism because
> multiple EditorKitHooks may exist in one bundle.

This would definitely work for the scenario we have here.
An extension of the same idea could be to have both things at the same
time, say, using require-bundle as an initial "external" sorting, and
using an ordering attribute to sort internal "per bundle"  
editorkithook plugins.

In any case, the first method you propose would work for sure.

Thank you for looking into the issue Nick, let me know if you need
anything.

Cheers,
Mariano



>
> Nick
>
> 2009/7/21 Mariano Rodriguez <[hidden email]>:
>> Hi this is a question/request,
>>
>> Is there any way to ensure that the initialise() method of a  
>> EditorKitHook
>> method is called after the it is 100% that all other EditorKitHook  
>> plugins
>> have
>> been initialized? Or, to ensure that the initialize method of all
>> EditorKitHook
>> plugins is called in the order defined by the dependencies declared  
>> in the
>> META-INF/MANIFEST Require-Bundle: field?
>>
>> I ask because I have a couple of plugins in which some EditorKit  
>> dependant
>> objects are created. There is one of these plugins that requires a
>> customization
>> on the editorkit to be done (using the editorKit.put(key,value)  
>> method),
>> prior
>> to his initialization. The initialization of that plugin fails  
>> right now
>> since
>> the procedure which initialize all hooks does it in a different  
>> order than
>> the
>> expected one.
>>
>> If its not possible to do right now, could this be added in the  
>> future?
>>
>> Any help will be truly appreciated,
>>
>> Best regards,
>> Mariano
>>
>>
>>
>>
>> Mariano Rodriguez Muro
>> http://www.inf.unibz.it/~rodriguez/
>> ------------------------------------------------------
>> KRDB Research Center
>> Faculty of Computer Science
>> Free University of Bozen-Bolzano (FUB)
>> Via della Mostra 4
>> I-39100 Bozen-Bolzano BZ, Italy
>>
>>
>>
>> _______________________________________________
>> protege-owl mailing list
>> [hidden email]
>> https://mailman.stanford.edu/mailman/listinfo/protege-owl
>>
>> Instructions for unsubscribing:
>> http://protege.stanford.edu/doc/faq.html#01a.03
>>
> _______________________________________________
> protege-owl mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/protege-owl
>
> Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03

Mariano Rodriguez Muro
http://www.inf.unibz.it/~rodriguez/
------------------------------------------------------
KRDB Research Center
Faculty of Computer Science
Free University of Bozen-Bolzano (FUB)
Via della Mostra 4
I-39100 Bozen-Bolzano BZ, Italy



_______________________________________________
protege-owl mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03