diff options
Diffstat (limited to 'bundles')
-rw-r--r-- | bundles/org.eclipse.osgi.compatibility.state/.classpath | 7 | ||||
-rw-r--r-- | bundles/org.eclipse.osgi.compatibility.state/.gitignore | 2 | ||||
-rw-r--r-- | bundles/org.eclipse.osgi.compatibility.state/.project | 28 | ||||
-rw-r--r-- | bundles/org.eclipse.osgi.compatibility.state/.settings/org.eclipse.jdt.core.prefs | 7 | ||||
-rw-r--r-- | bundles/org.eclipse.osgi.compatibility.state/.settings/org.eclipse.pde.core.prefs | 3 | ||||
-rw-r--r-- | bundles/org.eclipse.osgi.compatibility.state/META-INF/MANIFEST.MF | 7 | ||||
-rw-r--r-- | bundles/org.eclipse.osgi.compatibility.state/build.properties | 4 | ||||
-rw-r--r-- | bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/BundleConstraint.java (renamed from bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/BundleConstraint.java) | 0 | ||||
-rw-r--r-- | bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/CompositeResolveHelper.java (renamed from bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/CompositeResolveHelper.java) | 0 | ||||
-rw-r--r-- | bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/CompositeResolveHelperRegistry.java (renamed from bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/CompositeResolveHelperRegistry.java) | 0 | ||||
-rw-r--r-- | bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/GenericCapability.java (renamed from bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/GenericCapability.java) | 0 | ||||
-rw-r--r-- | bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/GenericConstraint.java (renamed from bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/GenericConstraint.java) | 0 | ||||
-rw-r--r-- | bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/GroupingChecker.java (renamed from bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/GroupingChecker.java) | 0 | ||||
-rw-r--r-- | bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/MappedList.java (renamed from bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/MappedList.java) | 0 | ||||
-rw-r--r-- | bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/PermissionChecker.java (renamed from bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/PermissionChecker.java) | 0 | ||||
-rw-r--r-- | bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/ResolverBundle.java (renamed from bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/ResolverBundle.java) | 0 | ||||
-rw-r--r-- | bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/ResolverConstraint.java (renamed from bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/ResolverConstraint.java) | 0 | ||||
-rw-r--r-- | bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/ResolverExport.java (renamed from bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/ResolverExport.java) | 0 | ||||
-rw-r--r-- | bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/ResolverImpl.java (renamed from bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/ResolverImpl.java) | 14 | ||||
-rw-r--r-- | bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/ResolverImport.java (renamed from bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/ResolverImport.java) | 0 | ||||
-rw-r--r-- | bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/VersionHashMap.java (renamed from bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/VersionHashMap.java) | 0 | ||||
-rw-r--r-- | bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/VersionSupplier.java (renamed from bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/VersionSupplier.java) | 0 | ||||
-rw-r--r-- | bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/BaseDescriptionImpl.java (renamed from bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/BaseDescriptionImpl.java) | 0 | ||||
-rw-r--r-- | bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/BundleDeltaImpl.java (renamed from bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/BundleDeltaImpl.java) | 0 | ||||
-rw-r--r-- | bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/BundleDescriptionImpl.java (renamed from bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/BundleDescriptionImpl.java) | 53 | ||||
-rw-r--r-- | bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/BundleSpecificationImpl.java (renamed from bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/BundleSpecificationImpl.java) | 0 | ||||
-rw-r--r-- | bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/ExportPackageDescriptionImpl.java (renamed from bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/ExportPackageDescriptionImpl.java) | 26 | ||||
-rw-r--r-- | bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/GenericDescriptionImpl.java (renamed from bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/GenericDescriptionImpl.java) | 0 | ||||
-rw-r--r-- | bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/GenericSpecificationImpl.java (renamed from bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/GenericSpecificationImpl.java) | 0 | ||||
-rw-r--r-- | bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/HostSpecificationImpl.java (renamed from bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/HostSpecificationImpl.java) | 0 | ||||
-rw-r--r-- | bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/ImportPackageSpecificationImpl.java (renamed from bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/ImportPackageSpecificationImpl.java) | 10 | ||||
-rw-r--r-- | bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/NativeCodeDescriptionImpl.java (renamed from bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/NativeCodeDescriptionImpl.java) | 1 | ||||
-rw-r--r-- | bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/NativeCodeSpecificationImpl.java (renamed from bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/NativeCodeSpecificationImpl.java) | 2 | ||||
-rw-r--r-- | bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/ReadOnlyState.java (renamed from bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/ReadOnlyState.java) | 0 | ||||
-rw-r--r-- | bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/ResolverErrorImpl.java (renamed from bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/ResolverErrorImpl.java) | 0 | ||||
-rw-r--r-- | bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateBuilder.java (renamed from bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateBuilder.java) | 24 | ||||
-rw-r--r-- | bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateDeltaImpl.java (renamed from bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateDeltaImpl.java) | 0 | ||||
-rw-r--r-- | bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateHelperImpl.java (renamed from bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateHelperImpl.java) | 7 | ||||
-rw-r--r-- | bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateImpl.java (renamed from bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateImpl.java) | 101 | ||||
-rw-r--r-- | bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateMessages.properties (renamed from bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateMessages.properties) | 0 | ||||
-rw-r--r-- | bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateMsg.java (renamed from bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateMsg.java) | 0 | ||||
-rw-r--r-- | bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateObjectFactoryImpl.java (renamed from bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateObjectFactoryImpl.java) | 19 | ||||
-rw-r--r-- | bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateReader.java (renamed from bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateReader.java) | 0 | ||||
-rw-r--r-- | bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateWriter.java (renamed from bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateWriter.java) | 0 | ||||
-rw-r--r-- | bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/UserState.java (renamed from bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/UserState.java) | 0 | ||||
-rw-r--r-- | bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/VersionConstraintImpl.java (renamed from bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/VersionConstraintImpl.java) | 6 | ||||
-rw-r--r-- | bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/SystemState.java | 46 |
47 files changed, 192 insertions, 175 deletions
diff --git a/bundles/org.eclipse.osgi.compatibility.state/.classpath b/bundles/org.eclipse.osgi.compatibility.state/.classpath new file mode 100644 index 000000000..ad32c83a7 --- /dev/null +++ b/bundles/org.eclipse.osgi.compatibility.state/.classpath @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="src" path="src"/> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/bundles/org.eclipse.osgi.compatibility.state/.gitignore b/bundles/org.eclipse.osgi.compatibility.state/.gitignore new file mode 100644 index 000000000..07a846bd7 --- /dev/null +++ b/bundles/org.eclipse.osgi.compatibility.state/.gitignore @@ -0,0 +1,2 @@ +/bin/ +.DS_Store diff --git a/bundles/org.eclipse.osgi.compatibility.state/.project b/bundles/org.eclipse.osgi.compatibility.state/.project new file mode 100644 index 000000000..50487e24b --- /dev/null +++ b/bundles/org.eclipse.osgi.compatibility.state/.project @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.eclipse.osgi.compatibility.state</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.ManifestBuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.SchemaBuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.pde.PluginNature</nature> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> diff --git a/bundles/org.eclipse.osgi.compatibility.state/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.osgi.compatibility.state/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 000000000..c537b6306 --- /dev/null +++ b/bundles/org.eclipse.osgi.compatibility.state/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.6 diff --git a/bundles/org.eclipse.osgi.compatibility.state/.settings/org.eclipse.pde.core.prefs b/bundles/org.eclipse.osgi.compatibility.state/.settings/org.eclipse.pde.core.prefs new file mode 100644 index 000000000..f29e940a0 --- /dev/null +++ b/bundles/org.eclipse.osgi.compatibility.state/.settings/org.eclipse.pde.core.prefs @@ -0,0 +1,3 @@ +eclipse.preferences.version=1 +pluginProject.extensions=false +resolve.requirebundle=false diff --git a/bundles/org.eclipse.osgi.compatibility.state/META-INF/MANIFEST.MF b/bundles/org.eclipse.osgi.compatibility.state/META-INF/MANIFEST.MF new file mode 100644 index 000000000..990af6c69 --- /dev/null +++ b/bundles/org.eclipse.osgi.compatibility.state/META-INF/MANIFEST.MF @@ -0,0 +1,7 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: State +Bundle-SymbolicName: org.eclipse.osgi.compatibility.state +Bundle-Version: 1.0.0.qualifier +Fragment-Host: org.eclipse.osgi;bundle-version="3.10.0" +Bundle-RequiredExecutionEnvironment: JavaSE-1.6 diff --git a/bundles/org.eclipse.osgi.compatibility.state/build.properties b/bundles/org.eclipse.osgi.compatibility.state/build.properties new file mode 100644 index 000000000..34d2e4d2d --- /dev/null +++ b/bundles/org.eclipse.osgi.compatibility.state/build.properties @@ -0,0 +1,4 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + . diff --git a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/BundleConstraint.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/BundleConstraint.java index 0f933f41a..0f933f41a 100644 --- a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/BundleConstraint.java +++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/BundleConstraint.java diff --git a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/CompositeResolveHelper.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/CompositeResolveHelper.java index 5f7cdba7d..5f7cdba7d 100644 --- a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/CompositeResolveHelper.java +++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/CompositeResolveHelper.java diff --git a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/CompositeResolveHelperRegistry.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/CompositeResolveHelperRegistry.java index f4cd6fb80..f4cd6fb80 100644 --- a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/CompositeResolveHelperRegistry.java +++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/CompositeResolveHelperRegistry.java diff --git a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/GenericCapability.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/GenericCapability.java index 3156e00fa..3156e00fa 100644 --- a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/GenericCapability.java +++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/GenericCapability.java diff --git a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/GenericConstraint.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/GenericConstraint.java index a84a05812..a84a05812 100644 --- a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/GenericConstraint.java +++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/GenericConstraint.java diff --git a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/GroupingChecker.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/GroupingChecker.java index ea39971bd..ea39971bd 100644 --- a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/GroupingChecker.java +++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/GroupingChecker.java diff --git a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/MappedList.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/MappedList.java index a104a2434..a104a2434 100644 --- a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/MappedList.java +++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/MappedList.java diff --git a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/PermissionChecker.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/PermissionChecker.java index 824de81f9..824de81f9 100644 --- a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/PermissionChecker.java +++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/PermissionChecker.java diff --git a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/ResolverBundle.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/ResolverBundle.java index 8f16f561d..8f16f561d 100644 --- a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/ResolverBundle.java +++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/ResolverBundle.java diff --git a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/ResolverConstraint.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/ResolverConstraint.java index 759898a70..759898a70 100644 --- a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/ResolverConstraint.java +++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/ResolverConstraint.java diff --git a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/ResolverExport.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/ResolverExport.java index 7aab84b87..7aab84b87 100644 --- a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/ResolverExport.java +++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/ResolverExport.java diff --git a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/ResolverImpl.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/ResolverImpl.java index 912a520f6..6a97c2159 100644 --- a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/ResolverImpl.java +++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/ResolverImpl.java @@ -11,6 +11,7 @@ ******************************************************************************/ package org.eclipse.osgi.internal.module; +import org.eclipse.osgi.internal.framework.EquinoxContainer; import org.eclipse.osgi.internal.framework.FilterImpl; import org.eclipse.osgi.internal.debug.Debug; @@ -18,14 +19,13 @@ import org.eclipse.osgi.internal.debug.FrameworkDebugOptions; import java.security.AccessController; import java.util.*; -import org.eclipse.osgi.framework.adaptor.FrameworkAdaptor; -import org.eclipse.osgi.framework.internal.core.Constants; import org.eclipse.osgi.framework.util.SecureAction; import org.eclipse.osgi.internal.baseadaptor.ArrayMap; import org.eclipse.osgi.internal.module.GroupingChecker.PackageRoots; import org.eclipse.osgi.internal.resolver.*; import org.eclipse.osgi.service.resolver.*; import org.eclipse.osgi.util.ManifestElement; +import org.osgi.framework.Constants; import org.osgi.framework.Filter; import org.osgi.framework.InvalidSyntaxException; import org.osgi.framework.hooks.resolver.ResolverHook; @@ -35,7 +35,7 @@ import org.osgi.framework.wiring.BundleRevision; public class ResolverImpl implements Resolver { // Debug fields - private static final String RESOLVER = FrameworkAdaptor.FRAMEWORK_SYMBOLICNAME + "/resolver"; //$NON-NLS-1$ + private static final String RESOLVER = EquinoxContainer.NAME + "/resolver"; //$NON-NLS-1$ private static final String OPTION_DEBUG = RESOLVER + "/debug";//$NON-NLS-1$ private static final String OPTION_WIRING = RESOLVER + "/wiring"; //$NON-NLS-1$ private static final String OPTION_IMPORTS = RESOLVER + "/imports"; //$NON-NLS-1$ @@ -424,7 +424,7 @@ public class ResolverImpl implements Resolver { hook = (state instanceof StateImpl) ? ((StateImpl) state).getResolverHook() : null; try { // set developmentMode each resolution - developmentMode = platformProperties.length == 0 ? false : org.eclipse.osgi.framework.internal.core.Constants.DEVELOPMENT_MODE.equals(platformProperties[0].get(org.eclipse.osgi.framework.internal.core.Constants.OSGI_RESOLVER_MODE)); + developmentMode = platformProperties.length == 0 ? false : StateImpl.DEVELOPMENT_MODE.equals(platformProperties[0].get(StateImpl.OSGI_RESOLVER_MODE)); // set uses timeout each resolution usesTimeout = getUsesTimeout(platformProperties); // set limit for constraints with multiple suppliers each resolution @@ -1178,9 +1178,9 @@ public class ResolverImpl implements Resolver { String getSystemBundle() { Dictionary<?, ?>[] platformProperties = state.getPlatformProperties(); - String systemBundle = platformProperties.length == 0 ? null : (String) platformProperties[0].get(Constants.STATE_SYSTEM_BUNDLE); + String systemBundle = platformProperties.length == 0 ? null : (String) platformProperties[0].get(StateImpl.STATE_SYSTEM_BUNDLE); if (systemBundle == null) - systemBundle = Constants.getInternalSymbolicName(); + systemBundle = EquinoxContainer.NAME; return systemBundle; } @@ -2125,7 +2125,7 @@ public class ResolverImpl implements Resolver { } private void setDebugOptions() { - FrameworkDebugOptions options = FrameworkDebugOptions.getDefault(); + FrameworkDebugOptions options = null; //FrameworkDebugOptions.getDefault(); // may be null if debugging is not enabled if (options == null) return; diff --git a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/ResolverImport.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/ResolverImport.java index 848841ba6..848841ba6 100644 --- a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/ResolverImport.java +++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/ResolverImport.java diff --git a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/VersionHashMap.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/VersionHashMap.java index b27b03876..b27b03876 100644 --- a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/VersionHashMap.java +++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/VersionHashMap.java diff --git a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/VersionSupplier.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/VersionSupplier.java index 03c94b021..03c94b021 100644 --- a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/VersionSupplier.java +++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/VersionSupplier.java diff --git a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/BaseDescriptionImpl.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/BaseDescriptionImpl.java index 60d3f2b30..60d3f2b30 100644 --- a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/BaseDescriptionImpl.java +++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/BaseDescriptionImpl.java diff --git a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/BundleDeltaImpl.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/BundleDeltaImpl.java index 448e37dbb..448e37dbb 100644 --- a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/BundleDeltaImpl.java +++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/BundleDeltaImpl.java diff --git a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/BundleDescriptionImpl.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/BundleDescriptionImpl.java index d8d607f93..ee6cdb91c 100644 --- a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/BundleDescriptionImpl.java +++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/BundleDescriptionImpl.java @@ -15,11 +15,7 @@ package org.eclipse.osgi.internal.resolver; import java.io.IOException; import java.net.URL; import java.util.*; -import org.eclipse.osgi.framework.adaptor.BundleClassLoader; -import org.eclipse.osgi.framework.internal.core.BundleHost; -import org.eclipse.osgi.framework.internal.core.Constants; import org.eclipse.osgi.framework.util.KeyedElement; -import org.eclipse.osgi.internal.loader.BundleLoaderProxy; import org.eclipse.osgi.service.resolver.*; import org.osgi.framework.*; import org.osgi.framework.wiring.*; @@ -1221,59 +1217,16 @@ public final class BundleDescriptionImpl extends BaseDescriptionImpl implements } public ClassLoader getClassLoader() { - SecurityManager sm = System.getSecurityManager(); - if (sm != null) - sm.checkPermission(GET_CLASSLOADER_PERM); - if (!isInUse()) - return null; - return (ClassLoader) getBundleClassLoader(); + throw new UnsupportedOperationException(); } - private BundleClassLoader getBundleClassLoader() { - Object o = BundleDescriptionImpl.this.getUserObject(); - if (!(o instanceof BundleLoaderProxy)) { - if (o instanceof BundleReference) - o = ((BundleReference) o).getBundle(); - if (o instanceof BundleHost) - o = ((BundleHost) o).getLoaderProxy(); - } - if (o instanceof BundleLoaderProxy) - return ((BundleLoaderProxy) o).getBundleLoader().createClassLoader(); - return null; - } - - private boolean hasResourcePermission() { - SecurityManager sm = System.getSecurityManager(); - if (sm != null) { - try { - sm.checkPermission(new AdminPermission(getBundle(), AdminPermission.RESOURCE)); - } catch (SecurityException e) { - return false; - } - } - return true; - } public List<URL> findEntries(String path, String filePattern, int options) { - if (!hasResourcePermission() || !isInUse()) - return null; - @SuppressWarnings("unchecked") - List<URL> result = Collections.EMPTY_LIST; - BundleClassLoader bcl = getBundleClassLoader(); - if (bcl != null) - result = bcl.findEntries(path, filePattern, options); - return Collections.unmodifiableList(result); + return null; } public Collection<String> listResources(String path, String filePattern, int options) { - if (!hasResourcePermission() || !isInUse()) - return null; - @SuppressWarnings("unchecked") - Collection<String> result = Collections.EMPTY_LIST; - BundleClassLoader bcl = getBundleClassLoader(); - if (bcl != null) - result = bcl.listResources(path, filePattern, options); - return Collections.unmodifiableCollection(result); + return null; } public String toString() { diff --git a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/BundleSpecificationImpl.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/BundleSpecificationImpl.java index 6946f4d7e..6946f4d7e 100644 --- a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/BundleSpecificationImpl.java +++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/BundleSpecificationImpl.java diff --git a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/ExportPackageDescriptionImpl.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/ExportPackageDescriptionImpl.java index 4bc76587d..3f354c3ea 100644 --- a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/ExportPackageDescriptionImpl.java +++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/ExportPackageDescriptionImpl.java @@ -13,8 +13,10 @@ package org.eclipse.osgi.internal.resolver; import java.util.*; -import org.eclipse.osgi.framework.internal.core.Constants; + +import org.eclipse.osgi.internal.framework.EquinoxContainer; import org.eclipse.osgi.service.resolver.*; +import org.osgi.framework.Constants; import org.osgi.framework.Version; import org.osgi.framework.wiring.BundleRevision; @@ -59,8 +61,8 @@ public class ExportPackageDescriptionImpl extends BaseDescriptionImpl implements if (mandatory != null) result.put(Constants.MANDATORY_DIRECTIVE, mandatory); if (friends != null) - result.put(Constants.FRIENDS_DIRECTIVE, friends); - result.put(Constants.INTERNAL_DIRECTIVE, internal); + result.put(StateImpl.FRIENDS_DIRECTIVE, friends); + result.put(StateImpl.INTERNAL_DIRECTIVE, internal); result.put(EQUINOX_EE, equinox_ee == -1 ? EQUINOX_EE_DEFAULT : new Integer(equinox_ee)); return result; } @@ -81,9 +83,9 @@ public class ExportPackageDescriptionImpl extends BaseDescriptionImpl implements if (mandatory != null) result.put(Constants.MANDATORY_DIRECTIVE, toString(mandatory)); if (friends != null) - result.put(Constants.FRIENDS_DIRECTIVE, toString(friends)); + result.put(StateImpl.FRIENDS_DIRECTIVE, toString(friends)); if (internal != null) - result.put(Constants.INTERNAL_DIRECTIVE, internal.toString()); + result.put(StateImpl.INTERNAL_DIRECTIVE, internal.toString()); return Collections.unmodifiableMap(result); } } @@ -100,7 +102,7 @@ public class ExportPackageDescriptionImpl extends BaseDescriptionImpl implements result.put(Constants.BUNDLE_VERSION_ATTRIBUTE, bundleVersion); String symbolicName = getSupplier().getSymbolicName(); if (symbolicName != null) { - if (symbolicName.equals(Constants.getInternalSymbolicName())) + if (symbolicName.equals(EquinoxContainer.NAME)) result.put(Constants.BUNDLE_SYMBOLICNAME_ATTRIBUTE, Arrays.asList(Constants.SYSTEM_BUNDLE_SYMBOLICNAME, symbolicName)); else result.put(Constants.BUNDLE_SYMBOLICNAME_ATTRIBUTE, symbolicName); @@ -128,9 +130,9 @@ public class ExportPackageDescriptionImpl extends BaseDescriptionImpl implements return include; if (key.equals(Constants.MANDATORY_DIRECTIVE)) return mandatory; - if (key.equals(Constants.FRIENDS_DIRECTIVE)) + if (key.equals(StateImpl.FRIENDS_DIRECTIVE)) return friends; - if (key.equals(Constants.INTERNAL_DIRECTIVE)) + if (key.equals(StateImpl.INTERNAL_DIRECTIVE)) return internal; if (key.equals(EQUINOX_EE)) return equinox_ee == -1 ? EQUINOX_EE_DEFAULT : new Integer(equinox_ee); @@ -148,9 +150,9 @@ public class ExportPackageDescriptionImpl extends BaseDescriptionImpl implements return include = (String) value; if (key.equals(Constants.MANDATORY_DIRECTIVE)) return mandatory = (String[]) value; - if (key.equals(Constants.FRIENDS_DIRECTIVE)) + if (key.equals(StateImpl.FRIENDS_DIRECTIVE)) return friends = (String[]) value; - if (key.equals(Constants.INTERNAL_DIRECTIVE)) + if (key.equals(StateImpl.INTERNAL_DIRECTIVE)) return internal = (Boolean) value; if (key.equals(EQUINOX_EE)) { equinox_ee = ((Integer) value).intValue(); @@ -168,8 +170,8 @@ public class ExportPackageDescriptionImpl extends BaseDescriptionImpl implements exclude = (String) directives.get(Constants.EXCLUDE_DIRECTIVE); include = (String) directives.get(Constants.INCLUDE_DIRECTIVE); mandatory = (String[]) directives.get(Constants.MANDATORY_DIRECTIVE); - friends = (String[]) directives.get(Constants.FRIENDS_DIRECTIVE); - internal = (Boolean) directives.get(Constants.INTERNAL_DIRECTIVE); + friends = (String[]) directives.get(StateImpl.FRIENDS_DIRECTIVE); + internal = (Boolean) directives.get(StateImpl.INTERNAL_DIRECTIVE); equinox_ee = ((Integer) directives.get(EQUINOX_EE)).intValue(); } } diff --git a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/GenericDescriptionImpl.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/GenericDescriptionImpl.java index 9e438f033..9e438f033 100644 --- a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/GenericDescriptionImpl.java +++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/GenericDescriptionImpl.java diff --git a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/GenericSpecificationImpl.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/GenericSpecificationImpl.java index f0a30cbd2..f0a30cbd2 100644 --- a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/GenericSpecificationImpl.java +++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/GenericSpecificationImpl.java diff --git a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/HostSpecificationImpl.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/HostSpecificationImpl.java index 2f6d77841..2f6d77841 100644 --- a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/HostSpecificationImpl.java +++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/HostSpecificationImpl.java diff --git a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/ImportPackageSpecificationImpl.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/ImportPackageSpecificationImpl.java index 8d7a4371e..5e82d40da 100644 --- a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/ImportPackageSpecificationImpl.java +++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/ImportPackageSpecificationImpl.java @@ -13,8 +13,10 @@ package org.eclipse.osgi.internal.resolver; import java.util.*; -import org.eclipse.osgi.framework.internal.core.Constants; + +import org.eclipse.osgi.internal.framework.EquinoxContainer; import org.eclipse.osgi.service.resolver.*; +import org.osgi.framework.Constants; import org.osgi.framework.wiring.BundleRevision; public class ImportPackageSpecificationImpl extends VersionConstraintImpl implements ImportPackageSpecification { @@ -74,7 +76,7 @@ public class ImportPackageSpecificationImpl extends VersionConstraintImpl implem synchronized (this.monitor) { if (Constants.SYSTEM_BUNDLE_SYMBOLICNAME.equals(symbolicName)) { StateImpl state = (StateImpl) getBundle().getContainingState(); - return state == null ? Constants.getInternalSymbolicName() : state.getSystemBundle(); + return state == null ? EquinoxContainer.NAME : state.getSystemBundle(); } return symbolicName; } @@ -105,8 +107,8 @@ public class ImportPackageSpecificationImpl extends VersionConstraintImpl implem // If we are in strict mode, check to see if the export specifies friends. // If it does, are we one of the friends - String[] friends = (String[]) pkgDes.getDirective(Constants.FRIENDS_DIRECTIVE); - Boolean internal = (Boolean) pkgDes.getDirective(Constants.INTERNAL_DIRECTIVE); + String[] friends = (String[]) pkgDes.getDirective(StateImpl.FRIENDS_DIRECTIVE); + Boolean internal = (Boolean) pkgDes.getDirective(StateImpl.INTERNAL_DIRECTIVE); if (internal.booleanValue() || friends != null) { StateImpl state = (StateImpl) getBundle().getContainingState(); boolean strict = state == null ? false : state.inStrictMode(); diff --git a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/NativeCodeDescriptionImpl.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/NativeCodeDescriptionImpl.java index 1e3e1d137..a9c183ec1 100644 --- a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/NativeCodeDescriptionImpl.java +++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/NativeCodeDescriptionImpl.java @@ -14,7 +14,6 @@ package org.eclipse.osgi.internal.resolver; import org.eclipse.osgi.internal.framework.FilterImpl; import java.util.*; -import org.eclipse.osgi.framework.internal.core.Constants; import org.eclipse.osgi.service.resolver.*; import org.eclipse.osgi.service.resolver.VersionRange; import org.osgi.framework.*; diff --git a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/NativeCodeSpecificationImpl.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/NativeCodeSpecificationImpl.java index 1c2bfc382..883346331 100644 --- a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/NativeCodeSpecificationImpl.java +++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/NativeCodeSpecificationImpl.java @@ -14,8 +14,8 @@ package org.eclipse.osgi.internal.resolver; import org.eclipse.osgi.internal.framework.AliasMapper; import java.util.*; -import org.eclipse.osgi.framework.internal.core.Constants; import org.eclipse.osgi.service.resolver.*; +import org.osgi.framework.Constants; import org.osgi.framework.Filter; import org.osgi.framework.Version; diff --git a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/ReadOnlyState.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/ReadOnlyState.java index d0bc359ae..d0bc359ae 100644 --- a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/ReadOnlyState.java +++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/ReadOnlyState.java diff --git a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/ResolverErrorImpl.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/ResolverErrorImpl.java index e9131afb3..e9131afb3 100644 --- a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/ResolverErrorImpl.java +++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/ResolverErrorImpl.java diff --git a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateBuilder.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateBuilder.java index cf65e77be..332eedb48 100644 --- a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateBuilder.java +++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateBuilder.java @@ -11,12 +11,12 @@ *******************************************************************************/ package org.eclipse.osgi.internal.resolver; +import org.eclipse.osgi.internal.framework.EquinoxContainer; import org.eclipse.osgi.internal.framework.FilterImpl; import java.lang.reflect.Constructor; import java.util.*; import org.eclipse.osgi.framework.internal.core.*; -import org.eclipse.osgi.framework.internal.core.Constants; import org.eclipse.osgi.service.resolver.*; import org.eclipse.osgi.service.resolver.VersionRange; import org.eclipse.osgi.util.ManifestElement; @@ -30,13 +30,13 @@ import org.osgi.resource.Namespace; * This class builds bundle description objects from manifests */ public class StateBuilder { - private static final String[] DEFINED_EXPORT_PACKAGE_DIRECTIVES = {Constants.USES_DIRECTIVE, Constants.INCLUDE_DIRECTIVE, Constants.EXCLUDE_DIRECTIVE, Constants.FRIENDS_DIRECTIVE, Constants.INTERNAL_DIRECTIVE, Constants.MANDATORY_DIRECTIVE}; + private static final String[] DEFINED_EXPORT_PACKAGE_DIRECTIVES = {Constants.USES_DIRECTIVE, Constants.INCLUDE_DIRECTIVE, Constants.EXCLUDE_DIRECTIVE, StateImpl.FRIENDS_DIRECTIVE, StateImpl.INTERNAL_DIRECTIVE, Constants.MANDATORY_DIRECTIVE}; private static final String[] DEFINED_IMPORT_PACKAGE_DIRECTIVES = {Constants.RESOLUTION_DIRECTIVE}; private static final String[] DEFINED_PACKAGE_MATCHING_ATTRS = {Constants.BUNDLE_SYMBOLICNAME_ATTRIBUTE, Constants.BUNDLE_VERSION_ATTRIBUTE, Constants.PACKAGE_SPECIFICATION_VERSION, Constants.VERSION_ATTRIBUTE}; private static final String[] DEFINED_REQUIRE_BUNDLE_DIRECTIVES = {Constants.RESOLUTION_DIRECTIVE, Constants.VISIBILITY_DIRECTIVE}; private static final String[] DEFINED_FRAGMENT_HOST_DIRECTIVES = {Constants.EXTENSION_DIRECTIVE}; static final String[] DEFINED_BSN_DIRECTIVES = {Constants.SINGLETON_DIRECTIVE, Constants.FRAGMENT_ATTACHMENT_DIRECTIVE, Constants.MANDATORY_DIRECTIVE}; - static final String[] DEFINED_BSN_MATCHING_ATTRS = {Constants.BUNDLE_VERSION_ATTRIBUTE, Constants.OPTIONAL_ATTRIBUTE, Constants.REPROVIDE_ATTRIBUTE}; + static final String[] DEFINED_BSN_MATCHING_ATTRS = {Constants.BUNDLE_VERSION_ATTRIBUTE, StateImpl.OPTIONAL_ATTRIBUTE, StateImpl.REPROVIDE_ATTRIBUTE}; private static final String[] DEFINED_REQUIRE_CAPABILITY_DIRECTIVES = {Constants.RESOLUTION_DIRECTIVE, Constants.FILTER_DIRECTIVE, Namespace.REQUIREMENT_CARDINALITY_DIRECTIVE}; private static final String[] DEFINED_REQUIRE_CAPABILITY_ATTRS = {}; private static final String[] DEFINED_OSGI_VALIDATE_HEADERS = {Constants.IMPORT_PACKAGE, Constants.DYNAMICIMPORT_PACKAGE, Constants.EXPORT_PACKAGE, Constants.FRAGMENT_HOST, Constants.BUNDLE_SYMBOLICNAME, Constants.REQUIRE_BUNDLE}; @@ -57,7 +57,7 @@ public class StateBuilder { static BundleDescription createBundleDescription(StateImpl state, Dictionary<String, String> manifest, String location) throws BundleException { BundleDescriptionImpl result = new BundleDescriptionImpl(); String manifestVersionHeader = manifest.get(Constants.BUNDLE_MANIFESTVERSION); - boolean jreBundle = "true".equals(manifest.get(Constants.Eclipse_JREBUNDLE)); //$NON-NLS-1$ + boolean jreBundle = "true".equals(manifest.get(StateImpl.Eclipse_JREBUNDLE)); //$NON-NLS-1$ int manifestVersion = 1; if (manifestVersionHeader != null) manifestVersion = Integer.parseInt(manifestVersionHeader); @@ -103,14 +103,14 @@ public class StateBuilder { // must not fail for old R3 style bundles } result.setLocation(location); - result.setPlatformFilter(manifest.get(Constants.ECLIPSE_PLATFORMFILTER)); + result.setPlatformFilter(manifest.get(StateImpl.ECLIPSE_PLATFORMFILTER)); String[] brees = ManifestElement.getArrayFromList(manifest.get(Constants.BUNDLE_REQUIREDEXECUTIONENVIRONMENT)); result.setExecutionEnvironments(brees); ManifestElement[] host = ManifestElement.parseHeader(Constants.FRAGMENT_HOST, manifest.get(Constants.FRAGMENT_HOST)); if (host != null) result.setHost(createHostSpecification(host[0], state)); ManifestElement[] exports = ManifestElement.parseHeader(Constants.EXPORT_PACKAGE, manifest.get(Constants.EXPORT_PACKAGE)); - ManifestElement[] provides = ManifestElement.parseHeader(Constants.PROVIDE_PACKAGE, manifest.get(Constants.PROVIDE_PACKAGE)); + ManifestElement[] provides = ManifestElement.parseHeader(StateImpl.PROVIDE_PACKAGE, manifest.get(StateImpl.PROVIDE_PACKAGE)); boolean strict = state != null && state.inStrictMode(); List<String> providedExports = new ArrayList<String>(provides == null ? 0 : provides.length); result.setExportPackages(createExportPackages(exports, provides, providedExports, strict)); @@ -237,8 +237,8 @@ public class StateBuilder { BundleSpecificationImpl result = new BundleSpecificationImpl(); result.setName(spec.getValue()); result.setVersionRange(getVersionRange(spec.getAttribute(Constants.BUNDLE_VERSION_ATTRIBUTE))); - result.setExported(Constants.VISIBILITY_REEXPORT.equals(spec.getDirective(Constants.VISIBILITY_DIRECTIVE)) || "true".equals(spec.getAttribute(Constants.REPROVIDE_ATTRIBUTE))); //$NON-NLS-1$ - result.setOptional(Constants.RESOLUTION_OPTIONAL.equals(spec.getDirective(Constants.RESOLUTION_DIRECTIVE)) || "true".equals(spec.getAttribute(Constants.OPTIONAL_ATTRIBUTE))); //$NON-NLS-1$ + result.setExported(Constants.VISIBILITY_REEXPORT.equals(spec.getDirective(Constants.VISIBILITY_DIRECTIVE)) || "true".equals(spec.getAttribute(StateImpl.REPROVIDE_ATTRIBUTE))); //$NON-NLS-1$ + result.setOptional(Constants.RESOLUTION_OPTIONAL.equals(spec.getDirective(Constants.RESOLUTION_DIRECTIVE)) || "true".equals(spec.getAttribute(StateImpl.OPTIONAL_ATTRIBUTE))); //$NON-NLS-1$ result.setAttributes(getAttributes(spec, DEFINED_BSN_MATCHING_ATTRS)); result.setArbitraryDirectives(getDirectives(spec, DEFINED_REQUIRE_BUNDLE_DIRECTIVES)); return result; @@ -333,7 +333,7 @@ public class StateBuilder { String[] exportNames = exportPackage.getValueComponents(); for (int i = 0; i < exportNames.length; i++) { // if we are in strict mode and the package is marked as internal, skip it. - if (strict && "true".equals(exportPackage.getDirective(Constants.INTERNAL_DIRECTIVE))) //$NON-NLS-1$ + if (strict && "true".equals(exportPackage.getDirective(StateImpl.INTERNAL_DIRECTIVE))) //$NON-NLS-1$ continue; ExportPackageDescriptionImpl result = new ExportPackageDescriptionImpl(); result.setName(exportNames[i]); @@ -345,8 +345,8 @@ public class StateBuilder { result.setDirective(Constants.USES_DIRECTIVE, ManifestElement.getArrayFromList(exportPackage.getDirective(Constants.USES_DIRECTIVE))); result.setDirective(Constants.INCLUDE_DIRECTIVE, exportPackage.getDirective(Constants.INCLUDE_DIRECTIVE)); result.setDirective(Constants.EXCLUDE_DIRECTIVE, exportPackage.getDirective(Constants.EXCLUDE_DIRECTIVE)); - result.setDirective(Constants.FRIENDS_DIRECTIVE, ManifestElement.getArrayFromList(exportPackage.getDirective(Constants.FRIENDS_DIRECTIVE))); - result.setDirective(Constants.INTERNAL_DIRECTIVE, Boolean.valueOf(exportPackage.getDirective(Constants.INTERNAL_DIRECTIVE))); + result.setDirective(StateImpl.FRIENDS_DIRECTIVE, ManifestElement.getArrayFromList(exportPackage.getDirective(StateImpl.FRIENDS_DIRECTIVE))); + result.setDirective(StateImpl.INTERNAL_DIRECTIVE, Boolean.valueOf(exportPackage.getDirective(StateImpl.INTERNAL_DIRECTIVE))); result.setDirective(Constants.MANDATORY_DIRECTIVE, ManifestElement.getArrayFromList(exportPackage.getDirective(Constants.MANDATORY_DIRECTIVE))); result.setAttributes(getAttributes(exportPackage, DEFINED_PACKAGE_MATCHING_ATTRS)); result.setArbitraryDirectives(getDirectives(exportPackage, DEFINED_EXPORT_PACKAGE_DIRECTIVES)); @@ -882,7 +882,7 @@ public class StateBuilder { return; String hostName = elements[0].getValue(); // XXX: The extension bundle check is done against system.bundle and org.eclipse.osgi - if (!hostName.equals(Constants.SYSTEM_BUNDLE_SYMBOLICNAME) && !hostName.equals(Constants.getInternalSymbolicName())) { + if (!hostName.equals(Constants.SYSTEM_BUNDLE_SYMBOLICNAME) && !hostName.equals(EquinoxContainer.NAME)) { String message = NLS.bind(Msg.MANIFEST_INVALID_HEADER_EXCEPTION, headerKey, elements[0].toString()); throw new BundleException(message + " : " + NLS.bind(StateMsg.HEADER_EXTENSION_ERROR, hostName), BundleException.MANIFEST_ERROR); //$NON-NLS-1$ } diff --git a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateDeltaImpl.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateDeltaImpl.java index 966a0224d..966a0224d 100644 --- a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateDeltaImpl.java +++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateDeltaImpl.java diff --git a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateHelperImpl.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateHelperImpl.java index 74dac6fff..e6cc72a7e 100644 --- a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateHelperImpl.java +++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateHelperImpl.java @@ -12,9 +12,10 @@ package org.eclipse.osgi.internal.resolver; import java.util.*; -import org.eclipse.osgi.framework.internal.core.Constants; import org.eclipse.osgi.internal.baseadaptor.ArrayMap; +import org.eclipse.osgi.internal.container.ComputeNodeOrder; import org.eclipse.osgi.service.resolver.*; +import org.osgi.framework.Constants; import org.osgi.framework.hooks.resolver.ResolverHook; import org.osgi.framework.hooks.resolver.ResolverHookFactory; import org.osgi.framework.namespace.ExecutionEnvironmentNamespace; @@ -493,7 +494,7 @@ public final class StateHelperImpl implements StateHelper { private boolean isFriend(String consumerBSN, ExportPackageDescription export, boolean strict) { if (!strict) return true; // ignore friends rules if not in strict mode - String[] friends = (String[]) export.getDirective(Constants.FRIENDS_DIRECTIVE); + String[] friends = (String[]) export.getDirective(StateImpl.FRIENDS_DIRECTIVE); if (friends == null) return true; // no x-friends means it is wide open for (int i = 0; i < friends.length; i++) @@ -503,7 +504,7 @@ public final class StateHelperImpl implements StateHelper { } public int getAccessCode(BundleDescription bundle, ExportPackageDescription export) { - if (((Boolean) export.getDirective(Constants.INTERNAL_DIRECTIVE)).booleanValue()) + if (((Boolean) export.getDirective(StateImpl.INTERNAL_DIRECTIVE)).booleanValue()) return ACCESS_DISCOURAGED; if (!isFriend(bundle.getSymbolicName(), export, true)) // pass strict here so that x-friends is processed return ACCESS_DISCOURAGED; diff --git a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateImpl.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateImpl.java index 4f4e5c546..295605d4d 100644 --- a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateImpl.java +++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateImpl.java @@ -12,16 +12,14 @@ *******************************************************************************/ package org.eclipse.osgi.internal.resolver; +import org.eclipse.osgi.internal.framework.EquinoxContainer; import org.eclipse.osgi.internal.framework.FilterImpl; import org.eclipse.osgi.internal.debug.Debug; import org.eclipse.osgi.internal.debug.FrameworkDebugOptions; import java.util.*; -import org.eclipse.osgi.framework.internal.core.Constants; import org.eclipse.osgi.framework.util.*; -import org.eclipse.osgi.internal.baseadaptor.StateManager; -import org.eclipse.osgi.internal.loader.BundleLoaderProxy; import org.eclipse.osgi.service.resolver.*; import org.eclipse.osgi.util.ManifestElement; import org.eclipse.osgi.util.NLS; @@ -31,11 +29,87 @@ import org.osgi.framework.hooks.resolver.ResolverHookFactory; import org.osgi.framework.wiring.BundleRevision; public abstract class StateImpl implements State { + + public static final String ECLIPSE_PLATFORMFILTER = "Eclipse-PlatformFilter"; //$NON-NLS-1$ + public static final String Eclipse_JREBUNDLE = "Eclipse-JREBundle"; //$NON-NLS-1$ + /** + * Manifest Export-Package directive indicating that the exported package should only + * be made available when the resolver is not in strict mode. + */ + public static final String INTERNAL_DIRECTIVE = "x-internal"; //$NON-NLS-1$ + + /** + * Manifest Export-Package directive indicating that the exported package should only + * be made available to friends of the exporting bundle. + */ + public static final String FRIENDS_DIRECTIVE = "x-friends"; //$NON-NLS-1$ + + /** + * Manifest header (named "Provide-Package") + * identifying the packages name + * provided to other bundles which require the bundle. + * + * <p> + * NOTE: this is only used for backwards compatibility, bundles manifest using + * syntax version 2 will not recognize this header. + * + * <p>The attribute value may be retrieved from the + * <tt>Dictionary</tt> object returned by the <tt>Bundle.getHeaders</tt> method. + * @deprecated + */ + public final static String PROVIDE_PACKAGE = "Provide-Package"; //$NON-NLS-1$ + + /** + * Manifest header attribute (named "reprovide") + * for Require-Bundle + * identifying that any packages that are provided + * by the required bundle must be reprovided by the requiring bundle. + * The default value is <tt>false</tt>. + * <p> + * The attribute value is encoded in the Require-Bundle manifest + * header like: + * <pre> + * Require-Bundle: com.acme.module.test; reprovide="true" + * </pre> + * <p> + * NOTE: this is only used for backwards compatibility, bundles manifest using + * syntax version 2 will not recognize this attribute. + * @deprecated + */ + public final static String REPROVIDE_ATTRIBUTE = "reprovide"; //$NON-NLS-1$ + + /** + * Manifest header attribute (named "optional") + * for Require-Bundle + * identifying that a required bundle is optional and that + * the requiring bundle can be resolved if there is no + * suitable required bundle. + * The default value is <tt>false</tt>. + * + * <p>The attribute value is encoded in the Require-Bundle manifest + * header like: + * <pre> + * Require-Bundle: com.acme.module.test; optional="true" + * </pre> + * <p> + * NOTE: this is only used for backwards compatibility, bundles manifest using + * syntax version 2 will not recognize this attribute. + * @since 1.3 <b>EXPERIMENTAL</b> + * @deprecated + */ + public final static String OPTIONAL_ATTRIBUTE = "optional"; //$NON-NLS-1$ + + public static final String OSGI_RESOLVER_MODE = "osgi.resolverMode"; //$NON-NLS-1$ + public static final String STRICT_MODE = "strict"; //$NON-NLS-1$ + public static final String DEVELOPMENT_MODE = "development"; //$NON-NLS-1$ + + public static final String STATE_SYSTEM_BUNDLE = "osgi.system.bundle"; //$NON-NLS-1$ + private static final String OSGI_OS = "osgi.os"; //$NON-NLS-1$ private static final String OSGI_WS = "osgi.ws"; //$NON-NLS-1$ private static final String OSGI_NL = "osgi.nl"; //$NON-NLS-1$ private static final String OSGI_ARCH = "osgi.arch"; //$NON-NLS-1$ - public static final String[] PROPS = {OSGI_OS, OSGI_WS, OSGI_NL, OSGI_ARCH, Constants.FRAMEWORK_SYSTEMPACKAGES, Constants.FRAMEWORK_SYSTEMPACKAGES_EXTRA, Constants.OSGI_RESOLVER_MODE, Constants.FRAMEWORK_EXECUTIONENVIRONMENT, "osgi.resolveOptional", "osgi.genericAliases", Constants.FRAMEWORK_OS_NAME, Constants.FRAMEWORK_OS_VERSION, Constants.FRAMEWORK_PROCESSOR, Constants.FRAMEWORK_LANGUAGE, Constants.STATE_SYSTEM_BUNDLE, Constants.FRAMEWORK_SYSTEMCAPABILITIES, Constants.FRAMEWORK_SYSTEMCAPABILITIES_EXTRA}; //$NON-NLS-1$ //$NON-NLS-2$ + public static final String[] PROPS = {OSGI_OS, OSGI_WS, OSGI_NL, OSGI_ARCH, Constants.FRAMEWORK_SYSTEMPACKAGES, Constants.FRAMEWORK_SYSTEMPACKAGES_EXTRA, OSGI_RESOLVER_MODE, Constants.FRAMEWORK_EXECUTIONENVIRONMENT, "osgi.resolveOptional", "osgi.genericAliases", Constants.FRAMEWORK_OS_NAME, Constants.FRAMEWORK_OS_VERSION, Constants.FRAMEWORK_PROCESSOR, Constants.FRAMEWORK_LANGUAGE, STATE_SYSTEM_BUNDLE, Constants.FRAMEWORK_SYSTEMCAPABILITIES, Constants.FRAMEWORK_SYSTEMCAPABILITIES_EXTRA}; //$NON-NLS-1$ //$NON-NLS-2$ private static final DisabledInfo[] EMPTY_DISABLEDINFOS = new DisabledInfo[0]; public static final String OSGI_EE_NAMESPACE = "osgi.ee"; //$NON-NLS-1$ @@ -195,9 +269,6 @@ public abstract class StateImpl implements State { } private boolean isInUse(BundleDescription bundle) { - Object userObject = bundle.getUserObject(); - if (userObject instanceof BundleLoaderProxy) - return ((BundleLoaderProxy) userObject).inUse(); return bundle.getDependents().length > 0; } @@ -427,8 +498,6 @@ public abstract class StateImpl implements State { try { resolving = true; long start = 0; - if (StateManager.DEBUG_PLATFORM_ADMIN_RESOLVER) - start = System.currentTimeMillis(); if (!incremental) { resolved = false; reResolve = getBundles(); @@ -491,12 +560,6 @@ public abstract class StateImpl implements State { savedChanges.setResolverHookException(error); changes = new StateDeltaImpl(this); - if (StateManager.DEBUG_PLATFORM_ADMIN_RESOLVER) { - long time = System.currentTimeMillis() - start; - Debug.println("Time spent resolving: " + time); //$NON-NLS-1$ - cumulativeTime = cumulativeTime + time; - FrameworkDebugOptions.getDefault().setOption("org.eclipse.core.runtime.adaptor/resolver/timing/value", Long.toString(cumulativeTime)); //$NON-NLS-1$ - } if (savedChanges.getChanges().length > 0) updateTimeStamp(); return savedChanges; @@ -804,7 +867,7 @@ public abstract class StateImpl implements State { resetSystemExports(); if (performResetSystemCapabilities) resetSystemCapabilities(); - developmentMode = this.platformProperties.length == 0 ? false : org.eclipse.osgi.framework.internal.core.Constants.DEVELOPMENT_MODE.equals(this.platformProperties[0].get(org.eclipse.osgi.framework.internal.core.Constants.OSGI_RESOLVER_MODE)); + developmentMode = this.platformProperties.length == 0 ? false : DEVELOPMENT_MODE.equals(this.platformProperties[0].get(OSGI_RESOLVER_MODE)); return result; } @@ -960,8 +1023,8 @@ public abstract class StateImpl implements State { public String getSystemBundle() { String symbolicName = null; if (platformProperties != null && platformProperties.length > 0) - symbolicName = (String) platformProperties[0].get(Constants.STATE_SYSTEM_BUNDLE); - return symbolicName != null ? symbolicName : Constants.getInternalSymbolicName(); + symbolicName = (String) platformProperties[0].get(STATE_SYSTEM_BUNDLE); + return symbolicName != null ? symbolicName : EquinoxContainer.NAME; } public BundleDescription[] getRemovalPending() { @@ -1123,7 +1186,7 @@ public abstract class StateImpl implements State { boolean inStrictMode() { synchronized (this.monitor) { - return Constants.STRICT_MODE.equals(getPlatformProperties()[0].get(Constants.OSGI_RESOLVER_MODE)); + return STRICT_MODE.equals(getPlatformProperties()[0].get(OSGI_RESOLVER_MODE)); } } diff --git a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateMessages.properties b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateMessages.properties index acf9ffad8..acf9ffad8 100644 --- a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateMessages.properties +++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateMessages.properties diff --git a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateMsg.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateMsg.java index 1aeb570ae..1aeb570ae 100644 --- a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateMsg.java +++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateMsg.java diff --git a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateObjectFactoryImpl.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateObjectFactoryImpl.java index 1b684ca67..2c69a98b4 100644 --- a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateObjectFactoryImpl.java +++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateObjectFactoryImpl.java @@ -12,7 +12,6 @@ package org.eclipse.osgi.internal.resolver; import java.io.*; import java.util.*; -import org.eclipse.osgi.framework.internal.core.Constants; import org.eclipse.osgi.internal.module.ResolverImpl; import org.eclipse.osgi.service.resolver.*; import org.eclipse.osgi.service.resolver.VersionRange; @@ -375,12 +374,6 @@ public class StateObjectFactoryImpl implements StateObjectFactory { return result; } - public SystemState createSystemState(BundleContext context) { - SystemState state = new SystemState(context); - state.setFactory(this); - return state; - } - /** * @deprecated */ @@ -417,16 +410,6 @@ public class StateObjectFactoryImpl implements StateObjectFactory { return state; } - public SystemState readSystemState(BundleContext context, File stateFile, File lazyFile, boolean lazyLoad, long expectedTimeStamp) throws IOException { - StateReader reader = new StateReader(stateFile, lazyFile, lazyLoad); - SystemState restoredState = new SystemState(context); - restoredState.setReader(reader); - restoredState.setFactory(this); - if (!reader.loadState(restoredState, expectedTimeStamp)) - return null; - return restoredState; - } - /** * @deprecated */ @@ -505,7 +488,7 @@ public class StateObjectFactoryImpl implements StateObjectFactory { writer.saveState((StateImpl) state, stateFile, lazyFile); } - public void internalWriteStateDeprecated(State state, DataOutputStream stream) throws IOException { + private void internalWriteStateDeprecated(State state, DataOutputStream stream) throws IOException { if (state.getFactory() != this) throw new IllegalArgumentException(); StateWriter writer = new StateWriter(); diff --git a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateReader.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateReader.java index f121b267a..f121b267a 100644 --- a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateReader.java +++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateReader.java diff --git a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateWriter.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateWriter.java index 57a10d0eb..57a10d0eb 100644 --- a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateWriter.java +++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateWriter.java diff --git a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/UserState.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/UserState.java index 905927941..905927941 100644 --- a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/UserState.java +++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/UserState.java diff --git a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/VersionConstraintImpl.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/VersionConstraintImpl.java index 3f0e2f078..73682082f 100644 --- a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/VersionConstraintImpl.java +++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/VersionConstraintImpl.java @@ -14,10 +14,12 @@ package org.eclipse.osgi.internal.resolver; import java.util.Collections; import java.util.Map; -import org.eclipse.osgi.framework.internal.core.Constants; + +import org.eclipse.osgi.internal.framework.EquinoxContainer; import org.eclipse.osgi.internal.resolver.BaseDescriptionImpl.BaseCapability; import org.eclipse.osgi.service.resolver.*; import org.eclipse.osgi.util.ManifestElement; +import org.osgi.framework.Constants; import org.osgi.framework.FrameworkUtil; import org.osgi.framework.InvalidSyntaxException; import org.osgi.framework.namespace.AbstractWiringNamespace; @@ -39,7 +41,7 @@ abstract class VersionConstraintImpl implements VersionConstraint { synchronized (this.monitor) { if (Constants.SYSTEM_BUNDLE_SYMBOLICNAME.equals(name)) { StateImpl state = (StateImpl) getBundle().getContainingState(); - return state == null ? Constants.getInternalSymbolicName() : state.getSystemBundle(); + return state == null ? EquinoxContainer.NAME : state.getSystemBundle(); } return name; } diff --git a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/SystemState.java b/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/SystemState.java deleted file mode 100644 index f73e6948f..000000000 --- a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/SystemState.java +++ /dev/null @@ -1,46 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2010 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 - * Rob Harrop - SpringSource Inc. (bug 247522) - *******************************************************************************/ -package org.eclipse.osgi.internal.resolver; - -import org.eclipse.osgi.framework.internal.core.*; -import org.eclipse.osgi.service.resolver.*; -import org.osgi.framework.BundleContext; -import org.osgi.framework.BundleException; - -// this class provides synchronous access to resolve and add/remove/update bundle for the framework -public class SystemState extends StateImpl { - private final Framework framework; - - public SystemState(BundleContext context) { - this.framework = context == null ? null : ((BundleContextImpl) context).getFramework(); - } - - @Override - boolean basicAddBundle(BundleDescription description) { - if (framework != null && description.getUserObject() == null) { - // We always set the user object to a BundleReference object; - // This allows the resolver to implement BundleRevisions for - // the resolver hooks. - AbstractBundle bundle = framework.getBundle(description.getBundleId()); - description.setUserObject(bundle != null ? bundle.getBundleData() : null); - } - return super.basicAddBundle(description); - } - - /** - * @throws BundleException - */ - public StateDelta compare(State state) throws BundleException { - // we don't implement this (no big deal: the system state is private to the framework) - throw new UnsupportedOperationException(); - } -} |