diff options
author | Andrew M. Finkbeiner | 2015-04-22 21:27:24 +0000 |
---|---|---|
committer | Andy Jury | 2015-06-18 23:51:13 +0000 |
commit | fd6ea5878ef3b3be4fd2d2a7da2e1d88c9ffcf71 (patch) | |
tree | 690a94b17f83f62b93f717e63fd8ce8b552c8d7e | |
parent | 0a08ed193acb7ac57b681125779d9462f9c25dc9 (diff) | |
download | org.eclipse.ote-fd6ea5878ef3b3be4fd2d2a7da2e1d88c9ffcf71.tar.gz org.eclipse.ote-fd6ea5878ef3b3be4fd2d2a7da2e1d88c9ffcf71.tar.xz org.eclipse.ote-fd6ea5878ef3b3be4fd2d2a7da2e1d88c9ffcf71.zip |
feature[ats_ATS161236]: Add fragment checkamf/VAIL_updates
-rw-r--r-- | org.eclipse.ote.services.core/src/org/eclipse/ote/services/core/BundleUtility.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/org.eclipse.ote.services.core/src/org/eclipse/ote/services/core/BundleUtility.java b/org.eclipse.ote.services.core/src/org/eclipse/ote/services/core/BundleUtility.java index 6f1a43b70..331822d65 100644 --- a/org.eclipse.ote.services.core/src/org/eclipse/ote/services/core/BundleUtility.java +++ b/org.eclipse.ote.services.core/src/org/eclipse/ote/services/core/BundleUtility.java @@ -14,9 +14,16 @@ import org.eclipse.osgi.framework.internal.core.BundleHost; import org.osgi.framework.Bundle; import org.osgi.framework.BundleException; import org.osgi.framework.FrameworkUtil; +import org.osgi.framework.wiring.BundleRevision; public class BundleUtility { + + public static boolean isBundleFragment(Bundle bundle){ + BundleRevision revision = bundle.adapt(BundleRevision.class); + return revision != null && (revision.getTypes() & BundleRevision.TYPE_FRAGMENT) != 0; + } + /** * Finds files in a bundle and return the URL to that file. It also handles the case of files existing in fragments * but the symbolic name used is that of the host bundle. |