aQute.bnd.classpath
Class BndContainerInitializer
java.lang.Object
ClasspathContainerInitializer
aQute.bnd.classpath.BndContainerInitializer
- All Implemented Interfaces:
- ModelListener
public class BndContainerInitializer
- extends ClasspathContainerInitializer
- implements ModelListener
A bnd container reads the bnd.bnd file in the project directory and use the
information in there to establish the classpath. The classpath is defined by
the -build-env instruction. This instruction contains a list of bsn's that
are searched in the available repositories and returned as File objects.
This initializer establishes the link between the container object and the
BndModel. The container object is just a delegator because for some unknown
reasons, you can only update the container (refresh the contents) when you
give it a new object ;-(
Because this plugin uses the Bnd Builder in different places, the Bnd Model
is centralized and available from the Activator.
|
Field Summary |
static Path |
ID
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ID
public static final Path ID
BndContainerInitializer
public BndContainerInitializer()
initialize
public void initialize(IPath containerPath,
IJavaProject project)
throws CoreException
- Called when a new project is found. This class is instantiated once and
then used for any project that has a bnd container associated. We create
a link between the project and the Bnd Model. A delegating container
object is created to link the project to the container so it can get its
classpath entries. Note that the container object is not stored or
remembered because we create a new one for every update (otherwise the
update is not visible for some reason)
- Throws:
CoreException
canUpdateClasspathContainer
public boolean canUpdateClasspathContainer(IPath containerPath,
IJavaProject project)
- We can always update.
requestClasspathContainerUpdate
public void requestClasspathContainerUpdate(IPath containerPath,
IJavaProject project,
IClasspathContainer containerSuggestion)
throws CoreException
- Update the container. The containerSuggestion should always be a new
BndContainer ...
- Throws:
CoreException
modelChanged
public void modelChanged(Project model)
throws java.lang.Exception
- Specified by:
modelChanged in interface ModelListener
- Throws:
java.lang.Exception
workspaceChanged
public void workspaceChanged(Workspace ws)
throws java.lang.Exception
- Throws:
java.lang.Exception