installOperation.resolveModal() never flags ok [message #693527] |
Wed, 06 July 2011 16:45 |
Rajendra Kolli Messages: 9 Registered: July 2011 |
Junior Member |
|
|
Hi all,
I am trying these p2 developments only recently. I have been facing an issue while creating the jobs using the following code
Collection<IInstallableUnit> toInstall = metadataRepo.query(
QueryUtil.createIUQuery("org.eclipse.cdt.feature.group"),
new NullProgressMonitor()).toUnmodifiableSet();
System.out.println("The Size of the installation units is "
+ toInstall.size());
InstallOperation installOperation = new InstallOperation(
new ProvisioningSession(agent), toInstall);
for (IInstallableUnit test : toInstall) {
System.out.println(test.getId());
}
if (installOperation.resolveModal(new NullProgressMonitor()).isOK()) {
System.out.println("Job is being added");
job = installOperation
.getProvisioningJob(new NullProgressMonitor());
job.addJobChangeListener(new JobChangeAdapter() {
public void done(IJobChangeEvent event) {
// agent.stop();
}
});
The code control never goes into the if loop. For sake of debugging, I have added few println statements. Their output is given below
The Size of the installation units is 3
org.eclipse.cdt.feature.group
org.eclipse.cdt.feature.group
org.eclipse.cdt.feature.group
Job is not being scheduled
The Ids are being returned properly but are never resolved. Unable to understand what to do. Any help in this would be really helpful
Thanks
Rajendra Kolli
|
|
|
Powered by
FUDForum. Page generated in 0.02745 seconds