Package org.netbeans.spi.editor.hints

Examples of org.netbeans.spi.editor.hints.ErrorDescription


                    continue;
                }
                //int charPositionInLine = syntaxError.charPositionInLine;
                //int start = NbDocument.findLineOffset((StyledDocument) document, line - 1) + charPositionInLine;
                //int end = start + 1;
                ErrorDescription errorDescription = ErrorDescriptionFactory.createErrorDescription(
                        Severity.ERROR,
                        syntaxError.message.replaceAll("COMMA", "','").replaceAll("SEPARATOR", "';'").replaceAll("PARAM_VALUE", "'=>'"),
                        document,
                        document.createPosition(syntaxError.start),
                        document.createPosition(syntaxError.end));
View Full Code Here


                    token = pex.currentToken;
                    syntaxError = pex;
                }
                int start = token == null ? 0 : NbDocument.findLineOffset((StyledDocument) document, token.beginLine - 1) + token.beginColumn - 1;
                int end = token == null ? 0 : NbDocument.findLineOffset((StyledDocument) document, token.endLine - 1) + token.endColumn;
                ErrorDescription errorDescription = ErrorDescriptionFactory.createErrorDescription(
                        isHint ? Severity.HINT : Severity.ERROR,
                        msg == null ? "" : msg,
                        document,
                        document.createPosition(start),
                        document.createPosition(end));
View Full Code Here

                    return ch;
                }
            };
            Vector ret = new Vector();
            ret.add(fix);
            ErrorDescription errorDescription = ErrorDescriptionFactory.createErrorDescription(
                    Severity.HINT,
                    "Version out of date", ret,
                    document,
                    document.createPosition(0),
                    document.createPosition(1));
View Full Code Here

    instances.remove(doc);
  }

  public void addHint(String desc, final int start, final int end) {
    desc = getDescription(desc);
    ErrorDescription ed = ErrorDescriptionFactory.createErrorDescription(Severity.HINT, desc,
        doc, createPosition(start), createPosition(end));
    if(!hashCodes.contains(ed.hashCode())) {
      errors.add(ed);
      hashCodes.add(ed.hashCode());
    }
  }
View Full Code Here

            Iterator<CompilerError> errors =
                    vm.getCompilerErrors().iterator(file.getAbsolutePath());
            Document document = result.getSnapshot().getSource().getDocument(false);
            List<ErrorDescription> nbErrors = new ArrayList<ErrorDescription>();
            while(errors.hasNext()) {
                ErrorDescription errorDescription;
                CompilerError error = errors.next();
                errorDescription = ErrorDescriptionFactory.createErrorDescription(
                        Severity.ERROR, error.getError(),
                        document,
                        error.getLineNumber());
View Full Code Here

TOP

Related Classes of org.netbeans.spi.editor.hints.ErrorDescription

Copyright © 2018 www.massapicom. 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.