[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[equinox-dev] Initial transforms commit into the incubator
- From: Kimberly Horne <kim@xxxxxxxxxxxxx>
- Date: Tue, 28 Nov 2006 09:57:22 -0500
- Delivered-to: email@example.com
I've checked in some initial work on transformations into the equinox
incubator. Instead of providing a transformation service (and re-
implementing the bundle wrapper framework on top of itself
essentially) I've instead created some abstract base classes that
make implementing your own transforming bundle wrapper easier.
Included are five new projects.
The main addition is org.eclipse.equinox.transforms. In here you'll
find abstract base classes for transforming bundle factory hook as
well as transforming bundle file wrappers. Writing transformers
using these classes is as simple as writing a method that wraps an
input stream with a new input stream. Included are some utility
classes for wrapping system processes as transformers as well as
pipes that make translating output streams to input streams easier.
These are rather sloppily implemented at the moment (Threads out the
Wazzoo) but should get better over the next few days). In addition
to the bare bones baseclass there is also a baseclass that is able to
read CSV files in the form:
bundle regex pattern, path regex pattern, transformation resource
Using this baseclass you are able to create transformers that are
extensible via CSV content located in any extension bundle.
On top of this base implementation I've provided two transformer
implementations: XSLT and SED. The code that handles these
transformations is in org.eclipse.equinox.transforms.xslt and
org.eclipse.equinox.transforms.sed respectively and data to drive
them is in org.eclipse.equinox.transforms.xslt.plugin and
org.eclipse.equinox.transforms.sed.manifest. The XSLT example will
make the UI Working Sets action set invisible by default whereas the
SED example changes the name of the Package Explorer to Java Package
Explorer and updates the MANIFEST.MF with a custom version string.
You can see these examples by checking out all 5 above mentioned
projects as well as the org.eclipse.osgi project (I've tested against
3.2 but it should work fine against 3.3) and launching the Transform
Launch.launch config found in org.eclipse.equinox.transforms.
Things I plan on doing in the next few days:
look into caching the result of the transformations between sessions
removing the dependency on non-exported hook API
remove Thread spawning in the pipe/wrapper classes
clean up synchronization
add code to profile transformation times
If anyone has time to look at what's in there I'd appreciate any input.