I try to load an artifact and metadata repository manager as follows
private IArtifactRepositoryManager getArtifactRepositoryManager() {
IArtifactRepositoryManager artifactManager = (IArtifactRepositoryManager)
ServiceHelper.getService(ProvUIActivator.getContext(),
IArtifactRepositoryManager.class.getName());
if(artifactManager == null) {
LOG.error("ArtifactRepositoryManager service nor found");
}
return artifactManager;
}
ServiceHelper always returns null. Is there another way to get the repository managers? I'm using Eclipse/RCP 3.7 (Indigo).
I used bundles from Eclipse 3.5 before and everything works fine with this code:
private IMetadataRepositoryManager getMetadataRepositoryManager() {
//Load repository manager
IMetadataRepositoryManager metadataManager = (IMetadataRepositoryManager) context.getService(
context.getServiceReference(IMetadataRepositoryManager.class.getName()));
return metadataManager;
}