@Override public boolean run() { final List<SpecificationItem> items = importItems(); final List<LinkedSpecificationItem> linkedItems = linkItems(items); final Trace trace = traceItems(linkedItems); report(this.oft, trace); return trace.hasNoDefects(); }
private void report(final Oft oft, final Trace trace) { final Path outputPath = this.arguments.getOutputPath(); final ReportSettings reportSettings = convertCommandLineArgumentsToReportSettings(); if (null == outputPath) { oft.reportToStdOut(trace, reportSettings); } else { oft.reportToPath(trace, this.arguments.getOutputPath(), reportSettings); } }
void run() { Performable performable = null; final Optional<String> command = this.arguments.getCommand(); if (!command.isPresent()) { throw new IllegalStateException("Command missing trying to execute OFT mode."); } switch (command.get()) { case ConvertCommand.COMMAND_NAME: performable = new ConvertCommand(this.arguments); break; case TraceCommand.COMMAND_NAME: performable = new TraceCommand(this.arguments); break; default: throw new IllegalStateException( "Unknown command '" + command.get() + "' trying to execute OFT mode."); } if (performable.run()) { exit(ExitStatus.OK); } else { exit(ExitStatus.FAILURE); } }
private void report(final Oft oft, final Trace trace) { final Path outputPath = this.arguments.getOutputPath(); final ReportSettings reportSettings = convertCommandLineArgumentsToReportSettings(); if (null == outputPath) { oft.reportToStdOut(trace, reportSettings); } else { oft.reportToPath(trace, this.arguments.getOutputPath(), reportSettings); } }
void run() { Performable performable = null; final Optional<String> command = this.arguments.getCommand(); if (!command.isPresent()) { throw new IllegalStateException("Command missing trying to execute OFT mode."); } switch (command.get()) { case ConvertCommand.COMMAND_NAME: performable = new ConvertCommand(this.arguments); break; case TraceCommand.COMMAND_NAME: performable = new TraceCommand(this.arguments); break; default: throw new IllegalStateException( "Unknown command '" + command.get() + "' trying to execute OFT mode."); } if (performable.run()) { exit(ExitStatus.OK); } else { exit(ExitStatus.FAILURE); } }
@Override public boolean run() { final List<SpecificationItem> items = importItems(); final List<LinkedSpecificationItem> linkedItems = linkItems(items); final Trace trace = traceItems(linkedItems); report(this.oft, trace); return trace.hasNoDefects(); }