|
Lines 13-22
Link Here
|
| 13 |
import java.net.URI; |
13 |
import java.net.URI; |
| 14 |
import org.eclipse.core.runtime.IProgressMonitor; |
14 |
import org.eclipse.core.runtime.IProgressMonitor; |
| 15 |
import org.eclipse.core.runtime.IStatus; |
15 |
import org.eclipse.core.runtime.IStatus; |
| 16 |
import org.eclipse.equinox.internal.provisional.p2.director.IPlanner; |
|
|
| 17 |
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest; |
| 18 |
import org.eclipse.equinox.p2.engine.*; |
16 |
import org.eclipse.equinox.p2.engine.*; |
| 19 |
import org.eclipse.equinox.p2.metadata.*; |
17 |
import org.eclipse.equinox.p2.metadata.*; |
|
|
18 |
import org.eclipse.equinox.p2.planner.IPlanner; |
| 19 |
import org.eclipse.equinox.p2.planner.IProfileChangeRequest; |
| 20 |
import org.eclipse.swt.graphics.Image; |
20 |
import org.eclipse.swt.graphics.Image; |
| 21 |
import org.eclipse.wst.server.discovery.internal.Activator; |
21 |
import org.eclipse.wst.server.discovery.internal.Activator; |
| 22 |
import org.eclipse.wst.server.discovery.internal.ExtensionUtility; |
22 |
import org.eclipse.wst.server.discovery.internal.ExtensionUtility; |
|
Lines 92-99
Link Here
|
| 92 |
|
92 |
|
| 93 |
IProfileRegistry profileRegistry = (IProfileRegistry) ExtensionUtility.getService(bundleContext, IProfileRegistry.SERVICE_NAME); |
93 |
IProfileRegistry profileRegistry = (IProfileRegistry) ExtensionUtility.getService(bundleContext, IProfileRegistry.SERVICE_NAME); |
| 94 |
IProfile profile = profileRegistry.getProfile(IProfileRegistry.SELF); |
94 |
IProfile profile = profileRegistry.getProfile(IProfileRegistry.SELF); |
| 95 |
ProfileChangeRequest pcr = new ProfileChangeRequest(profile); |
95 |
IProfileChangeRequest pcr = planner.createChangeRequest(profile); |
| 96 |
pcr.addInstallableUnits(new IInstallableUnit[] { iu } ); |
96 |
pcr.add(iu); |
| 97 |
provContext = new ProvisioningContext(new URI[] { uri }); |
97 |
provContext = new ProvisioningContext(new URI[] { uri }); |
| 98 |
provContext.setArtifactRepositories(new URI[] { uri }); |
98 |
provContext.setArtifactRepositories(new URI[] { uri }); |
| 99 |
if (!explain) |
99 |
if (!explain) |