public void saveRightContent(Object element, byte[] bytes) { if (element instanceof ICompareInput) { ICompareInput node= (ICompareInput) element; if (bytes != null) { ITypedElement right= node.getRight(); // #9869: problem if right is null (because no resource exists yet) nothing is done! if (right == null) { node.copy(true); right= node.getRight(); } if (right instanceof IEditableContent) ((IEditableContent)right).setContent(bytes); if (node instanceof ResourceCompareInput.MyDiffNode) ((ResourceCompareInput.MyDiffNode)node).fireChange(); } else { node.copy(true); } } } }
public void saveLeftContent(Object element, byte[] bytes) { if (element instanceof ICompareInput) { ICompareInput node= (ICompareInput) element; if (bytes != null) { ITypedElement left= node.getLeft(); // #9869: problem if left is null (because no resource exists yet) nothing is done! if (left == null) { node.copy(false); left= node.getLeft(); } if (left instanceof IEditableContent) ((IEditableContent)left).setContent(bytes); if (node instanceof ResourceCompareInput.MyDiffNode) ((ResourceCompareInput.MyDiffNode)node).fireChange(); } else { node.copy(false); } } }
@Override public void saveLeftContent(Object element, byte[] bytes) { if (element instanceof ICompareInput) { ICompareInput node= (ICompareInput) element; if (bytes != null) { ITypedElement left= node.getLeft(); // #9869: problem if left is null (because no resource exists yet) nothing is done! if (left == null) { node.copy(false); left= node.getLeft(); } if (left instanceof IEditableContent) ((IEditableContent)left).setContent(bytes); if (node instanceof ResourceCompareInput.MyDiffNode) ((ResourceCompareInput.MyDiffNode)node).fireChange(); } else { node.copy(false); } } }
@Override public void saveRightContent(Object element, byte[] bytes) { if (element instanceof ICompareInput) { ICompareInput node= (ICompareInput) element; if (bytes != null) { ITypedElement right= node.getRight(); // #9869: problem if right is null (because no resource exists yet) nothing is done! if (right == null) { node.copy(true); right= node.getRight(); } if (right instanceof IEditableContent) ((IEditableContent)right).setContent(bytes); if (node instanceof ResourceCompareInput.MyDiffNode) ((ResourceCompareInput.MyDiffNode)node).fireChange(); } else { node.copy(true); } } } }
bytes= contents.getBytes(); bca.setContent(bytes);
bytes= contents.getBytes(); bca.setContent(bytes);
byte[] bytes= Utilities.readBytes(is); if (bytes != null) dst.setContent(bytes); } catch (CoreException ex) {
byte[] bytes= Utilities.readBytes(is); if (bytes != null) dst.setContent(bytes); } catch (CoreException ex) {