當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。