LintRoll Protégé User Guide
Installation Instructions:
- Quit Protégé if running
- Copy and paste the plug-in jar file (uk.ac.manchester.cs.lintroll.jar) into the plugins sub-directory in your Protégé plugin folder
- Copy and paste all the plugins containing your Lint checks in the
your Protégé plugin folder
- Start Protégé
Once selected your Lint Roll will contain on the right hand side a list of selectable Lint checks corresponding to the Lint check that could be loaded by the plug-in. If your Lint is not there it means it could not be loaded by the plug-in. Please make sure that you followed the instructions available at How To expose my Lint checks as Protege 4 plug-ins
Select amongst the available ones the Lint checks you want to perform on the current active ontologies. As soon as the selected Lint checks set is not empty the Detect LInt button in the toolbar will become enabled
Once clicked the Lint checks will be carried out on all the loaded ontologies and their reports will be displayed, indexed by ontology. Please notice that some objects may appear in more than on ontology. Although it depends on the particular Lint check implementations, very often they check characteristics of the objects/axiom referenced in each single ontology. Therefore, an ontology imports another one, it will reference all its axioms and objects, hence the Lint check will probably report for the importing ontology, a super-set of the imported one(s).
Acting Lint checks provide their own strategy for fixing the problems they detect. The plug-in is able to recognise them and mark them with a small hammer icon beside their report
If you select such Lint reports the Fix button below will be enabled and, once clicked, will perform the actions the Lint check provides to fix the problem.
Expose my Lint checks as a Protégé plugin
The most basic version of plug-in containing Lint checks should contain the following items
- Your Lint check implementation. Let us suppose you have just one,
for the sake of simplicity, whose fully qualified Java class name is
com.mypackage.MyLint
- A manifest file for your plug-in
MANIFEST.MF
which will look like the following
Manifest-Version:
1.0
Bundle-ManifestVersion: 2
Bundle-Name: MYLINTCHECKS
Bundle-SymbolicName: com.mypackage.lint;singleton:=true
Bundle-Category: protege
Bundle-Description: Lint checks plug-in specific for fun
Bundle-Vendor: My Package Company
Bundle-ClassPath: .
Import-Package: org.osgi.framework,
org.apache.log4j,
javax.swing,
javax.swing.border,
javax.swing.colorchooser,
javax.swing.event,
javax.swing.filechooser,
javax.swing.plaf,
javax.swing.plaf.basic,
javax.swing.plaf.metal,
javax.swing.plaf.multi,
javax.swing.plaf.synth,
javax.swing.table,
javax.swing.text,
javax.swing.text.html,
javax.swing.text.html.parser,
javax.swing.text.rtf,
javax.swing.tree,
javax.swing.undo,
org.w3c.dom,
org.w3c.dom.bootstrap,
org.w3c.dom.events,
org.w3c.dom.ls,
org.xml.sax,
org.xml.sax.ext,
org.xml.sax.helpers,
javax.xml.parsers
Bundle-Version: 1.0.0
Export-Package: com.mypackage
Bundle-Activator: org.protege.editor.core.plugin.DefaultPluginActivator
Require-Bundle: org.eclipse.equinox.registry,
org.eclipse.equinox.common,
org.protege.editor.core.application,
org.protege.editor.owl,
org.semanticweb.owl.owlapi,
- A
plugin.xml
file that designates your Lint check implementation as an extension that can be loaded as a Protégé lint check which should look like the follwing
<?xml version="1.0" ?>
<plugin>
<extension id="MyVeryFirstLint"
point="uk.ac.manchester.cs.lintroll.lint">
<label value="My VeryFirst Important Lint Check"/>
<class value="com.mypackage.MyLint"/> </extension>
</plugin>
As far Lint check plug-ins are concerned please make sure you check the following very important conditions
- In your manifest file
MANIFEST.MF
you need to export the package that contains your lint check implementation as well as all the packages containing classes that are referenced in your Lint check implementation. - Your bundle class path must
contain the necessary class path for your lint check
libraries if they need them.