Examples of ErrorReporter


Examples of net.sf.lapg.parser.LapgLexer.ErrorReporter

  }


  public static LapgTree<AstRoot> parse(TextSource source) {
    final List<LapgProblem> list = new ArrayList<LapgProblem>();
    ErrorReporter reporter = new ErrorReporter() {
      public void error(int start, int end, int line, String s) {
        list.add(new LapgProblem(KIND_ERROR, start, end, s, null));
      }
    };
View Full Code Here

Examples of net.sf.lapg.templates.ast.AstLexer.ErrorReporter

    return t.invoke(new EvaluationContext(context != null ? context.getThisObject() : null, context, t), this, arguments);
  }

  public String eval(ILocatedEntity referer, String template, String templateId, EvaluationContext context) {
    final String inputName = templateId != null ? templateId : referer.getLocation();
    AstParser p = new AstParser(new ErrorReporter() {
      public void error(int start, int end, int line, String s) {
        DefaultEvaluationStrategy.this.fireError(null, inputName + ":" + s);
      }
    });
    IBundleEntity[] loaded = null;
View Full Code Here

Examples of net.sf.lapg.templates.ast.AstLexer.ErrorReporter

  }


  public static AstTree<Object> parseInput(TextSource source) {
    final List<AstProblem> list = new ArrayList<AstProblem>();
    ErrorReporter reporter = new ErrorReporter() {
      public void error(int start, int end, int line, String s) {
        list.add(new AstProblem(KIND_ERROR, start, end, s, null));
      }
    };
View Full Code Here

Examples of net.sf.lapg.templates.ast.AstLexer.ErrorReporter

    return new AstTree<Object>(source, null, list);
  }

  public static AstTree<TemplateNode> parseBody(TextSource source) {
    final List<AstProblem> list = new ArrayList<AstProblem>();
    ErrorReporter reporter = new ErrorReporter() {
      public void error(int start, int end, int line, String s) {
        list.add(new AstProblem(KIND_ERROR, start, end, s, null));
      }
    };
View Full Code Here

Examples of net.sf.lapg.templates.ast.AstLexer.ErrorReporter

    return entities;
  }

  public static TemplatesBundle parse(final String sourceName, String contents, String templatePackage,
      final IProblemCollector collector) {
    AstParser p = new AstParser(new ErrorReporter() {
      public void error(int start, int end, int line, String s) {
        collector.fireError(null, sourceName + ":" + s);
      }
    });
    IBundleEntity[] entities;
View Full Code Here

Examples of net.sf.lapg.templates.model.xml.XmlLexer.ErrorReporter

  }


  public static XmlTree<XmlNode> parse(TextSource source) {
    final List<XmlProblem> list = new ArrayList<XmlProblem>();
    ErrorReporter reporter = new ErrorReporter() {
      public void error(int start, int end, int line, String s) {
        list.add(new XmlProblem(KIND_ERROR, start, end, s, null));
      }
    };
View Full Code Here

Examples of net.sourceforge.processdash.ui.lib.ErrorReporter

        for (Map.Entry<String, List<String>> e : mcfProjects.entrySet())
            showMcfWarning(resources, resKey, e.getKey(), e.getValue(),
                SHARE_MCF_URL);

        // if any other files are missing, display a more generic error.
        ErrorReporter errorReporter = new ErrorReporter(
                resources.getString("Broken_Data_Title"),
                resources.getStrings("Broken_Data_Header"),
                resources.getStrings("Broken_Data_Footer"));
        for (String dataPrefix : warnings.keySet())
            errorReporter.logError(dataPrefix);
        errorReporter.done();
    }
View Full Code Here

Examples of net.sourceforge.processdash.ui.lib.ErrorReporter

     */
    private static ErrorReporter errorReporter = null;
    public synchronized static void logTemplateError(String error) {
        if (errorReporter == null) {
            Resources r = Resources.getDashBundle("Templates");
            errorReporter = new ErrorReporter
                (r.getString("Error_Title"),
                 r.getStrings("Error_Header"),
                 r.getStrings("Error_Footer"));
        }
        errorReporter.logError(error);
View Full Code Here

Examples of net.sourceforge.processdash.ui.lib.ErrorReporter

    protected void displayErrorDialog(Map errors) {
        if (errors == null || errors.size() == 0) return;
        String[] footer = EVMetrics.isWarningOnly(errors) ? null : resources
                .getStrings("Error_Dialog.Foot");
        ErrorReporter err = new ErrorReporter
            (resources.getString("Error_Dialog.Title"),
             resources.getStrings("Error_Dialog.Head"),
             footer);
        Iterator i = errors.keySet().iterator();
        while (i.hasNext()) {
            err.logError(StringUtils.findAndReplace((String) i.next(), //
                "\n#", "\n#http://ignored/"));
        }
        err.setHyperlinkListener(new HyperlinkListener() {
            public void hyperlinkUpdate(HyperlinkEvent e) {
                if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
                    String url = e.getURL().getFile();
                    int pos = url.lastIndexOf('/');
                    String helpSet = url.substring(0, pos);
                    String topic = url.substring(pos + 1);
                    String helpUri = helpSet + "/frame.html?" + topic;
                    Browser.launch(helpUri);
                }
            }
        });
        err.done();
    }
View Full Code Here

Examples of org.apache.tapestry5.test.ErrorReporter

        String baseURL = String.format("http://localhost:%d%s/", port, contextPath);

        CommandProcessor cp = new HttpCommandProcessor("localhost",
                RemoteControlConfiguration.DEFAULT_PORT, browserStartCommand, baseURL);

        ErrorReporter errorReporter = new ErrorReporterImpl(cp, testContext);

        selenium = new DefaultSelenium(new ErrorReportingCommandProcessor(cp, errorReporter));

        selenium.start();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.