Building in Eclipse

From GLOW Visualization
Revision as of 21:26, 14 February 2010 by Walter (talk | contribs) (Created page with '=Install Eclipse= Any vanilla Eclipse can be used (version used: 20090920-1017) Add the "plugin development" package: * Help -> Install new software ** Work with: Galileo - htt…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Install Eclipse

Any vanilla Eclipse can be used (version used: 20090920-1017)

Add the "plugin development" package:


Install the necessary software and libraries

Get Protege 4.0.x

  • Install it, for example: C:\Program Files\Protege
  • Verify that Protege starts up correctly

Get Prefuse beta

  • URL: http://prefuse.org/download/
  • Download Prefuse-beta (release 2007.10.21) source zip
  • Unpack it, for example: C:\Program Files\prefuse-beta
  • Build it: Go to the prefuse-beta directory and run one of the 'build' scripts
  • Doublecheck: sources should now be in: C:\Program Files\prefuse-beta\src\prefuse

Get JOGL

Get a version of GLOW

  • URL: http://www.glowvis.org/latest/
  • Save the .jar files to your Protege 'plugins' directory, e.g. C:\Program Files\Protege\plugins
  • Verify that Protege starts up correctly


Make a new Eclipse workbench

  • Check out the repository in e.g. a dir 'glow'
  • File -> Switch Workbench -> Other... -> Create a new Eclipse workbench in glow/workspace

Import necessary OSGI bundles as dependencies

Import Protege plug-ins

You need this to develop Protege plugins. If you 'run' a plug-in project, Eclipse will start Protege. For more info, see [1].

File -> Import -> Plug-in Development -> Plug-ins and Fragments

  • Directory: C:\Program Files\Protege\bundles
  • Plug-ins and Fragments to Import: Select from all plug-ins
  • Import as: binary projects
  • Next
  • Select:
    • org.protege.editor
    • org.semanticweb.owl.owlapi
    • jogl-osgi
  • Finish

NOTE:

  • Remove 'org.glowvis' and 'org.glowvis.protege' plug-ins if they are present. We want to use them as real source projects and not as dependencies, because they are expected to change a lot.

Import Protege core bundles

File -> Import -> Plug-in Development -> Plug-ins and Fragments

  • Directory: C:\Program Files\Protege\bundles
  • Plug-ins and Fragments to Import: Select from all plug-ins
  • Import as: binary projects
  • Next
  • Select:
org.protege.common
org.protege.editor.core.application
  • Finish


Create Eclipse projects

Create the Eclipse project for 'org.glowvis', the main library

Go to: File -> New Project -> Plug-in Development -> Plug-in Project

First page:

  • Project name: org.glowvis
  • Location: checkout_dir\dev\org.glowvis (browse to the checked-out source directory)
  • Target Platform: an OSGi framework: Equinox
  • Next

Second page:

  • Version: 1.0.0.qualifier
  • Name: GLOW
  • Don't generate activators
  • Next

Third page:

  • Don't use templates
  • Finish

In the plug-in overview (main screen), go to the "build.properties" tab. Add your paths to Protege, JOGL, and Prefuse here. On Windows, make sure that backslashes are escaped. Example:

prefuse.home=C:\\Program Files\\prefuse-beta
jogl.home=C:\\Program Files\\JOGL
protege.home=C:\\Program Files\\Protege

Configure building. In the plug-in overview (main screen), go to the "Build" tab.

  • Binary Build: select the following items and deselect the others:
    • META-INF
    • bin

Create the Eclipse project for the Protege plugin, 'org.glowvis.protege'

Go to: File -> New Project -> Plug-in Development -> Plug-in Project

First page:

  • Project name: org.glowvis.protege
  • Target Platform: an OSGi framework: Equinox
  • Next

Second page:

  • Version: 1.0.0.qualifier
  • Name: GLOW Protege plugin
  • Don't generate activators
  • Next

Third page:

  • Don't use templates
  • Finish

In the plug-in overview (main screen), go to the "build.properties" tab. Add your paths to Protege, JOGL, and Prefuse here. On Windows, make sure that backslashes are escaped. Example:

prefuse.home=C:\\Program Files\\prefuse-beta
jogl.home=C:\\Program Files\\JOGL
protege.home=C:\\Program Files\\Protege

Configure building. In the plug-in view (main screen), go to the "Build" tab.

  • Binary Build: select the following items and deselect the others:
    • META-INF
    • bin
    • plugin.xml


Run the Protege plug-in from Eclipse

Open the org.glowvis.protege project.

Go to: Run -> Run (Ctrl-F11)

  • Choose 'OSGi Framework'
  • This should start Protege.

If the plug-in does not work and you receive an error message about 64 bit vs 32 bit architecture, it might be that Eclipse is using a JVM that does not match the installed JOGL libraries. In this case:

  • Right click on the 'org.glowvis.protege' project in the Package Explorer
  • go to Run/Debug Settings
  • go to the Settings tab
  • choose the correct JRE here, for example, a 64 bit JRE; if Eclipse does not know it, add it.


Build the plug-ins

  • Right click on a project (e.g., 'org.glowvis.protege') in the Package Explorer
  • Export
  • Deployable plug-ins and fragments
  • This produces a single .jar file for the component, which you can place in your Protege plugins directory (e.g., C:\Program Files\Protege\Plugins)