当前位置: 首页>>代码示例>>Java>>正文


Java NullRevisionsProgress类代码示例

本文整理汇总了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()));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:21,代码来源:FileHistoryDialogTest.java

示例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"));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:SelectionHistoryDialogTest.java

示例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);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:SelectionHistoryDialogTest.java

示例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()));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:SelectionHistoryDialogTest.java

示例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()));
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:10,代码来源:SelectionHistoryDialogTest.java

示例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()));
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:12,代码来源:SelectionHistoryDialogTest.java

示例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()));
}
 
开发者ID:consulo,项目名称:consulo,代码行数:12,代码来源:SelectionHistoryDialogTest.java

示例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);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:FileHistoryDialogTest.java

示例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);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:FileHistoryDialogTest.java

示例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);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:SelectionHistoryDialogTest.java

示例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);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:11,代码来源:SelectionHistoryDialogTest.java


注:本文中的com.intellij.history.integration.ui.models.NullRevisionsProgress类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。