本文整理匯總了Java中com.intellij.history.integration.ui.models.NullRevisionsProgress類的典型用法代碼示例。如果您正苦於以下問題:Java NullRevisionsProgress類的具體用法?Java NullRevisionsProgress怎麽用?Java NullRevisionsProgress使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
NullRevisionsProgress類屬於com.intellij.history.integration.ui.models包,在下文中一共展示了NullRevisionsProgress類的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: testTitles
import com.intellij.history.integration.ui.models.NullRevisionsProgress; //導入依賴的package包/類
public void testTitles() throws IOException {
long leftTime = new Date(2001 - 1900, 1, 3, 12, 0).getTime();
long rightTime = new Date(2002 - 1900, 2, 4, 14, 0).getTime();
VirtualFile f = myRoot.createChildData(null, "old.txt");
f.setBinaryContent("old".getBytes(), -1, leftTime);
f.rename(null, "new.txt");
f.setBinaryContent("new".getBytes(), -1, rightTime);
f.setBinaryContent(new byte[0]); // to create current content to skip.
FileHistoryDialogModel m = createFileModelAndSelectRevisions(f, 0, 2);
assertEquals(FileUtil.toSystemDependentName(f.getPath()), m.getDifferenceModel().getTitle());
assertEquals(DateFormatUtil.formatPrettyDateTime(leftTime) + " - old.txt",
m.getDifferenceModel().getLeftTitle(new NullRevisionsProgress()));
assertEquals(DateFormatUtil.formatPrettyDateTime(rightTime) + " - new.txt",
m.getDifferenceModel().getRightTitle(new NullRevisionsProgress()));
}
示例2: testTitles
import com.intellij.history.integration.ui.models.NullRevisionsProgress; //導入依賴的package包/類
public void testTitles() throws IOException {
f.rename(null, "ff.txt");
f.setBinaryContent(new byte[0]);
initModelOnSecondLineAndSelectRevisions(0, 1);
assertEquals(FileUtil.toSystemDependentName(f.getPath()), dm.getTitle());
assertTrue(dm.getLeftTitle(new NullRevisionsProgress()), dm.getLeftTitle(new NullRevisionsProgress()).endsWith(" - f.txt"));
assertTrue(dm.getRightTitle(new NullRevisionsProgress()), dm.getRightTitle(new NullRevisionsProgress()).endsWith(" - ff.txt"));
}
示例3: testDiffContents
import com.intellij.history.integration.ui.models.NullRevisionsProgress; //導入依賴的package包/類
public void testDiffContents() throws IOException {
initModelOnSecondLineAndSelectRevisions(0, 1);
DiffContent left = dm.getLeftDiffContent(new NullRevisionsProgress());
DiffContent right = dm.getRightDiffContent(new NullRevisionsProgress());
assertContent("b", left);
assertContent("bc", right);
}
示例4: testDiffForDeletedAndRecreatedFile
import com.intellij.history.integration.ui.models.NullRevisionsProgress; //導入依賴的package包/類
public void testDiffForDeletedAndRecreatedFile() throws Exception {
byte[] bytes = f.contentsToByteArray();
f.delete(this);
f = createFile(f.getName(), new String(bytes));
loadContent(f);
initModelOnSecondLineAndSelectRevisions(3, 3);
assertContent("b", dm.getLeftDiffContent(new NullRevisionsProgress()));
assertContent("bcd", dm.getRightDiffContent(new NullRevisionsProgress()));
}
示例5: testDiffContents
import com.intellij.history.integration.ui.models.NullRevisionsProgress; //導入依賴的package包/類
public void testDiffContents() throws IOException {
initModelOnSecondLineAndSelectRevisions(0, 1);
DiffContent left = dm.getLeftDiffContent(new NullRevisionsProgress());
DiffContent right = dm.getRightDiffContent(new NullRevisionsProgress());
assertEquals("b", new String(left.getBytes()));
assertEquals("bc", new String(right.getBytes()));
}
示例6: testDiffForDeletedAndRecreatedFile
import com.intellij.history.integration.ui.models.NullRevisionsProgress; //導入依賴的package包/類
public void testDiffForDeletedAndRecreatedFile() throws Exception {
byte[] bytes = f.contentsToByteArray();
f.delete(this);
f = createFile(f.getName(), new String(bytes));
initModelOnSecondLineAndSelectRevisions(3, 3);
assertEquals("b", new String(dm.getLeftDiffContent(new NullRevisionsProgress()).getBytes()));
assertEquals("bcd", new String(dm.getRightDiffContent(new NullRevisionsProgress()).getBytes()));
}
示例7: testDiffForDeletedAndRecreatedFile
import com.intellij.history.integration.ui.models.NullRevisionsProgress; //導入依賴的package包/類
public void testDiffForDeletedAndRecreatedFile() throws Exception {
byte[] bytes = f.contentsToByteArray();
f.delete(this);
f = createFile(f.getName(), new String(bytes));
initModelOnSecondLineAndSelectRevisions(3, 3);
assertContent("b", dm.getLeftDiffContent(new NullRevisionsProgress()));
assertContent("bcd", dm.getRightDiffContent(new NullRevisionsProgress()));
}
示例8: getLeftDiffContent
import com.intellij.history.integration.ui.models.NullRevisionsProgress; //導入依賴的package包/類
private DiffContent getLeftDiffContent(FileHistoryDialogModel m) {
RevisionProcessingProgress p = new NullRevisionsProgress();
return m.getDifferenceModel().getLeftDiffContent(p);
}
示例9: getRightDiffContent
import com.intellij.history.integration.ui.models.NullRevisionsProgress; //導入依賴的package包/類
private DiffContent getRightDiffContent(FileHistoryDialogModel m) {
RevisionProcessingProgress p = new NullRevisionsProgress();
return m.getDifferenceModel().getRightDiffContent(p);
}
示例10: testDiffContentsAndTitleForCurrentRevision
import com.intellij.history.integration.ui.models.NullRevisionsProgress; //導入依賴的package包/類
public void testDiffContentsAndTitleForCurrentRevision() throws IOException {
initModelOnSecondLineAndSelectRevisions(0, 0);
assertEquals("Current", dm.getRightTitle(new NullRevisionsProgress()));
DiffContent right = dm.getRightDiffContent(new NullRevisionsProgress());
assertContent("bcd", right);
assertTrue(right instanceof DocumentFragmentContent);
}
示例11: testDiffContentsAndTitleForCurrentRevision
import com.intellij.history.integration.ui.models.NullRevisionsProgress; //導入依賴的package包/類
public void testDiffContentsAndTitleForCurrentRevision() throws IOException {
initModelOnSecondLineAndSelectRevisions(0, 0);
assertEquals("Current", dm.getRightTitle(new NullRevisionsProgress()));
DiffContent right = dm.getRightDiffContent(new NullRevisionsProgress());
assertEquals("bcd", new String(right.getBytes()));
assertTrue(right instanceof FragmentContent);
}