diff options
| author | Thomas Watson | 2013-11-20 21:01:46 +0000 |
|---|---|---|
| committer | Thomas Watson | 2013-11-20 21:04:13 +0000 |
| commit | 4eefdb7c23063b4f79b05619160879fe61f1613a (patch) | |
| tree | b6bbbb04e94670663762cb5af4b10164e221c30a | |
| parent | e4056b5b6a1fcd406d3e3b0aff8e2b184db7f2b8 (diff) | |
| download | rt.equinox.framework-4eefdb7c23063b4f79b05619160879fe61f1613a.tar.gz rt.equinox.framework-4eefdb7c23063b4f79b05619160879fe61f1613a.tar.xz rt.equinox.framework-4eefdb7c23063b4f79b05619160879fe61f1613a.zip | |
Bug 421706 - Can't start Eclipse M3 after installing "everything"
- Add a capability to indicate the host symbolic name a fragment belongs to
2 files changed, 43 insertions, 2 deletions
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/builders/OSGiManifestBuilderFactory.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/builders/OSGiManifestBuilderFactory.java index 6828b0d3e..8c29f87d6 100644 --- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/builders/OSGiManifestBuilderFactory.java +++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/builders/OSGiManifestBuilderFactory.java @@ -14,8 +14,7 @@ import java.net.URI; import java.net.URISyntaxException; import java.util.*; import org.eclipse.osgi.container.ModuleRevisionBuilder; -import org.eclipse.osgi.container.namespaces.EclipsePlatformNamespace; -import org.eclipse.osgi.container.namespaces.EquinoxModuleDataNamespace; +import org.eclipse.osgi.container.namespaces.*; import org.eclipse.osgi.internal.framework.EquinoxContainer; import org.eclipse.osgi.internal.framework.FilterImpl; import org.eclipse.osgi.internal.messages.Msg; @@ -439,6 +438,8 @@ public final class OSGiManifestBuilderFactory { filter.insert(0, "(&").append(')'); //$NON-NLS-1$ directives.put(BundleNamespace.REQUIREMENT_FILTER_DIRECTIVE, filter.toString()); builder.addRequirement(HostNamespace.HOST_NAMESPACE, directives, new HashMap<String, Object>(0)); + // Add a fragment capability to advertise what host this resource is providing a fragment for + builder.addCapability(EquinoxFragmentNamespace.FRAGMENT_NAMESPACE, Collections.<String, String> emptyMap(), Collections.<String, Object> singletonMap(EquinoxFragmentNamespace.FRAGMENT_NAMESPACE, hostName)); } private static void getProvideCapabilities(ModuleRevisionBuilder builder, ManifestElement[] provideElements, boolean chechSystemCapabilities) throws BundleException { diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/namespaces/EquinoxFragmentNamespace.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/namespaces/EquinoxFragmentNamespace.java new file mode 100644 index 000000000..7c5e0b869 --- /dev/null +++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/namespaces/EquinoxFragmentNamespace.java @@ -0,0 +1,40 @@ +/******************************************************************************* + * Copyright (c) 2013 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.osgi.container.namespaces; + +import org.osgi.resource.Namespace; + +/** + * Equinox Namespace for fragment capabilities. + * + * <p> + * This class defines the names for the attributes and directives for this + * namespace. All unspecified capability attributes are of type {@code String} + * and are used as arbitrary matching attributes for the capability. The values + * associated with the specified directive and attribute keys are of type + * {@code String}, unless otherwise indicated. + * + * @Immutable + * @noinstantiate This class is not intended to be instantiated by clients. + * @since 3.10 + */ +public class EquinoxFragmentNamespace extends Namespace { + + /** + /** + * Namespace name for fragment capabilities and requirements. + * + * <p> + * Also, the capability attribute used to specify the symbolic name of the host the + * resource is providing a fragment for. + */ + public static final String FRAGMENT_NAMESPACE = "equinox.fragment"; //$NON-NLS-1$ +} |
