當前位置: 首頁>>代碼示例>>Java>>正文


Java Content類代碼示例

本文整理匯總了Java中com.intellij.history.core.Content的典型用法代碼示例。如果您正苦於以下問題:Java Content類的具體用法?Java Content怎麽用?Java Content使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


Content類屬於com.intellij.history.core包,在下文中一共展示了Content類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: testDeleteDirectoryWithFilesChange

import com.intellij.history.core.Content; //導入依賴的package包/類
@Test
public void testDeleteDirectoryWithFilesChange() {
  createDirectory(root, "dir");
  createDirectory(root, "dir/subDir");
  createFile(root, "dir/file", "one");
  createFile(root, "dir/subDir/file1", "two");
  createFile(root, "dir/subDir/file2", "three");

  Change c = delete(root, "dir");

  List<Content> cc = c.getContentsToPurge();

  assertEquals(3, cc.size());
  assertTrue(cc.contains(c("one")));
  assertTrue(cc.contains(c("two")));
  assertTrue(cc.contains(c("three")));
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:18,代碼來源:StructuralChangesPurgingTest.java

示例2: getRevisionContent

import com.intellij.history.core.Content; //導入依賴的package包/類
@Nullable
private String getRevisionContent(Revision r) {
  Entry e = r.findEntry();
  if (e == null) return null;
  Content c = e.getContent();
  if (!c.isAvailable()) throw new ContentIsUnavailableException();
  return c.getString(e, myGateway);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:9,代碼來源:SelectionCalculator.java

示例3: collectContentsRecursively

import com.intellij.history.core.Content; //導入依賴的package包/類
private void collectContentsRecursively(Entry e, List<Content> result) {
  if (e.isDirectory()) {
    for (Entry child : e.getChildren()) {
      collectContentsRecursively(child, result);
    }
  }
  else {
    result.add(e.getContent());
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:11,代碼來源:DeleteChange.java

示例4: getContentsToPurge

import com.intellij.history.core.Content; //導入依賴的package包/類
public List<Content> getContentsToPurge() {
  return accessChanges(new Producer<List<Content>>() {
    @Override
    public List<Content> produce() {
      List<Content> result = new ArrayList<Content>();
      for (Change c : myChanges) {
        result.addAll(c.getContentsToPurge());
      }
      return result;
    }
  });
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:13,代碼來源:ChangeSet.java

示例5: testChangeFileContentChange

import com.intellij.history.core.Content; //導入依賴的package包/類
@Test
public void testChangeFileContentChange() {
  createFile(root, "f", "old");

  Change c = changeContent(root, "f", "new");

  List<Content> cc = c.getContentsToPurge();

  assertEquals(1, cc.size());
  assertContent("old", cc.get(0));
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:12,代碼來源:StructuralChangesPurgingTest.java

示例6: testDeleteFileChange

import com.intellij.history.core.Content; //導入依賴的package包/類
@Test
public void testDeleteFileChange() {
  createFile(root, "f", "content");

  Change c = delete(root, "f");

  List<Content> cc = c.getContentsToPurge();

  assertEquals(1, cc.size());
  assertContent("content", cc.get(0));
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:12,代碼來源:StructuralChangesPurgingTest.java

示例7: registerDelayedContentApply

import com.intellij.history.core.Content; //導入依賴的package包/類
private void registerDelayedContentApply(VirtualFile f, Content content, long timestamp) {
  registerDelayedApply(new DelayedContentApply(f, content, timestamp));
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:4,代碼來源:UndoChangeRevertingVisitor.java

示例8: DelayedContentApply

import com.intellij.history.core.Content; //導入依賴的package包/類
public DelayedContentApply(VirtualFile f, Content content, long timestamp) {
  super(f);
  myContent = content;
  myTimestamp = timestamp;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:6,代碼來源:UndoChangeRevertingVisitor.java

示例9: setContent

import com.intellij.history.core.Content; //導入依賴的package包/類
private void setContent(Entry l, VirtualFile file) throws IOException {
  Content c = l.getContent();
  if (!c.isAvailable()) return;
  file.setBinaryContent(c.getBytes(), -1, l.getTimestamp());
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:6,代碼來源:DifferenceReverter.java

示例10: getContent

import com.intellij.history.core.Content; //導入依賴的package包/類
public Content getContent() {
  throw new UnsupportedOperationException(formatPath());
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:4,代碼來源:Entry.java

示例11: setContent

import com.intellij.history.core.Content; //導入依賴的package包/類
public void setContent(Content newContent, long timestamp) {
  throw new UnsupportedOperationException(formatPath());
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:4,代碼來源:Entry.java

示例12: FileEntry

import com.intellij.history.core.Content; //導入依賴的package包/類
public FileEntry(String name, Content content, long timestamp, boolean isReadOnly) {
  super(name);
  myTimestamp = timestamp;
  this.isReadOnly = isReadOnly;
  myContent = content;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:7,代碼來源:FileEntry.java

示例13: getContent

import com.intellij.history.core.Content; //導入依賴的package包/類
@Override
public Content getContent() {
  return myContent;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:5,代碼來源:FileEntry.java

示例14: setContent

import com.intellij.history.core.Content; //導入依賴的package包/類
@Override
public void setContent(Content newContent, long newTimestamp) {
  myContent = newContent;
  myTimestamp = newTimestamp;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:6,代碼來源:FileEntry.java

示例15: getContentsToPurge

import com.intellij.history.core.Content; //導入依賴的package包/類
@Override
public List<Content> getContentsToPurge() {
  List<Content> result = new ArrayList<Content>();
  collectContentsRecursively(myDeletedEntry, result);
  return result;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:7,代碼來源:DeleteChange.java


注:本文中的com.intellij.history.core.Content類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。