Difference between revisions of "Protege4DevDocs"

From Protege Wiki
Jump to: navigation, search
m
(cleaned up some of the language on this page)
Line 6: Line 6:
 
__TOC__
 
__TOC__
  
== Working with Protege 4 source code ==
+
== Working with the Protege source code ==
  
 
=== Preliminaries ===
 
=== Preliminaries ===
  
To Do List:
+
TODO: We need a high-level description here about how the 4.x source code is organized, since it's different than the 3.x series, e.g. we are using the OSGi plug-in architecture now, etc.
  
- Maybe some high-level description here would be helpful about how source code is organized since it's different than 3.3.1, i.e., we're using OSGi now?<br /><br />
+
Before loading the Protege 4 sources into Eclipse, developers need to decide if they want all of the Protege sources in one big project or if they want separate projects for each of the Protege 4 plug-ins. We put together a list of  [[OneBigProjectVsSeveralSmallProjects|pros and cons of working with one big project vs. several smaller projects]]. You may want to read the condensed version first (below), which often leads to an answer:
  
Before loading the Protege 4 source code into eclipse, the developer needs to decide whether he wants to see all the protege sources in one big project or to see several projects for each of the different Protege 4 plugins.  We have deveoped the following list of  [[OneBigProjectVsSeveralSmallProjects|pros and cons of working with one big project vs. several smaller projects]] but here is a short list of criteria that may often lead to an answer:
+
* Eclipse developers will generally favor having several smaller projects. Eclipse provides nice support for defining extensions and extension points and will detect problems in both manifest files and the plugin.xml files.
<ul>
 
<li> Eclipse developers will generally favor having several smaller projects. Eclipse provides nice support for defining extensions and extension points and will detect problems in both the manifest and the plugin.xml.
 
<li> Plugin developers will probably generally do better with several smaller projects.  They do not need to make changes to the core protege plugins and can use an appropriate Protege 4 release to create their runnable.
 
<li> Non-eclipse developers who are working with all the Protege sources (e.g. the Protege development team or developers who need tight coordination with Protege developments) will probably prefer to work with one single large project.
 
</ul>
 
Once this decision has been made a developer can choose between one of the following approaches to work with the source code.
 
  
=== Compiling and Running the Protege 4 OWL editor ===
+
* Plug-in developers will generally do better with several smaller projects since they do not need to make changes to the core Protege sources.  They can also choose an appropriate Protege 4 build to create runnables.
 +
 
 +
* Non-Eclipse developers who are working with all the Protege sources (e.g., the Protege development team or developers who need tight coordination with Protege sources) will probably prefer to work with one single large project.
 +
 
 +
Once this decision has been made, please refer to the next section on compiling and running Protege 4.  Instructions for both methods  of working with the source code are outlined in detail.
 +
 
 +
 
 +
=== Compiling and Running the Protege-OWL editor ===
 +
 
 +
* [[CompileProtege4InEclipse|Compile and run the Protege 4 OWL editor in Eclipse]] - this page gives directions for compiling Protege 4.0 sources in Eclipse where ''each bundle is created as a separate Eclipse project''.
 +
 
 +
* [[CompileProtege4InEclipseOneProject|Compile and run the Protege-OWL editor in Eclipse]] - this page gives directions for compiling Protege 4.0 sources in Eclipse where ''all bundles are encapsulated in one Eclipse project''.
  
<ul>
 
<li>[[CompileProtege4InEclipse|Compile and run the Protege 4 OWL editor in Eclipse]] - this page gives directions for compiling Protege 4.0 sources in Eclipse where ''each bundle is created as a separate Eclipse project''.</li>
 
<li>[[CompileProtege4InEclipseOneProject|Compile and run the Protege-OWL editor in Eclipse]] - this page gives directions for compiling Protege 4.0 sources in Eclipse where ''all bundles are encapsulated in one Eclipse project''.</li>
 
</ul>
 
  
 
=== Writing a simple view plugin (with example code) ===
 
=== Writing a simple view plugin (with example code) ===
  
 
A short guide to [http://www.co-ode.org/downloads/protege-x/plugin-code-example.php writing a plug-in] to show the class hierarchy.
 
A short guide to [http://www.co-ode.org/downloads/protege-x/plugin-code-example.php writing a plug-in] to show the class hierarchy.
This doesn't delve deeply into setting up your build environment, but concentrates on a simple code example and making sure you understand the
+
This doesn't delve deeply into setting up your build environment, but concentrates on a simple code example and making sure you understand the components and the structure of a plug-in.
components and the structure of a plugin.
+
 
  
 
== Troubleshooting ==
 
== Troubleshooting ==
  
<ul>
+
* [[SolvingClassLoaderProblems|Troubleshooting class loader issues]]
<li> [[SolvingClassLoaderProblems|Troubleshooting class loader issues]]
 
</ul>
 

Revision as of 18:35, March 3, 2008

Protege 4 Developer Documentation

This page is still somewhat under construction...



Working with the Protege source code

Preliminaries

TODO: We need a high-level description here about how the 4.x source code is organized, since it's different than the 3.x series, e.g. we are using the OSGi plug-in architecture now, etc.

Before loading the Protege 4 sources into Eclipse, developers need to decide if they want all of the Protege sources in one big project or if they want separate projects for each of the Protege 4 plug-ins. We put together a list of pros and cons of working with one big project vs. several smaller projects. You may want to read the condensed version first (below), which often leads to an answer:

  • Eclipse developers will generally favor having several smaller projects. Eclipse provides nice support for defining extensions and extension points and will detect problems in both manifest files and the plugin.xml files.
  • Plug-in developers will generally do better with several smaller projects since they do not need to make changes to the core Protege sources. They can also choose an appropriate Protege 4 build to create runnables.
  • Non-Eclipse developers who are working with all the Protege sources (e.g., the Protege development team or developers who need tight coordination with Protege sources) will probably prefer to work with one single large project.

Once this decision has been made, please refer to the next section on compiling and running Protege 4. Instructions for both methods of working with the source code are outlined in detail.


Compiling and Running the Protege-OWL editor


Writing a simple view plugin (with example code)

A short guide to writing a plug-in to show the class hierarchy. This doesn't delve deeply into setting up your build environment, but concentrates on a simple code example and making sure you understand the components and the structure of a plug-in.


Troubleshooting