It's all about the answers!

Ask a question

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

vikas v (15319) | asked Apr 20 '16, 8:56 a.m.
edited Apr 20 '16, 9:58 a.m. by Ralph Schoon (63.2k33646)

   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.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.