View | Details | Raw Unified | Return to bug 334399
Collapse All | Expand All

(-)src/org/eclipse/pde/internal/ui/shared/target/EditIUContainerPage.java (-6 / +9 lines)
Lines 19-24 Link Here
19
import org.eclipse.equinox.internal.p2.ui.dialogs.*;
19
import org.eclipse.equinox.internal.p2.ui.dialogs.*;
20
import org.eclipse.equinox.internal.p2.ui.query.IUViewQueryContext;
20
import org.eclipse.equinox.internal.p2.ui.query.IUViewQueryContext;
21
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
21
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
22
import org.eclipse.equinox.p2.operations.ProvisioningSession;
22
import org.eclipse.equinox.p2.ui.Policy;
23
import org.eclipse.equinox.p2.ui.Policy;
23
import org.eclipse.equinox.p2.ui.ProvisioningUI;
24
import org.eclipse.equinox.p2.ui.ProvisioningUI;
24
import org.eclipse.jface.action.IAction;
25
import org.eclipse.jface.action.IAction;
Lines 99-109 Link Here
99
		setTitle(Messages.EditIUContainerPage_5);
100
		setTitle(Messages.EditIUContainerPage_5);
100
		setMessage(Messages.EditIUContainerPage_6);
101
		setMessage(Messages.EditIUContainerPage_6);
101
		fTarget = definition;
102
		fTarget = definition;
102
		ProvisioningUI selfProvisioningUI = ProvisioningUI.getDefaultUI();
103
		ProvisioningSession session;
103
		// TODO we use the service session from the self profile.  In the future we may want
104
		try {
104
		// to set up our own services for the profile (separate repo managers, etc).
105
			session = new ProvisioningSession(P2TargetUtils.getAgent());
105
		// We use our own new policy so we don't bash the SDK's settings.
106
		} catch (CoreException e) {
106
		profileUI = new ProvisioningUI(selfProvisioningUI.getSession(), P2TargetUtils.getProfileId(definition), new Policy());
107
			throw new IllegalStateException("Unable to get provisioning agent", e);
108
		}
109
		profileUI = new ProvisioningUI(session, P2TargetUtils.getProfileId(definition), new Policy());
107
	}
110
	}
108
111
109
	/**
112
	/**
Lines 331-337 Link Here
331
	 * Creates a default query context to setup the available IU Group
334
	 * Creates a default query context to setup the available IU Group
332
	 */
335
	 */
333
	private void createQueryContext() {
336
	private void createQueryContext() {
334
		fQueryContext = ProvUI.getQueryContext(ProvisioningUI.getDefaultUI().getPolicy());
337
		fQueryContext = ProvUI.getQueryContext(profileUI.getPolicy());
335
		fQueryContext.setInstalledProfileId(P2TargetUtils.getProfileId(fTarget));
338
		fQueryContext.setInstalledProfileId(P2TargetUtils.getProfileId(fTarget));
336
		fQueryContext.showAlreadyInstalled();
339
		fQueryContext.showAlreadyInstalled();
337
	}
340
	}

Return to bug 334399