]>
git.argeo.org Git - lgpl/argeo-commons.git/blob - argeo/cms/e4/monitoring/BundleNode.java
1 package org
.argeo
.cms
.e4
.monitoring
;
3 import org
.argeo
.eclipse
.ui
.TreeParent
;
4 import org
.osgi
.framework
.Bundle
;
5 import org
.osgi
.framework
.ServiceReference
;
7 /** A tree element representing a {@link Bundle} */
8 class BundleNode
extends TreeParent
{
9 private final Bundle bundle
;
11 public BundleNode(Bundle bundle
) {
15 @SuppressWarnings("rawtypes")
16 public BundleNode(Bundle bundle
, boolean hasChildren
) {
17 super(bundle
.getSymbolicName());
22 ServiceReference
[] usedServices
= bundle
.getServicesInUse();
23 if (usedServices
!= null) {
24 for (ServiceReference sr
: usedServices
) {
26 addChild(new ServiceReferenceNode(sr
, false));
31 ServiceReference
[] registeredServices
= bundle
32 .getRegisteredServices();
33 if (registeredServices
!= null) {
34 for (ServiceReference sr
: registeredServices
) {
36 addChild(new ServiceReferenceNode(sr
, true));