Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Equinox Transforms

Revision as of 16:18, 13 February 2007 by Unnamed Poltroon (Talk)

Projects exist in the equinox incubator that allow you to provide transformations of bundle resources at the OSGi level. Various example transformers exist (XSLT, sed, replacement) that can be used to transform any resource in a bundle including but not limited to plugin.xml, MANIFEST.MF, class files, etc.

How To Run The Examples

  1. download Eclipse 3.2.1 (or any subsequent maintenance release). While this hasn't been tested with Eclipse 3.3 yet there shouldn't be any issues with using 3.3 instead.
  2. check out the following projects from :pserver:anonymous@dev.eclipse.org:/cvsroot/eclipse/equinox-incubator: org.eclipse.equinox.transforms,org.eclipse.equinox.transforms.sed,org.eclipse.equinox.transforms.xslt,org.eclipse.equinox.transforms.replace,org.eclipse.equinox.transforms.sed.manifest,org.eclipse.equinox.transforms.xslt.plugin,org.eclipse.equinox.transforms.replace.images
  3. check out org.eclipse.osgi from :pserver:anonymous@dev.eclipse.org:/cvsroot/eclipse/ (see bug 143696 for why this is necessary)
  4. From the Run menu, choose Run
  5. locate the example launch you wish to run and run it. They are named Replacement Transform Launch, Sed Transform Launch, and XSLT Transform Launch. Please note that the Sed launch will not work if you do not have the sed program available on your path.

How To Package Transformers for Distribution

Very rough ATM.

The transformer bundles work via adaptor hooks. As such, they are framework extensions and follow slightly different rules than other bundles. For full documentation on how to use adaptor hooks in your application please see Adaptor Hooks.

  1. ensure that all bundles required for the desired transformations are available. This typically means org.eclipse.equinox.transforms , the bundle implementing the desired transform type (ie: org.eclipse.equinox.transforms.xslt), and the bundle that provides the transformation file(s) (ie: org.eclipse.equinox.transforms.plugin).
  2. create (either from scratch or by copying one from your existing product configuration) a config.ini file that has your transformation file bundle in the osgi.bundles property with an eager start level. Ie: org.eclipse.equinox.transforms.xslt.plugin@1:\start. See the config.ini in org.eclipse.equinox.transforms.xslt for an example.
  3. ensure that the org.eclipse.equinox.transforms bundle and your transformation type bundles (ie: org.eclipse.equinox.transforms.xslt) are expressed as framework extension bundles in the osgi.framework.extensions VM property. Ie: -Dosgi.framework.extensions=org.eclipse.equinox.transforms,org.eclipse.equinox.transforms.xslt

How To Write Your Own Transformer

TBD

Back to the top