private void deleteAddedFilesLocally(final List<Change> changes) { if (myIndicator != null) { myIndicator.setText("Deleting added files locally..."); myIndicator.setFraction(0); } final int changesSize = changes.size(); for (int i = 0; i < changesSize; i++) { final Change c = changes.get(i); if (c.getType() == Change.Type.NEW) { ContentRevision rev = c.getAfterRevision(); assert rev != null; final File ioFile = rev.getFile().getIOFile(); if (myIndicator != null) { myIndicator.setText2(ioFile.getAbsolutePath()); myIndicator.setFraction(((double) i) / changesSize); } FileUtil.delete(ioFile); } } if (myIndicator != null) { myIndicator.setText2(""); } }