{
ServiceReference[] sRefs = context.getServiceReferences(IDiagramProfileFactory.class.getName(), null);
if (sRefs != null) {
for (ServiceReference sRef : sRefs) {
IDiagramProfileFactory service = (IDiagramProfileFactory) context.getService(sRef);
ProfileServiceImpl.INSTANCE.getFactories().add(service);
}
}
ServiceTrackerCustomizer cust = new ServiceTrackerCustomizer() {
public void removedService(ServiceReference reference, Object service) {
}
public void modifiedService(ServiceReference reference, Object service) {
}
public Object addingService(ServiceReference reference) {
IDiagramProfileFactory service = (IDiagramProfileFactory) context.getService(reference);
ProfileServiceImpl.INSTANCE.getFactories().add(service);
return service;
}
};
ServiceTracker tracker = new ServiceTracker(context,