It's all about the answers!

Ask a question

Want to Reload the component which are Out of sync using API

vikas v (15316) | asked Apr 20 '16, 8:56 a.m.
edited Apr 20 '16, 9:58 a.m. by Ralph Schoon (61.8k33643)

   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++) {

         loadOp.requestReLoad(allshare1, resolver, new NullProgressMonitor());  
         loadOp.evaluateLoadRequests(new NullProgressMonitor()); NullProgressMonitor());

I don't know whether i am going on the correct way or not.

Please help me out.

Thanks in advance!!

Be the first one to answer this question!

Register or to post your answer.