Examples of ErrorDescription


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

                    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

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

                    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

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

    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

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

            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

Examples of org.python.pydev.parser.ErrorDescription

                }

                try {
                    if (info.addAstInfo(key, false) == null) {
                        String str = "Unable to generate ast -- using %s.\nError:%s";
                        ErrorDescription errorDesc = null;
                        throw new RuntimeException(com.aptana.shared_core.string.StringUtils.format(str, PyParser
                                .getGrammarVersionStr(grammarVersion),
                                (errorDesc != null && errorDesc.message != null) ? errorDesc.message
                                        : "unable to determine"));
                    }
View Full Code Here

Examples of org.python.pydev.parser.ErrorDescription

     * This event comes when parse ended in an error
     *
     * Generates an error marker on the document
     */
    public void parserError(Throwable error, IAdaptable original, IDocument doc) {
        ErrorDescription errDesc = null;

        try {
            errDesc = PyParser.createParserErrorMarkers(error, original, doc);

        } catch (CoreException e1) {
View Full Code Here

Examples of org.python.pydev.parser.ErrorDescription

                        StructuredSelection sel = (StructuredSelection) event.getSelection();

                        boolean alreadySelected = false;
                        if (sel.size() == 1) { // only sync the editing view if it is a single-selection
                            ParsedItem firstElement = (ParsedItem) sel.getFirstElement();
                            ErrorDescription errorDesc = firstElement.getErrorDesc();

                            //select the error
                            if (errorDesc != null && errorDesc.message != null) {
                                int len = errorDesc.errorEnd - errorDesc.errorStart;
                                editorView.setSelection(errorDesc.errorStart, len);
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.