Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » installOperation.resolveModal() never flags ok(Issues while creating jobs for installation)
installOperation.resolveModal() never flags ok [message #693527] Wed, 06 July 2011 12:45
Rajendra Kolli is currently offline 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
Previous Topic:Why doesn't the Eclipse Marketplace client find my plug-in?
Next Topic:Unable to understand the output of the error
Goto Forum:
  


Current Time: Sat Apr 19 09:01:57 EDT 2014

Powered by FUDForum. Page generated in 0.05584 seconds