Cannot query _SELF_ profile [SOLVED] [message #1403552] |
Thu, 24 July 2014 11:13 |
Alex Mising name Messages: 149 Registered: March 2010 |
Senior Member |
|
|
SOLUTION: the problem was that when launching from within the IDE one must go to the Configuration tab of the launch configuration and check the "Support software installation in the launched application" button.
Hi,
I need some help using the P2 services API to inspect the running configuration at runtime. I am trying to query the active profile with this code (from a stack overflow post):
ProvisioningUI provisioningUI = ProvisioningUI.getDefaultUI();
String profileId = provisioningUI.getProfileId();
ProvisioningSession provisioningSession = provisioningUI.getSession();
IProvisioningAgent agent = provisioningSession.getProvisioningAgent();
IProfileRegistry registry = (IProfileRegistry) agent
.getService(IProfileRegistry.SERVICE_NAME);
if (registry == null)
return;
IQueryable<IInstallableUnit> queryable = registry.getProfile(profileId);
At runtime, the profileId value returned by the provisioning UI is _SELF_. When the last line effectively calls registry.getProfile("_SELF_") I a null value is returned.
Is "_SELF_" a valid profile id? Why can't I list access it?
[Updated on: Fri, 25 July 2014 08:22] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.02889 seconds