Java Code Examples for org.eclipse.compare.structuremergeviewer.DiffNode#getChildren()

The following examples show how to use org.eclipse.compare.structuremergeviewer.DiffNode#getChildren() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SVNLocalCompareInput.java    From APICloud-Studio with GNU General Public License v3.0 6 votes vote down vote up
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);
		}
	}
}
 
Example 2
Source File: SVNLocalBaseCompareInput.java    From APICloud-Studio with GNU General Public License v3.0 6 votes vote down vote up
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);
		}
	}
}
 
Example 3
Source File: SVNLocalCompareSummaryInput.java    From APICloud-Studio with GNU General Public License v3.0 6 votes vote down vote up
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);
		}
	}
}
 
Example 4
Source File: BonitaCompareEditorInput.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
private void getAllNodes(final List<DiffNode> nodes, final DiffNode root) {
    if (root.hasChildren()) {
        nodes.addAll((Collection<? extends DiffNode>) Arrays.asList(root.getChildren()));
        for (final IDiffElement child : root.getChildren()) {
            getAllNodes(nodes, (DiffNode) child);
        }
    }

}