本文整理匯總了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")));
}
示例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);
}
示例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());
}
}
示例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;
}
});
}
示例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));
}
示例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));
}
示例7: registerDelayedContentApply
import com.intellij.history.core.Content; //導入依賴的package包/類
private void registerDelayedContentApply(VirtualFile f, Content content, long timestamp) {
registerDelayedApply(new DelayedContentApply(f, content, timestamp));
}
示例8: DelayedContentApply
import com.intellij.history.core.Content; //導入依賴的package包/類
public DelayedContentApply(VirtualFile f, Content content, long timestamp) {
super(f);
myContent = content;
myTimestamp = timestamp;
}
示例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());
}
示例10: getContent
import com.intellij.history.core.Content; //導入依賴的package包/類
public Content getContent() {
throw new UnsupportedOperationException(formatPath());
}
示例11: setContent
import com.intellij.history.core.Content; //導入依賴的package包/類
public void setContent(Content newContent, long timestamp) {
throw new UnsupportedOperationException(formatPath());
}
示例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;
}
示例13: getContent
import com.intellij.history.core.Content; //導入依賴的package包/類
@Override
public Content getContent() {
return myContent;
}
示例14: setContent
import com.intellij.history.core.Content; //導入依賴的package包/類
@Override
public void setContent(Content newContent, long newTimestamp) {
myContent = newContent;
myTimestamp = newTimestamp;
}
示例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;
}