Protege 4 plugin action to existing view componenet

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

Protege 4 plugin action to existing view componenet

Lorenz Buehmann

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

i'm wondering if and how it is possible to add an additional action to
some existing view components? For example, I'm currently trying to add
an additional action to the existing class hierarchy view component, but
don't know which plugin type i have to use.


Kind regards,

Lorenz
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJP+BG+AAoJEI97YhPimK8yq7IH/iaPMYjn4Ym4ZIoUgyMxlV0o
lEfqlqTZXoOirH3ORGMqXtQQxr5kwoKaFKdS/PocOCXjjTFYe3aSWvPMWfsQpFo7
mpnNv6pzGcT2Fw70nmWRrXOKJ8RfjelzwDF++own+GLaCMVRqEE2luJNKmZwRD15
RlXJnwiifCW65qddITyTfzH2NEkJbPPnmfpjrtP1jF6kP2WEaYVfKDlPOYN2nT9n
w4g0yJMz7nBEc4cjxDn0cEUX5xTZ8+ATEuwbh1EbEdiVP6+IntIylo+F0whbo9Yd
gCRZA+5+Ehk3JeULI4ENwMX4jo5EJL7h4yI7XShJchf5NWVIEIj7Vcci32mtpYs=
=JSPg
-----END PGP SIGNATURE-----

_______________________________________________
p4-feedback mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/p4-feedback
Reply | Threaded
Open this post in threaded view
|

Re: Protege 4 plugin action to existing view componenet

Timothy Redmond

Apologies for the delayed reply.
> i'm wondering if and how it is possible to add an additional action to
> some existing view components? For example, I'm currently trying to add
> an additional action to the existing class hierarchy view component, but
> don't know which plugin type i have to use.

In theory - modulo the usual problems with reusing code - this should
not be a problem.  Plugins are declared in the plugin.xml file of a
plugin.  So for instance, in the plugin.xml file from the
org.protege.editor.owl.jar plugin, the declaration of the class
hierarchy view looks like this:

     <extension id="OWLAssertedClassHierarchy"
                point="org.protege.editor.core.application.ViewComponent">
         <label value="Class hierarchy"/>
         <class value="org.protege.editor.owl.ui.view.cls.ToldOWLClassHierarchyViewComponent"/>
         <headerColor value="@org.protege.classcolor"/>
         <category value="@org.protege.classcategory"/>
         <navigates value="@org.protege.classcategory"/>
     </extension>


The class that implements the logic of the view is the
ToldOWLClassHierarchyViewComponent.  You could subclass this class in
your plugin and add a corresponding entry in your plugin.xml for your
plugin.

If you are going to do this, I would recommend that you take a look at
the developer documentation [1] including in particular [2].

-Timothy


[1] http://protegewiki.stanford.edu/wiki/Protege4DevDocs
[2] http://protegewiki.stanford.edu/wiki/PluginAnatomy



On 07/07/2012 03:38 AM, Lorenz Buehmann wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
>
> i'm wondering if and how it is possible to add an additional action to
> some existing view components? For example, I'm currently trying to add
> an additional action to the existing class hierarchy view component, but
> don't know which plugin type i have to use.
>
>
> Kind regards,
>
> Lorenz
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iQEcBAEBAgAGBQJP+BG+AAoJEI97YhPimK8yq7IH/iaPMYjn4Ym4ZIoUgyMxlV0o
> lEfqlqTZXoOirH3ORGMqXtQQxr5kwoKaFKdS/PocOCXjjTFYe3aSWvPMWfsQpFo7
> mpnNv6pzGcT2Fw70nmWRrXOKJ8RfjelzwDF++own+GLaCMVRqEE2luJNKmZwRD15
> RlXJnwiifCW65qddITyTfzH2NEkJbPPnmfpjrtP1jF6kP2WEaYVfKDlPOYN2nT9n
> w4g0yJMz7nBEc4cjxDn0cEUX5xTZ8+ATEuwbh1EbEdiVP6+IntIylo+F0whbo9Yd
> gCRZA+5+Ehk3JeULI4ENwMX4jo5EJL7h4yI7XShJchf5NWVIEIj7Vcci32mtpYs=
> =JSPg
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> p4-feedback mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/p4-feedback


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