Java Reference
In-Depth Information
manifest editor (see figure 9.6) brings up
a tree view of bundles that depend on the
current bundle (see figure 9.7).
For example, the dependency hierar-
chy of the Fancy Foods application is
shown in figure 9.7.
Finally, Eclipse PDE includes support
for declarative services components,
although it's well hidden! Choose New >
Plug-in Development > Component Def-
inition. Eclipse will bring up an editor with both GUI and source views. It will also
update the project's manifest to reference the SCR XML .
Although Eclipse PDE has a number of good features, none of them are much use
to you if you don't want to write your own manifests. But if you're using bnd directly
(or embedded into Ant) to generate your manifests, good Eclipse-based OSG i tools
are still available to you.
Figure 9.6 The manifest editor's dependency
analysis view shows which bundles depend on the
current bundle, and also which bundles the current
bundle depends on.
Extending bnd into the GUI world with bndtools
The bndtools plug-in extends bnd's code-first command-line support into the Eclipse
environment. As well as providing syntax highlighting and a forms-based editor for
.bnd files, it integrates into the Eclipse compiler so that Eclipse automatically pro-
duces OSG i bundles on compile.
Bndtools maintains a local bundle repository, which serves the same function as a
Maven repository or an Eclipse PDE target platform. When developing your classes,
there's no need to explicitly add imports or project dependencies; bndtools will find
your dependencies in its internal repository. Before this works, you'll need to set up
the repository.
When you create a new OSG i bundle project, bndtools will automatically set up a con-
figuration project. This project includes useful Ant boilerplate, but its most important
Figure 9.7
Eclipse PDE's visualization of the dependency hierarchy of the Fancy Foods application.
Search WWH ::

Custom Search