/** * Write DIFF to <var>output-file</var> instead of STDOUT. * * @main.commandLineOptionGroup Output-Generation */ @CommandLineOption public void setOut(File outputFile) { this.outputFile = outputFile; }
/** * @deprecated Use {@code --look-into} instead. */ @Deprecated @CommandLineOption(name = { "zip", "zz", "nested-zip", "gzip" }) public static void noLongerSupported() { System.err.println("Command line option is no longer supported - try \"--help\"."); System.exit(1); } }
/** * When disassembling .class files, include a constant pool dump, constant pool indexes, and hex dumps of all * attributes in the disassembly output. * * @main.commandLineOptionGroup Contents-Processing */ @CommandLineOption public void setDaVerbose() { this.diff.setDisassembleClassFilesVerbose(true); }
/** * Output "<a href="http://en.wikipedia.org/wiki/Diff_utility#Unified_format">unified diff format</a>" with three * lines of context. * * @main.commandLineOptionGroup Output-Generation */ @CommandLineOption(name = { "unified", "u" }, group = DiffModeOptionGroup.class) public void setUnified() { this.diff.setDiffMode(DiffMode.UNIFIED); }
/** * Don't regard C++-style comments ("<code>// ...</code>") as relevant for comparison. * * @main.commandLineOptionGroup Output-Generation */ @CommandLineOption(name = "ignore-c++-style-comments") public void setIgnoreCppStyleComments() { this.diff.setIgnoreCPlusPlusStyleComments(true); }
/** * Suppress all messages except errors. */ @CommandLineOption public void nowarn() { this.levelFilteredPrinter.setNoWarn(); }
/** * Files with different names map iff their names match the <var>path-regex</var> and all capturing groups are * equal. May be given more than once. * * @main.commandLineOptionGroup File-Selection */ @CommandLineOption(name = { "path-equivalence", "pe" }, cardinality = CommandLineOption.Cardinality.ANY) public void addPathEquivalence(Pattern pathRegex) { this.diff.addEquivalentPath(pathRegex); }
/** * Encoding of the files being compared (defaults to the JVM default charset, "${file.encoding}"). * * @main.commandLineOptionGroup Contents-Processing */ @CommandLineOption public void setEncoding(Charset charsetName) { this.diff.setCharset(charsetName); }
/** * Report errors and continue with next file. * * @main.commandLineOptionGroup Output-Generation */ @CommandLineOption public void setKeepGoing() { this.diff.setExceptionHandler(new ExceptionHandler<IOException>() { @Override public void handle(String path, IOException ioe) { Printers.error(path, ioe.getMessage()); } @Override public void handle(String path, RuntimeException re) { Printers.error(path, re.getMessage()); } }); }
/** * Scan directories strictly sequentially. The default is to parallelize the directory scan in multiple threads. * * @main.commandLineOptionGroup Output-Generation */ @CommandLineOption public void setSequential() { this.diff.setSequential(true); }
/** * Suppress "normal" output; print only errors and warnings. * * @main.commandLineOptionGroup Output-Generation */ @CommandLineOption public void setQuiet() { this.levelFilteredPrinter.setQuiet(); }
/** * By default directory members are sorted lexicographically in order to achieve deterministic results. */ @CommandLineOption public void dontSortDirectoryMembers() { this.pack.setDirectoryMemberNameComparator(null); }
/** * Add logging at level FINE on logger 'de.unkrig' to STDERR using the FormatFormatter and SIMPLE format, or the * given arguments which are all optional. * * @param spec <var>level</var>:<var>logger</var>:<var>handler</var>:<var>formatter</var>:<var>format</var> */ @CommandLineOption(cardinality = CommandLineOption.Cardinality.ANY) public static void addLog(String spec) { SimpleLogging.configureLoggers(spec); }
/** * The charset to use when writing the output file. */ @CommandLineOption public void setOutputEncoding(Charset charset) { this.html2Txt.setOutputCharset(charset); } }
/** * Disassemble .class files. * * @main.commandLineOptionGroup Contents-Processing */ @CommandLineOption(name = { "disassemble", "da" }) public void setDisassemble() { this.diff.setDisassembleClassFiles(true); }
/** * Output "<a href="http://en.wikipedia.org/wiki/Diff_utility#Context_format">context diff format</a>" with * <var>amount</var> lines of context. * * @main.commandLineOptionGroup Output-Generation */ @CommandLineOption(name = { "Context", "C" }, group = DiffModeOptionGroup.class) public void setContext2(int amount) { this.diff.setDiffMode(DiffMode.CONTEXT); this.diff.setContextSize(amount); }
/** * Output "<a href="http://en.wikipedia.org/wiki/Diff_utility#Unified_format">unified diff format</a>" with * <var>amount</var> lines of context. * * @main.commandLineOptionGroup Output-Generation */ @CommandLineOption(name = "Unified", group = DiffModeOptionGroup.class) public void setUnified2(int amount) { this.diff.setDiffMode(DiffMode.UNIFIED); this.diff.setContextSize(amount); }
/** * Process only matching files/entries, e.g."{@code dir/file.zip!dir/file}" or "<code>**/file</code>". * See also "Globs", below. * * @main.commandLineOptionGroup File-Selection */ @CommandLineOption public void setPath(@RegexFlags(Pattern2.WILDCARD | Glob.INCLUDES_EXCLUDES) Glob glob) { this.diff.setPathPredicate(glob); }
/** * Lines in files <var>path-pattern</var> that contain <var>line-regex</var> and all capturing groups are equal are * regarded as equal. * * @main.commandLineOptionGroup Contents-Processing */ @CommandLineOption(cardinality = CommandLineOption.Cardinality.ANY) public void addLineEquivalence( @RegexFlags(Pattern2.WILDCARD | Glob.INCLUDES_EXCLUDES) Glob pathPattern, Pattern lineRegex ) { this.diff.addEquivalentLine(new LineEquivalence(pathPattern, lineRegex)); }
/** * Ignore differences in files <var>path-pattern</var> where all lines (deleted, changed or added) match the given * <var>line-regex</var>. * * @main.commandLineOptionGroup Contents-Processing */ @CommandLineOption(name = { "ignore", "I" }, cardinality = CommandLineOption.Cardinality.ANY) public void addIgnore( @RegexFlags(Pattern2.WILDCARD | Glob.INCLUDES_EXCLUDES) Glob pathPattern, Pattern lineRegex ) { this.diff.addIgnore(new LineEquivalence(pathPattern, lineRegex)); }