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-discussion] Problems to Develop a Protege Plug in with Eclipse

Isaac Lera isaac.lera at gmail.com
Mon Jul 30 00:59:02 PDT 2007


Finally, I find the problem. My plug in only worked in the workspace
directory of the eclipse projects. The same directory moved to protege
directory did not work.... I don't still know it.
But now,I build the project with Ant and i obtain the jar file. This Jar
file contains the manifest file and class files. Plugin.properties file is
not necessary.

I paste my generic ant-build:

<?xml version = "1.0" encoding = "utf-8"?>
<project name = "AlignProtege" default = "compile" basedir = ".">
   <property name = "src" value = "./src"/>
   <property name = "classes" value = "./classes"/>
   <property name = "plugins" value = "./plugins"/>
   <property name = "lib" value = "./lib"/>
   <property name = "plugin_dist" value = "tabwidget"/>
   <property name = "dist" value = "dist.zip"/>
   <path id = "project.classpath">
     <pathelement location = "${lib}/protege.jar"/>
   </path>

   <target name = "init">
     <mkdir dir = "${classes}"/>
     <mkdir dir = "${plugins}"/>
     <mkdir dir = "${plugins}/${plugin_dist}"/>
   </target>


   <target name = "compile" depends = "init">
     <javac srcdir = "${src}" destdir = "${classes}" debug="on">
       <classpath refid = "project.classpath"/>
     </javac>
   </target>

   <target name = "jar" depends = "compile">
     <jar jarfile = "${plugins}/${plugin_dist}/AlignTab.jar"
          basedir = "${classes}"
          manifest = "META-INF/MANIFEST.MF"/>
   </target>

   <target name = "dist" depends = "jar">
     <zip basedir = "${plugins}"
          destfile = "${dist}"/>
   </target>

   <target name = "clean">
     <delete dir  = "${plugins}"/>
     <delete dir  = "${classes}"/>
     <delete file = "${dist}"/>
   </target>

</project>


Thank to you!
Greets
Isaac

2007/7/27, Thomas Russ <tar at isi.edu>:
>
>
> On Jul 27, 2007, at 1:16 AM, Isaac Lera wrote:
>
> > Thomas Russ escribió:
> >> On Jul 26, 2007, at 9:47 AM, Isaac Lera wrote:
> >>
> >>> Hi everybody,
> >>>
> >>> I try to develop a protege plug in (tab widget) with eclipse tool
> >>> but I don't see my tab plug in on protege (project->configure)
> >>> window tab widgets.
> >>> I follow the web tutorial: http://protege.stanford.edu/doc/pdk/
> >>> plugins/tab_widget.html and
> >>> I configure my eclipse with: an output folder as external link to
> >>> protege plug in directory and VM directive
> >>> -Dprotege.dir=/home/xx/Protege_3.3_beta/
> >>> The manifest file is copied too....
> >>>
> >>> I don't know like solving it. Do anyone have an small eclipse
> >>> project with correct configuration or a little tutorial...?
> >>
> >> Perhaps you could show us what the Manifest file and
> >> plugin.properties files look like?
> >> One of the important points is that blank lines in the manifest file
> >> are important, especially having a blank line as the final line in
> >> the file.
> >>
> >> The other thing is to look at the console output when Protege
> >> launches and see if there are any messages that give you a hint.
> >>
> >> _______________________________________________
> >> protege-discussion mailing list
> >> protege-discussion at lists.stanford.edu
> >> https://mailman.stanford.edu/mailman/listinfo/protege-discussion
> >>
> >> Instructions for unsubscribing: http://protege.stanford.edu/doc/
> >> faq.html#01a.03
> >>
> > I have added  the "blank extra line" in the manifest file but the
> > plugin still don't run it.
> > I don't have the plugin.properties files. In the tutorial not is
> > mentioned. Is it necessary?
>
> Yes, I think the plugin.properties file is now required, although the
> documentation about them is not completely clear.  (Look at <http://
> protege.stanford.edu/doc/pdk/plugins/plugin_support_21.html>)
> Try adding one like the following and place it in the plugin
> directory with the other code:
>
> plugin.properties
> ==========  File contents follow this line ======
> plugin.component.count=1
> plugin.component.name.0=Align Tab
>
>
>
>
> >
> >
> > and more information:
> >
> > * My manifest file in protege dir is:
> > Protege_3.3_beta/plugins/
> >  +   tabwidget/ (my tab)
> >         AlignTab.class
> >         AlignTab$1.class
> >  +  meta-inf/
> >        manifest.mf
> >        manifest.tabwidget
> >
> >
> > * Manifest file (have a blank line):>
> > -------------------------------------------------------
> > Manifest-Version: 1.0
> >
> > Name: tabwidget/AlignTab.class
> > Tab-Widget: True
> >
> > -----------------------------------------------------
> >
> >
> > * This is the console output of Protege :>
> > CONFIG: Protege 3.3 Build 414, JVM 1.6.0-b105, memory=66M, Linux,
> > encoding=UTF-8, language=es, country=ES
> > CONFIG: Loaded plugin edu.stanford.smi.protegex.standard_extensions
> > - Graph Widget, Table Widget
> > CONFIG: Loaded plugin edu.stanford.smi.protegex.datamaster -
> > DataMaster Tab
> > CONFIG: Loaded plugin edu.stanford.smi.protege.script - Script Plugin
> > CONFIG: Loaded plugin uk.ac.man.cs.mig.coode.owlunittest
> > ...
> > CONFIG: Loaded plugin tabwidget
> > ....
> > CONFIG: Loaded plugin uk.ac.man.cs.mig.coode.manchesterowlsyntaxeditor
> > CONFIG: Loaded plugin uk.ac.man.cs.mig.coode.owlindividualstab
>
> Well, it looks like it is being loaded.  I presume you don't see it
> in the Configure dialog?
>
>
> >
> > ...
> >
> >
> > Thanks to you!
> >
> >
> > _______________________________________________
> > protege-discussion mailing list
> > protege-discussion at lists.stanford.edu
> > https://mailman.stanford.edu/mailman/listinfo/protege-discussion
> >
> > Instructions for unsubscribing: http://protege.stanford.edu/doc/
> > faq.html#01a.03
>
> _______________________________________________
> protege-discussion mailing list
> protege-discussion at lists.stanford.edu
> https://mailman.stanford.edu/mailman/listinfo/protege-discussion
>
> Instructions for unsubscribing:
> http://protege.stanford.edu/doc/faq.html#01a.03
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.stanford.edu/pipermail/protege-discussion/attachments/20070730/2d4d0b08/attachment.html>


More information about the protege-discussion mailing list