Search in sources :

Example 1 with Settings

use of org.eclipse.osgi.container.Module.Settings in project rt.equinox.framework by eclipse.

the class ModuleDatabase method getActivationPolicySettings.

private EnumSet<Settings> getActivationPolicySettings(ModuleRevisionBuilder builder) {
    // do not do this for fragment bundles
    if ((builder.getTypes() & BundleRevision.TYPE_FRAGMENT) != 0) {
        return null;
    }
    for (GenericInfo info : builder.getCapabilities()) {
        if (EquinoxModuleDataNamespace.MODULE_DATA_NAMESPACE.equals(info.getNamespace())) {
            if (EquinoxModuleDataNamespace.CAPABILITY_ACTIVATION_POLICY_LAZY.equals(info.getAttributes().get(EquinoxModuleDataNamespace.CAPABILITY_ACTIVATION_POLICY))) {
                String compatibilityStartLazy = adaptor.getProperty(EquinoxConfiguration.PROP_COMPATIBILITY_START_LAZY);
                if (compatibilityStartLazy == null || Boolean.valueOf(compatibilityStartLazy)) {
                    // TODO hack until p2 is fixed (bug 177641)
                    EnumSet<Settings> settings = EnumSet.noneOf(Settings.class);
                    settings.add(Settings.USE_ACTIVATION_POLICY);
                    settings.add(Settings.AUTO_START);
                    return settings;
                }
            }
            return null;
        }
    }
    return null;
}
Also used : GenericInfo(org.eclipse.osgi.container.ModuleRevisionBuilder.GenericInfo) Settings(org.eclipse.osgi.container.Module.Settings)

Aggregations

Settings (org.eclipse.osgi.container.Module.Settings)1 GenericInfo (org.eclipse.osgi.container.ModuleRevisionBuilder.GenericInfo)1