本文整理汇总了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);
}