making tab widget plugin visible

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

making tab widget plugin visible

Rajesh Kumar-3

Hi,

I am going through the tutorial on making your own tab widget plugin. I
downloaded the sample plugin "FrameCounter", compiled it and put it in
the plugins folder of the Protege installation.

My Protege installation did not have a meta-inf folder in the plugins
directory but was working fine. I tried putting in the meta-inf folder
in plugins and the entry for the new plugin in the included
"manifest.mf" file but that does not work.

Protege starts correctly but when I go to "Project -> Configure " I do
not see the new plugin listed.

I am using Protege version 3.1.1 and using java 1.4.2 to compile the
plugin. I changed the name of the package inside the "FrameCounter.java"
file to "TestTab" instead of "examples.tabwidget" and put the
"FrameCounter.class" and other class files inside a folder called
"TestTab" in the plugins folder.

Any pointers on what could be going wrong will be very  helpful.
Thanks,
Rajesh

-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html

Reply | Threaded
Open this post in threaded view
|

Re: making tab widget plugin visible

Rajesh Kumar-3

Forgot to add - I did go through the FAQ on this topic before posting.
So I think it may be something else that I'm missing.

Rajesh Kumar wrote:

>Hi,
>
>I am going through the tutorial on making your own tab widget plugin. I
>downloaded the sample plugin "FrameCounter", compiled it and put it in
>the plugins folder of the Protege installation.
>
>My Protege installation did not have a meta-inf folder in the plugins
>directory but was working fine. I tried putting in the meta-inf folder
>in plugins and the entry for the new plugin in the included
>"manifest.mf" file but that does not work.
>
>Protege starts correctly but when I go to "Project -> Configure " I do
>not see the new plugin listed.
>
>I am using Protege version 3.1.1 and using java 1.4.2 to compile the
>plugin. I changed the name of the package inside the "FrameCounter.java"
>file to "TestTab" instead of "examples.tabwidget" and put the
>"FrameCounter.class" and other class files inside a folder called
>"TestTab" in the plugins folder.
>
>Any pointers on what could be going wrong will be very  helpful.
>Thanks,
>Rajesh
>
>-------------------------------------------------------------------------
>To unsubscribe go to http://protege.stanford.edu/community/subscribe.html
>
>
>  
>

-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html

Reply | Threaded
Open this post in threaded view
|

Re: making tab widget plugin visible

Tania Tudorache

Rajesh,

>>I am using Protege version 3.1.1 and using java 1.4.2 to compile the
>>plugin. I changed the name of the package inside the "FrameCounter.java"
>>file to "TestTab" instead of "examples.tabwidget" and put the
>>"FrameCounter.class" and other class files inside a folder called
>>"TestTab" in the plugins folder.
>>    
>>
when you add the class files to the plugins directory, you need to have
the same directory structure in the plugins directory as the one in the
Java package of your plugin. It is easier to package your plugin as a
jar together with the manifest file and copy the jar in the plugins
directory (as described in our documentation on the website).

But, if you prefer to use class files, this is what you need to do for
your example:
1. Create a directory in the plugins directory, for example,
"MyTestPlugin" (it can be any name)
2. In the "MyTestPlugin" folder, copy the class files and the directory
structure corresponding to the Java package. In your case, if your
plugin is in package TestTab (so the fully qualified name of the plugin
class is TestTab.FrameCounter), then create a folder "TestTab" and copy
in it the FrameCounter.class
3. In "MyTestPlugin" folder, create a folder "meta-inf" and create in it
a file manifest.mf which contains the following lines:

Manifest-Version: 1.0

Name: TestTab.FrameCounter.class
Tab-Widget: True

(--- leave a blank line at the end of the file ---)

That's it. Your plugin should now show up in the "Configure" Tab.

Tania
-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html

Reply | Threaded
Open this post in threaded view
|

Re: making tab widget plugin visible

Rajesh Kumar-3

Thanks very much. That works.

The reason I am using class files right now is that I am developing the
plugin and would like to test it incrementally as I go along. (Maybe I
can use some tool to generate JARs after every incremental change but I
had thought that using Class files would be much simpler)

>
> But, if you prefer to use class files, this is what you need to do for
> your example:
> 1. Create a directory in the plugins directory, for example,
> "MyTestPlugin" (it can be any name)
> 2. In the "MyTestPlugin" folder, copy the class files and the directory
> structure corresponding to the Java package. In your case, if your
> plugin is in package TestTab (so the fully qualified name of the plugin
> class is TestTab.FrameCounter), then create a folder "TestTab" and copy
> in it the FrameCounter.class
> 3. In "MyTestPlugin" folder, create a folder "meta-inf" and create in it
> a file manifest.mf which contains the following lines:
>
> Manifest-Version: 1.0
>
> Name: TestTab.FrameCounter.class
> Tab-Widget: True
>
> (--- leave a blank line at the end of the file ---)
>
> That's it. Your plugin should now show up in the "Configure" Tab.
>
> Tania
> -------------------------------------------------------------------------
> To unsubscribe go to http://protege.stanford.edu/community/subscribe.html
>
>
>  


-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html