use of com.intellij.openapi.vcs.changes.SimpleContentRevision in project intellij-community by JetBrains.
the class TextFilePatchInProgress method getNewContentRevision.
public ContentRevision getNewContentRevision() {
if (FilePatchStatus.DELETED.equals(myStatus))
return null;
if (myNewContentRevision == null) {
myConflicts = null;
if (FilePatchStatus.ADDED.equals(myStatus)) {
final FilePath newFilePath = VcsUtil.getFilePath(myIoCurrentBase, false);
final String content = myPatch.getNewFileText();
myNewContentRevision = new SimpleContentRevision(content, newFilePath, myPatch.getAfterVersionId());
} else {
final FilePath newFilePath = detectNewFilePathForMovedOrModified();
myNewContentRevision = new LazyPatchContentRevision(myCurrentBase, newFilePath, myPatch.getAfterVersionId(), myPatch);
if (myCurrentBase != null) {
ApplicationManager.getApplication().executeOnPooledThread(new Runnable() {
public void run() {
((LazyPatchContentRevision) myNewContentRevision).getContent();
}
});
}
}
}
return myNewContentRevision;
}
Aggregations