本文整理汇总了Java中com.intellij.history.core.changes.ChangeVisitor类的典型用法代码示例。如果您正苦于以下问题:Java ChangeVisitor类的具体用法?Java ChangeVisitor怎么用?Java ChangeVisitor使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ChangeVisitor类属于com.intellij.history.core.changes包,在下文中一共展示了ChangeVisitor类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testStop
import com.intellij.history.core.changes.ChangeVisitor; //导入依赖的package包/类
@Test
public void testStop() throws Exception {
createFile("f.txt");
createFile("dir");
TestVisitor visitor = new TestVisitor() {
int count = 0;
@Override
public void begin(ChangeSet c) throws ChangeVisitor.StopVisitingException {
if (++count == 2) stop();
super.begin(c);
}
};
assertVisitorLog("begin create end finished ", visitor);
}
示例2: getFilesToClearROStatus
import com.intellij.history.core.changes.ChangeVisitor; //导入依赖的package包/类
protected List<VirtualFile> getFilesToClearROStatus() throws IOException {
final Set<VirtualFile> files = new HashSet<VirtualFile>();
myVcs.accept(selective(new ChangeVisitor() {
@Override
public void visit(StructuralChange c) throws StopVisitingException {
files.addAll(myGateway.getAllFilesFrom(c.getPath()));
}
}));
return new ArrayList<VirtualFile>(files);
}
示例3: accept
import com.intellij.history.core.changes.ChangeVisitor; //导入依赖的package包/类
public void accept(ChangeVisitor v) {
try {
for (ChangeSet change : iterChanges()) {
change.accept(v);
}
}
catch (ChangeVisitor.StopVisitingException e) {
}
v.finished();
}
示例4: collectChanges
import com.intellij.history.core.changes.ChangeVisitor; //导入依赖的package包/类
@Override
protected Pair<String, List<ChangeSet>> collectChanges() {
final List<ChangeSet> result = new ArrayList<ChangeSet>();
myVcs.accept(new ChangeVisitor() {
@Override
public void begin(ChangeSet c) throws StopVisitingException {
if (c.affectsPath(myPath)) result.add(c);
}
});
return Pair.create(myPath, result);
}
示例5: selective
import com.intellij.history.core.changes.ChangeVisitor; //导入依赖的package包/类
protected ChangeVisitor selective(ChangeVisitor v) {
return v;
}