X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.scl.osgi%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fosgi%2Finternal%2FBundleUtils.java;h=0f3d9c7c7e7f45ac8a2ce5f8bf5bda266fa05993;hb=refs%2Fchanges%2F51%2F2151%2F1;hp=c16545889425e4ffc0b7fd2d5dbbd6e41f4bab44;hpb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;p=simantics%2Fplatform.git 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..0f3d9c7c7 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,23 @@ 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"; + } + } + }