X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.scl.osgi%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fosgi%2Finternal%2FBundleUtils.java;h=8c0bf43dc5421c1f8f3c1a6e9e722d07debb2366;hp=c16545889425e4ffc0b7fd2d5dbbd6e41f4bab44;hb=5704e9deb877257b2c0c542e185fda124cf3ce37;hpb=9c21f5837af6102a9dd05cb6a425bafe25576822 diff --git a/bundles/org.simantics.scl.osgi/src/org/simantics/scl/osgi/internal/BundleUtils.java b/bundles/org.simantics.scl.osgi/src/org/simantics/scl/osgi/internal/BundleUtils.java index c16545889..8c0bf43dc 100644 --- a/bundles/org.simantics.scl.osgi/src/org/simantics/scl/osgi/internal/BundleUtils.java +++ b/bundles/org.simantics.scl.osgi/src/org/simantics/scl/osgi/internal/BundleUtils.java @@ -48,4 +48,16 @@ public class BundleUtils { } } + public static String resolveBundleState(Bundle bundle) { + switch (bundle.getState()) { + case Bundle.UNINSTALLED: return "UNINSTALLED"; + case Bundle.INSTALLED: return "INSTALLED"; + case Bundle.RESOLVED: return "RESOLVED"; + case Bundle.STARTING: return "STARTING"; + case Bundle.STOPPING: return "STOPPING"; + case Bundle.ACTIVE: return "ACTIVE"; + default: return "UNKNOWN"; + } + } + }