本文整理汇总了Java中org.eclipse.compare.structuremergeviewer.DiffNode.getChildren方法的典型用法代码示例。如果您正苦于以下问题:Java DiffNode.getChildren方法的具体用法?Java DiffNode.getChildren怎么用?Java DiffNode.getChildren使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.compare.structuremergeviewer.DiffNode
的用法示例。
在下文中一共展示了DiffNode.getChildren方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: commit
import org.eclipse.compare.structuremergeviewer.DiffNode; //导入方法依赖的package包/类
private static void commit(IProgressMonitor pm, DiffNode node) throws CoreException {
ITypedElement left= node.getLeft();
if (left instanceof BufferedResourceNode)
((BufferedResourceNode) left).commit(pm);
ITypedElement right= node.getRight();
if (right instanceof BufferedResourceNode)
((BufferedResourceNode) right).commit(pm);
IDiffElement[] children= node.getChildren();
if (children != null) {
for (int i= 0; i < children.length; i++) {
IDiffElement element= children[i];
if (element instanceof DiffNode)
commit(pm, (DiffNode) element);
}
}
}
示例2: prepareInput
import org.eclipse.compare.structuremergeviewer.DiffNode; //导入方法依赖的package包/类
protected Object prepareInput(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
initLabels();
MultipleSelectionNode left = new MultipleSelectionNode(localResourceNodes);
MultipleSelectionNode right = new MultipleSelectionNode(remoteResourceNodes);
Object differences = new StatusAwareDifferencer().findDifferences(false, monitor,null,null,left,right);
if (differences instanceof DiffNode) {
DiffNode diffNode = (DiffNode)differences;
IDiffElement[] children = diffNode.getChildren();
for (IDiffElement child : children) {
if (child instanceof DiffNode) {
DiffNode childDiffNode = (DiffNode)child;
if (childDiffNode.getLeft() == null && childDiffNode.getRight() instanceof ResourceEditionNode) {
diffNode.remove(child);
}
}
}
if (!diffNode.hasChildren()) {
return null;
}
}
for (IResource unaddedResource : unaddedResources) {
try {
SVNWorkspaceRoot.getSVNResourceFor(unaddedResource).revert();
} catch (Exception e) {}
}
fRoot = differences;
return differences;
}