@Override public boolean isNew(String name) { return hasProperty(name) && !getBaseState().hasProperty(name); }
@Override public boolean isNew(String name) { return hasProperty(name) && !getBaseState().hasProperty(name); }
@Override public boolean isNew() { return exists() && !getBaseState().exists(); }
@Override public boolean isNew() { return exists() && !getBaseState().exists(); }
private static String getSourcePathAnnotation(MemoryNodeBuilder builder) { PropertyState base = builder.getBaseState().getProperty(MoveDetector.SOURCE_PATH); PropertyState head = builder.getNodeState().getProperty(MoveDetector.SOURCE_PATH); if (Objects.equal(base, head)) { // Both null: no source path annotation // Both non null but equals: source path annotation is from a previous commit return null; } else { return head.getValue(Type.STRING); } }
private static String getSourcePathAnnotation(MemoryNodeBuilder builder) { PropertyState base = builder.getBaseState().getProperty(MoveDetector.SOURCE_PATH); PropertyState head = builder.getNodeState().getProperty(MoveDetector.SOURCE_PATH); if (Objects.equal(base, head)) { // Both null: no source path annotation // Both non null but equals: source path annotation is from a previous commit return null; } else { return head.getValue(Type.STRING); } }
private boolean isTransientlyAdded(String path) { NodeState node = rootBuilder.getBaseState(); for (String name : PathUtils.elements(path)) { node = node.getChildNode(name); } return !node.exists(); }
private boolean isTransientlyAdded(String path) { NodeState node = rootBuilder.getBaseState(); for (String name : PathUtils.elements(path)) { node = node.getChildNode(name); } return !node.exists(); }
@Override @NotNull public NodeState getBaseState() { if (base == null || rootBase != root.getBaseState()) { base = getParent().getBaseState().getChildNode(getName()); rootBase = root.getBaseState(); } return base; }
@Override @NotNull public NodeState getBaseState() { if (base == null || rootBase != root.getBaseState()) { base = getParent().getBaseState().getChildNode(getName()); rootBase = root.getBaseState(); } return base; }