public static Ansi newAnsi(boolean ansiSupported, StringBuilder sb) { Ansi ansi = new Ansi(sb); ansiSupported &= null != SYSTEM_CONSOLE; if (ansiSupported) { return ansi; } AnsiDecorator ansiDecorator = new AnsiDecorator(sb); return ansiDecorator; }
public static Ansi newAnsi(boolean ansiSupported) { StringBuilder sb = new StringBuilder(); return newAnsi(ansiSupported, sb); }
public static Ansi newAnsi(boolean ansiSupported) { StringBuilder sb = new StringBuilder(); return newAnsi(ansiSupported, sb); }
public static Ansi newAnsi(boolean ansiSupported, StringBuilder sb) { Ansi ansi = new Ansi(sb); ansiSupported &= null != SYSTEM_CONSOLE; if (ansiSupported) { return ansi; } AnsiDecorator ansiDecorator = new AnsiDecorator(sb); return ansiDecorator; }
public static Ansi newAnsi(boolean ansiSupported) { StringBuilder sb = new StringBuilder(); return newAnsi(ansiSupported, sb); }
public static Ansi newAnsi(boolean ansiSupported, StringBuilder sb) { Ansi ansi = new Ansi(sb); ansiSupported &= null != SYSTEM_CONSOLE; if (ansiSupported) { return ansi; } AnsiDecorator ansiDecorator = new AnsiDecorator(sb); return ansiDecorator; }
protected Ansi newAnsi(Console console) { boolean useColor; switch (color) { case never: useColor = false; break; case always: useColor = true; break; default: useColor = console.isAnsiSupported(); } Ansi ansi = AnsiDecorator.newAnsi(useColor); return ansi; }
protected Ansi newAnsi(Console console) { boolean useColor; switch (color) { case never: useColor = false; break; case always: useColor = true; break; default: useColor = console.isAnsiSupported(); } Ansi ansi = AnsiDecorator.newAnsi(useColor); return ansi; }
protected Ansi newAnsi(Console console, StringBuilder target) { boolean useColor; switch (color) { case never: useColor = false; break; case always: useColor = true; break; default: useColor = console.isAnsiSupported(); } Ansi ansi = AnsiDecorator.newAnsi(useColor, target); return ansi; }
protected Ansi newAnsi(Console console) { boolean useColor; switch (color) { case never: useColor = false; break; case always: useColor = true; break; default: useColor = console.isAnsiSupported(); } Ansi ansi = AnsiDecorator.newAnsi(useColor); return ansi; }
protected Ansi newAnsi(Console console, StringBuilder target) { boolean useColor; switch (color) { case never: useColor = false; break; case always: useColor = true; break; default: useColor = console.isAnsiSupported(); } Ansi ansi = AnsiDecorator.newAnsi(useColor, target); return ansi; }
protected Ansi newAnsi(Console console, StringBuilder target) { boolean useColor; switch (color) { case never: useColor = false; break; case always: useColor = true; break; default: useColor = console.isAnsiSupported(); } Ansi ansi = AnsiDecorator.newAnsi(useColor, target); return ansi; }
Ansi ansi = AnsiDecorator.newAnsi(console.isAnsiSupported()); Set<Entry<PropertyDescriptor, AttributeDiff>> entries = diffs.entrySet(); Iterator<Entry<PropertyDescriptor, AttributeDiff>> iter = entries.iterator();
Ansi ansi = AnsiDecorator.newAnsi(console.isAnsiSupported()); Set<Entry<PropertyDescriptor, AttributeDiff>> entries = diffs.entrySet(); Iterator<Entry<PropertyDescriptor, AttributeDiff>> iter = entries.iterator();
Ansi ansi = AnsiDecorator.newAnsi(console.isAnsiSupported()); Set<Entry<PropertyDescriptor, AttributeDiff>> entries = diffs.entrySet(); Iterator<Entry<PropertyDescriptor, AttributeDiff>> iter = entries.iterator();
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()); }
@Override public void print(GeoGIG geogig, Console console, DiffEntry entry) throws IOException { Ansi ansi = AnsiDecorator.newAnsi(console.isAnsiSupported()); final NodeRef newObject = entry.getNewObject(); final NodeRef oldObject = entry.getOldObject(); String oldMode = shortOid(oldObject == null ? ObjectId.NULL : oldObject.getMetadataId()); String newMode = shortOid(newObject == null ? ObjectId.NULL : newObject.getMetadataId()); String oldId = shortOid(oldObject == null ? ObjectId.NULL : oldObject.getObjectId()); String newId = shortOid(newObject == null ? ObjectId.NULL : newObject.getObjectId()); ansi.a(oldMode).a(" "); ansi.a(newMode).a(" "); ansi.a(oldId).a(" "); ansi.a(newId).a(" "); ansi.fg(entry.changeType() == ADDED ? GREEN : (entry.changeType() == MODIFIED ? YELLOW : RED)); char type = entry.changeType().toString().charAt(0); ansi.a(" ").a(type).reset(); ansi.a(" ").a(formatPath(entry)); console.println(ansi.toString()); }
@Override public void print(GeoGIG geogig, Console console, DiffEntry entry) throws IOException { Ansi ansi = AnsiDecorator.newAnsi(console.isAnsiSupported()); final NodeRef newObject = entry.getNewObject(); final NodeRef oldObject = entry.getOldObject(); String oldMode = shortOid(oldObject == null ? ObjectId.NULL : oldObject.getMetadataId()); String newMode = shortOid(newObject == null ? ObjectId.NULL : newObject.getMetadataId()); String oldId = shortOid(oldObject == null ? ObjectId.NULL : oldObject.getObjectId()); String newId = shortOid(newObject == null ? ObjectId.NULL : newObject.getObjectId()); ansi.a(oldMode).a(" "); ansi.a(newMode).a(" "); ansi.a(oldId).a(" "); ansi.a(newId).a(" "); ansi.fg(entry.changeType() == ADDED ? GREEN : (entry.changeType() == MODIFIED ? YELLOW : RED)); char type = entry.changeType().toString().charAt(0); ansi.a(" ").a(type).reset(); ansi.a(" ").a(formatPath(entry)); console.println(ansi.toString()); }