Search Mailing List Archives


Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[protege-owl] My new plugin isn't showed

Massimo Coletti mailing.coletti at finnat.it
Wed Sep 20 00:20:40 PDT 2006


Petros,

many thanks for your reply. I have already spent some hours checking all 
the documentation, and the config. of the other plugins, trying to 
figure out what is wrong.
I really believe that is a situation where a "macroscopic" error is 
invisible to me, and may appear evident to someone else. I have already 
checked what you are suggesting.

Cheers,

Massimo

Papapanagiotou Petros ha scritto:
> The number 1 reason why the plugin wouldn't show in the list (even 
> though it appears to have been loaded the way you descibe) for me was 
> some error in the Manifest file.
>   
The full plugin directory path is the following: 
C:\programmi\Protege_3.2_beta\plugins\net.mcoletti.protege.velocity

This dir contains two jars: one is velocity.jar, the standard 
deliverable by Apache Foundation, and velociowl.jar, created with the 
jar packager of Eclipse. The second jar contains a META-INF directory 
(along with the .class directory tree.
The META-INF dir contains just the MANIFEST.MF file: I have copied the 
manifest content in my original message.
The path: 
C:\programmi\Protege_3.2_beta\plugins\net.mcoletti.protege.velocity\velociowl.jar\net\mcoletti\protege\velocity\ 
contains the VelocityTabWidget.class file.
> The manifest file should exist within a "meta-inf" folder inside the jar 
> file and named "MANIFEST.MF". You can compare the structure with one of 
> the other default plugins (just open the respective jar file with a zip 
> program).
> Its contents seem fine but its correct location is of equal importance!
>   
I have also noticed that the developer documentation instruct to code 
the class name separating the package path with forward slashes, and 
reporting the class name including the .class suffix, while most plugins 
report the dot-separated name of the class, without the .class suffix.
I have tried both configuration, without any noticeable difference.
> The "CONFIG: Loaded plugin net.mcoletti.protege.velocity - Velocity Tab" 
> line only indicates that the plugin folder and plugin.properties file 
> (which is outside the jar file) have been located/parsed, NOT that the 
> plugin code has been loaded correctly. (You can verify that by actually 
> removing everything else except the folder itself and the 
> plugin.properties file! :P )
>
> Note that if the plugin is loaded correctly but has errors in the code 
> it will appear at the bottom of the "Project->Configure" list in italics 
> (along with the tabs whose isSuitable method returned false) so you 
> might also want to double check it doesn't appear there - at the bottom.
>   
Unfortunately, the plugin isn't listed at all.
> I hope I've helped, cause really nothing else seems to be wrong!
>
> Be well,
> Papapanagiotou Petros
>
> Massimo Coletti wrote:
>   
>> Hi,
>>
>> I am sorry to repeat a recurring question, but I wasn't able to find a 
>> resolutive answer in previous posts.
>>
>> I have developed a tool to integrate Velocity in Protege, in order to 
>> create reports from an ontology.
>> Now I would like to transform it in a plugin, in order to make it more 
>> usable.
>>
>> Following the documentation I have:
>> - created a jar velociowl.jar, and placed in a directory 
>> plugins/net.mcoletti.protege.velocity
>> - the jar contains a manifest witht he content:
>>
>> Manifest-Version: 1.0
>>
>> Name: net/mcoletti/protege/velocity/VelocityTabWidget.class
>> Tab-Widget: True
>>
>> (one white line before and after the plugin entry)
>>
>> The directory contains also the velocity.jar library, and a 
>> plugin.properties file with the content:
>> plugin.component.count=1
>> plugin.component.name.0=Velocity Tab
>> plugin.dependency.count=1
>> plugin.dependency.0=edu.stanford.smi.protegex.owl
>>
>> The jar contains one class:
>>
>> package net.mcoletti.protege.velocity;
>>
>> public class VelocityTabWidget extends AbstractTabWidget {
>> ...
>> ...
>>     public void initialize() {
>>            // initialize the tab label
>>         setLabel("Velocity");
>>         setIcon(Icons.getQueryIcon());
>>         System.out.println(INIT_MESSAGE);
>>         field = new JTextField(10);
>>         field.setText("testo di prova");
>>         field.setEnabled(true);
>>         field.setHorizontalAlignment(SwingConstants.RIGHT);
>>
>>         // add the components to the tab widget
>>         setLayout(new FlowLayout());
>>         add(field);
>>  
>>     }
>>        public static boolean isSuitable(Project project, Collection 
>> errors) {
>>             return true;
>>
>> So, I believe that the requirements are satisfied:
>> - the plugin class extends the proper Abstract plugin class
>> - initialize() and isSuitable() methods are implemented
>> - the jar is installed in a subdir of plugins directory
>> - the manifest entry matches the class name
>>
>> When Protege starts, the console shows that my plugins is being loaded:
>>
>> ...
>> ...
>> CONFIG: Loaded plugin JessTab - JessTab Plugin
>> CONFIG: Loaded plugin lu.tudor.citi.demoisel.docgen - docgen, docgen 
>> export project, lu.tudor.citi.demoisel.docgen
>> CONFIG: Loaded plugin net.mcoletti.protege.velocity - Velocity 
>> Tab        <=== MY PLUGIN
>> CONFIG: Loaded plugin org.algernon - Algernon
>> ...
>> ...
>>
>> But the plugin isn't showed either in the Project->Configuration or in 
>> the OWL preference -> Tabs
>>
>>
>> So, what's wrong???
>>
>> Many thanks
>>
>> Massimo
>>
>> P.S. obviously, my plugin will be published!
>>
>>
>>
>> This e-mail and any attachments may contain confidential and
>> privileged information. If you are not the intended recipient,
>> please notify the sender immediately by return e-mail, delete this
>> e-mail and destroy any copies. Any dissemination or use of this
>> information by a person other than the intended recipient is
>> unauthorized and may be illegal.
>> _______________________________________________
>> protege-owl mailing list
>> protege-owl at lists.stanford.edu
>> https://mailman.stanford.edu/mailman/listinfo/protege-owl
>>
>>   
>>     
> _______________________________________________
> protege-owl mailing list
> protege-owl at lists.stanford.edu
> https://mailman.stanford.edu/mailman/listinfo/protege-owl
>   



This e-mail and any attachments may contain confidential and
privileged information. If you are not the intended recipient,
please notify the sender immediately by return e-mail, delete this
e-mail and destroy any copies. Any dissemination or use of this
information by a person other than the intended recipient is
unauthorized and may be illegal.



More information about the protege-owl mailing list