public void add(String line, OutputListener listener) { result.add(ConvertedLine.forText(line, listener)); } @Override
public Results(String line, OutputListener listener){ result.add(ConvertedLine.forText(line, listener)); } public void add(String line, OutputListener listener) {
@Override public List<ConvertedLine> converted() { List<ConvertedLine> lines = new ArrayList<>(); lines.add(ConvertedLine.forText(line, new OutputListenerRfs(execEnv))); return lines; } };
@Override public List<ConvertedLine> converted() { List<ConvertedLine> lines = new ArrayList<>(); lines.add(ConvertedLine.forText(line, new OutputListenerBuildTrace(execEnv, project))); return lines; } };
public List<ConvertedLine> convert(String line) { if (line.indexOf("(See full trace by running task with --trace)") != -1) { // NOI18N return Collections.<ConvertedLine>singletonList( ConvertedLine.forText( NbBundle.getMessage(RakeRunner.class, "RakeSupport.RerunRakeWithTrace"), new OutputListener() { public void outputLineSelected(OutputEvent ev) { } public void outputLineAction(OutputEvent ev) { RubyProcessCreator rpc = new RubyProcessCreator(buildDescriptor(), charsetName); ExecutionService.newService(rpc, template.toExecutionDescriptor(), displayName).run(); } private RubyExecutionDescriptor buildDescriptor() { // copy the old args from template String[] existing = template.getAdditionalArgs() != null ? template.getAdditionalArgs() : new String[0]; String[] args = new String[existing.length + 1]; for (int i = 0; i < existing.length; i++) { args[i] = existing[i]; } args[args.length - 1] = "--trace"; //NOI18N return new RubyExecutionDescriptor(template).additionalArgs(args); } public void outputLineCleared(OutputEvent ev) { } })); } return null; }
public List<ConvertedLine> convert(final String line) { // Don't try to match lines that are too long - the java.util.regex library // throws stack exceptions (101234) if (line.length() > 400) { return null; } Matcher matcher = linePattern.matcher(line); if(matcher.find()) { if(LOGGER.isLoggable(Level.FINEST)) { StringBuilder builder = new StringBuilder(line.length()); builder.append("[ "); for(int i = 1; i < matcher.groupCount(); i++) { String match = matcher.group(i); if(match != null) { if(builder.length() > 2) { builder.append(", "); } builder.append(match); } } builder.append(" ]"); LOGGER.log(Level.FINEST, "ShortCircuitConvertor matched {0}.", builder.toString()); } return Collections.<ConvertedLine>singletonList(ConvertedLine.forText(line, null)); } return null; } }
ConvertedLine.forText(line, new FindFileListener(file, lineno, locator)));