Lines 1-5
Link Here
|
1 |
/******************************************************************************* |
1 |
/******************************************************************************* |
2 |
* Copyright (c) 2005, 2007 IBM Corporation and others. |
2 |
* Copyright (c) 2005, 2008 IBM Corporation and others. |
3 |
* All rights reserved. This program and the accompanying materials |
3 |
* All rights reserved. This program and the accompanying materials |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
5 |
* which accompanies this distribution, and is available at |
5 |
* which accompanies this distribution, and is available at |
Lines 10-43
Link Here
|
10 |
*******************************************************************************/ |
10 |
*******************************************************************************/ |
11 |
package org.eclipse.pde.internal.core; |
11 |
package org.eclipse.pde.internal.core; |
12 |
|
12 |
|
13 |
import java.io.File; |
13 |
import java.io.*; |
14 |
import java.io.FileInputStream; |
|
|
15 |
import java.io.FileNotFoundException; |
16 |
import java.io.IOException; |
17 |
import java.io.InputStream; |
18 |
import java.util.Dictionary; |
14 |
import java.util.Dictionary; |
19 |
import java.util.jar.JarFile; |
15 |
import java.util.jar.JarFile; |
20 |
import java.util.zip.ZipEntry; |
16 |
import java.util.zip.ZipEntry; |
21 |
import java.util.zip.ZipFile; |
17 |
import java.util.zip.ZipFile; |
22 |
|
18 |
import org.eclipse.core.runtime.*; |
23 |
import org.eclipse.core.runtime.CoreException; |
|
|
24 |
import org.eclipse.core.runtime.IStatus; |
25 |
import org.eclipse.core.runtime.MultiStatus; |
26 |
import org.eclipse.core.runtime.Path; |
27 |
import org.eclipse.core.runtime.Platform; |
28 |
import org.eclipse.core.runtime.Status; |
29 |
import org.eclipse.osgi.service.pluginconversion.PluginConversionException; |
19 |
import org.eclipse.osgi.service.pluginconversion.PluginConversionException; |
30 |
import org.eclipse.osgi.service.pluginconversion.PluginConverter; |
20 |
import org.eclipse.osgi.service.pluginconversion.PluginConverter; |
31 |
import org.eclipse.osgi.service.resolver.BundleDescription; |
21 |
import org.eclipse.osgi.service.resolver.*; |
32 |
import org.eclipse.osgi.service.resolver.BundleSpecification; |
|
|
33 |
import org.eclipse.osgi.service.resolver.HostSpecification; |
34 |
import org.eclipse.osgi.service.resolver.ImportPackageSpecification; |
35 |
import org.eclipse.osgi.service.resolver.State; |
36 |
import org.eclipse.osgi.service.resolver.StateDelta; |
37 |
import org.eclipse.osgi.service.resolver.StateHelper; |
38 |
import org.eclipse.osgi.service.resolver.StateObjectFactory; |
39 |
import org.eclipse.osgi.service.resolver.VersionConstraint; |
40 |
import org.eclipse.osgi.service.resolver.VersionRange; |
41 |
import org.eclipse.osgi.util.ManifestElement; |
22 |
import org.eclipse.osgi.util.ManifestElement; |
42 |
import org.eclipse.pde.core.plugin.IPluginModelBase; |
23 |
import org.eclipse.pde.core.plugin.IPluginModelBase; |
43 |
import org.eclipse.pde.internal.core.util.Headers; |
24 |
import org.eclipse.pde.internal.core.util.Headers; |
Lines 61-67
Link Here
|
61 |
|
42 |
|
62 |
private boolean fNoProfile; |
43 |
private boolean fNoProfile; |
63 |
|
44 |
|
64 |
private static final String SYSTEM_BUNDLE = "org.eclipse.osgi"; //$NON-NLS-1$ |
45 |
private static final String DEFAULT_SYSTEM_BUNDLE = "org.eclipse.osgi"; //$NON-NLS-1$ |
65 |
|
46 |
|
66 |
protected static boolean DEBUG = false; |
47 |
protected static boolean DEBUG = false; |
67 |
|
48 |
|
Lines 69-74
Link Here
|
69 |
|
50 |
|
70 |
protected static String DIR; |
51 |
protected static String DIR; |
71 |
|
52 |
|
|
|
53 |
protected String fSystemBundle = DEFAULT_SYSTEM_BUNDLE; |
54 |
|
72 |
static { |
55 |
static { |
73 |
DEBUG = PDECore.getDefault().isDebugging() && "true".equals(Platform.getDebugOption("org.eclipse.pde.core/cache")); //$NON-NLS-1$ //$NON-NLS-2$ |
56 |
DEBUG = PDECore.getDefault().isDebugging() && "true".equals(Platform.getDebugOption("org.eclipse.pde.core/cache")); //$NON-NLS-1$ //$NON-NLS-2$ |
74 |
DIR = PDECore.getDefault().getStateLocation().toOSString(); |
57 |
DIR = PDECore.getDefault().getStateLocation().toOSString(); |
Lines 83-88
Link Here
|
83 |
this.fEEListChanged = state.fEEListChanged; |
66 |
this.fEEListChanged = state.fEEListChanged; |
84 |
this.fExecutionEnvironments = state.fExecutionEnvironments; |
67 |
this.fExecutionEnvironments = state.fExecutionEnvironments; |
85 |
this.fNoProfile = state.fNoProfile; |
68 |
this.fNoProfile = state.fNoProfile; |
|
|
69 |
this.fSystemBundle = state.fSystemBundle; |
86 |
} |
70 |
} |
87 |
|
71 |
|
88 |
protected MinimalState() { |
72 |
protected MinimalState() { |
Lines 145-155
Link Here
|
145 |
throw new CoreException(new Status(IStatus.ERROR, PDECore.PLUGIN_ID, IStatus.ERROR, "Error parsing plug-in manifest file at " + bundleLocation.toString(), null)); //$NON-NLS-1$ |
129 |
throw new CoreException(new Status(IStatus.ERROR, PDECore.PLUGIN_ID, IStatus.ERROR, "Error parsing plug-in manifest file at " + bundleLocation.toString(), null)); //$NON-NLS-1$ |
146 |
} |
130 |
} |
147 |
BundleDescription desc = addBundle(manifest, bundleLocation, bundleId); |
131 |
BundleDescription desc = addBundle(manifest, bundleLocation, bundleId); |
148 |
if (desc != null && SYSTEM_BUNDLE.equals(desc.getSymbolicName())) { |
132 |
if (desc != null && "true".equals(manifest.get(ICoreConstants.ECLIPSE_SYSTEM_BUNDLE))) { //$NON-NLS-1$ |
149 |
// if this is the system bundle then |
133 |
// if this is the system bundle then |
150 |
// indicate that the javaProfile has changed since the new system |
134 |
// indicate that the javaProfile has changed since the new system |
151 |
// bundle may not contain profiles for all EE's in the list |
135 |
// bundle may not contain profiles for all EE's in the list |
152 |
fEEListChanged = true; |
136 |
fEEListChanged = true; |
|
|
137 |
fSystemBundle = desc.getSymbolicName(); |
153 |
} |
138 |
} |
154 |
if (desc != null) { |
139 |
if (desc != null) { |
155 |
addAuxiliaryData(desc, manifest, hasBundleStructure); |
140 |
addAuxiliaryData(desc, manifest, hasBundleStructure); |
Lines 332-335
Link Here
|
332 |
return constraint.getName() + '_' + versionRange; |
317 |
return constraint.getName() + '_' + versionRange; |
333 |
} |
318 |
} |
334 |
|
319 |
|
|
|
320 |
public String getSystemBundle() { |
321 |
return fSystemBundle; |
322 |
} |
323 |
|
335 |
} |
324 |
} |