Want to Reload the component which are Out of sync using API
Hello,
I want to reload the component which are out of sync in the loaded sandbox Programmatically using plain java api.
I tried like this but its not worked for me.
IRepositoryResolver repositoryResolver = IRepositoryResolver.EXISTING_SHARED;
LoadDilemmaHandler mdtLoadDilemmaHandler = MDTLoadDilemmaHandler.getDefault();
ILoadOperation loadOp= IOperationFactory.instance.getLoadOperation(mdtLoadDilemmaHandler);
ISharingManager sm = FileSystemCore.getSharingManager();
IShare[] iShares1 = sm.allShares(null);
Collection<IShare> allshare1 = new ArrayList<>();
for (int i = 0; i < iShares1.length; i++) {
allshare1.add(iShares1[i]);
}
loadOp.requestReLoad(allshare1, resolver, new NullProgressMonitor());
loadOp.evaluateLoadRequests(new NullProgressMonitor());
loadOp.run(new NullProgressMonitor());
I don't know whether i am going on the correct way or not.
Please help me out.
Thanks in advance!!
Regards,
Vikas
I want to reload the component which are out of sync in the loaded sandbox Programmatically using plain java api.
I tried like this but its not worked for me.
IRepositoryResolver repositoryResolver = IRepositoryResolver.EXISTING_SHARED;
LoadDilemmaHandler mdtLoadDilemmaHandler = MDTLoadDilemmaHandler.getDefault();
ILoadOperation loadOp= IOperationFactory.instance.getLoadOperation(mdtLoadDilemmaHandler);
ISharingManager sm = FileSystemCore.getSharingManager();
IShare[] iShares1 = sm.allShares(null);
Collection<IShare> allshare1 = new ArrayList<>();
for (int i = 0; i < iShares1.length; i++) {
allshare1.add(iShares1[i]);
}
loadOp.requestReLoad(allshare1, resolver, new NullProgressMonitor());
loadOp.evaluateLoadRequests(new NullProgressMonitor());
loadOp.run(new NullProgressMonitor());
I don't know whether i am going on the correct way or not.
Please help me out.
Thanks in advance!!
Regards,
Vikas