/** * Prints the {@code line} text to the console and starts a new line, flushing * the cursor buffer. * * @param line the text to write * @throws IOException */ public synchronized void println(CharSequence line) throws IOException { print(line); cursorBuffer.append("\n"); flush(); }
/** * Prints the {@code line} text to the console and starts a new line, flushing the cursor * buffer. * * @param line the text to write * @throws IOException */ public synchronized void println(CharSequence line) throws IOException { print(line); cursorBuffer.append("\n"); flush(); }
console.print(desc); console.flush(); console.print(" inserting..."); console.flush(); console.print(String.format(" Applied %,d changes, staging...", changeCount)); console.flush(); ObjectId afterTreeId = workingTree.getTree().getId(); console.print(String.format(" %,d actual changes.", diffCount.featureCount())); console.flush();
/** * Prints the {@code line} text to the console and starts a new line, flushing the cursor * buffer. * * @param line the text to write * @throws IOException */ public synchronized void println(CharSequence line) throws IOException { print(line); cursorBuffer.append("\n"); flush(); }
@Override public void runInternal(GeogigCLI cli) throws IOException { checkParameter(commits.size() == 2, "Two commit references must be provided"); Console console = cli.getConsole(); GeoGIG geogig = cli.getGeogig(); Optional<RevObject> left = geogig.command(RevObjectParse.class).setRefSpec(commits.get(0)) .call(); checkParameter(left.isPresent(), commits.get(0) + " does not resolve to any object."); checkParameter(left.get() instanceof RevCommit, commits.get(0) + " does not resolve to a commit"); Optional<RevObject> right = geogig.command(RevObjectParse.class).setRefSpec(commits.get(1)) .call(); checkParameter(right.isPresent(), commits.get(1) + " does not resolve to any object."); checkParameter(right.get() instanceof RevCommit, commits.get(1) + " does not resolve to a commit"); Optional<ObjectId> ancestor = geogig.command(FindCommonAncestor.class) .setLeft((RevCommit) left.get()).setRight((RevCommit) right.get()).call(); checkParameter(ancestor.isPresent(), "No common ancestor was found."); console.print(ancestor.get().toString()); }
@Override public void runInternal(GeogigCLI cli) throws IOException { checkParameter(commits.size() == 2, "Two commit references must be provided"); Console console = cli.getConsole(); GeoGIG geogig = cli.getGeogig(); Optional<RevObject> left = geogig.command(RevObjectParse.class).setRefSpec(commits.get(0)) .call(); checkParameter(left.isPresent(), commits.get(0) + " does not resolve to any object."); checkParameter(left.get() instanceof RevCommit, commits.get(0) + " does not resolve to a commit"); Optional<RevObject> right = geogig.command(RevObjectParse.class).setRefSpec(commits.get(1)) .call(); checkParameter(right.isPresent(), commits.get(1) + " does not resolve to any object."); checkParameter(right.get() instanceof RevCommit, commits.get(1) + " does not resolve to a commit"); Optional<ObjectId> ancestor = geogig.command(FindCommonAncestor.class) .setLeft((RevCommit) left.get()).setRight((RevCommit) right.get()).call(); checkParameter(ancestor.isPresent(), "No common ancestor was found."); console.print(ancestor.get().toString()); }
@Override public void runInternal(GeogigCLI cli) throws IOException { checkParameter(commits.size() == 2, "Two commit references must be provided"); Console console = cli.getConsole(); GeoGIG geogig = cli.getGeogig(); Optional<RevObject> left = geogig.command(RevObjectParse.class).setRefSpec(commits.get(0)) .call(); checkParameter(left.isPresent(), commits.get(0) + " does not resolve to any object."); checkParameter(left.get() instanceof RevCommit, commits.get(0) + " does not resolve to a commit"); Optional<RevObject> right = geogig.command(RevObjectParse.class).setRefSpec(commits.get(1)) .call(); checkParameter(right.isPresent(), commits.get(1) + " does not resolve to any object."); checkParameter(right.get() instanceof RevCommit, commits.get(1) + " does not resolve to a commit"); Optional<ObjectId> ancestor = geogig.command(FindCommonAncestor.class) .setLeft((RevCommit) left.get()).setRight((RevCommit) right.get()).call(); checkParameter(ancestor.isPresent(), "No common ancestor was found."); console.print(ancestor.get().toString()); }
console.print(Long.toString(count) + " features successfully inserted.");
console.print(Long.toString(count) + " features successfully inserted.");
public static void print(GeoGIG geogig, Console console, DiffSummary<BoundingBox, BoundingBox> diffBounds) throws IOException { BoundingBox left = diffBounds.getLeft(); BoundingBox right = diffBounds.getRight(); Optional<BoundingBox> mergedResult = diffBounds.getMergedResult(); BoundingBox both = new ReferencedEnvelope(); if (mergedResult.isPresent()) { both = mergedResult.get(); } Ansi ansi = AnsiDecorator.newAnsi(console.isAnsiSupported()); ansi.a("left: ").a(bounds(left)).newline(); ansi.a("right: ").a(bounds(right)).newline(); ansi.a("both: ").a(bounds(both)).newline(); ansi.a("CRS: ").a(CRS.toSRS(left.getCoordinateReferenceSystem())).newline(); console.print(ansi.toString()); }
public static void print(GeoGIG geogig, Console console, DiffSummary<BoundingBox, BoundingBox> diffBounds) throws IOException { BoundingBox left = diffBounds.getLeft(); BoundingBox right = diffBounds.getRight(); Optional<BoundingBox> mergedResult = diffBounds.getMergedResult(); BoundingBox both = new ReferencedEnvelope(); if (mergedResult.isPresent()) { both = mergedResult.get(); } Ansi ansi = AnsiDecorator.newAnsi(console.isAnsiSupported()); ansi.a("left: ").a(bounds(left)).newline(); ansi.a("right: ").a(bounds(right)).newline(); ansi.a("both: ").a(bounds(both)).newline(); ansi.a("CRS: ").a(CRS.toSRS(left.getCoordinateReferenceSystem())).newline(); console.print(ansi.toString()); }
public static void print(GeoGIG geogig, Console console, DiffSummary<BoundingBox, BoundingBox> diffBounds) throws IOException { BoundingBox left = diffBounds.getLeft(); BoundingBox right = diffBounds.getRight(); Optional<BoundingBox> mergedResult = diffBounds.getMergedResult(); BoundingBox both = new ReferencedEnvelope(); if (mergedResult.isPresent()) { both = mergedResult.get(); } Ansi ansi = AnsiDecorator.newAnsi(console.isAnsiSupported()); ansi.a("left: ").a(bounds(left)).newline(); ansi.a("right: ").a(bounds(right)).newline(); ansi.a("both: ").a(bounds(both)).newline(); ansi.a("CRS: ").a(CRS.toSRS(left.getCoordinateReferenceSystem())).newline(); console.print(ansi.toString()); }