Package com.jetbrains.au.jslintplugin.js.error

Examples of com.jetbrains.au.jslintplugin.js.error.ErrorBeanWrapper


        final JsLintValidatorComponent validator = application.getComponent(JsLintValidatorComponent.class);
        try {
            final Object[] errorBeans = runner.validateScriptString(text, validator.getJsLintOptions());
            int currentLine = 1;
            int currentOffset = 0;
            ErrorBeanWrapper errorBean = new ErrorBeanWrapper();
            for (final Object error : errorBeans) {
                if(error != null){
                    errorBean.setError((NativeObject) error);
                    if (errorBean.getLine() != 0) {
                        final int line = errorBean.getLine();
                        while (currentLine < line) {
                            currentOffset = text.indexOf("\n", currentOffset) + 1;
                            currentLine++;
                        }
                        final ErrorProcessor processor = errorBean.getProcessor();
                        final Annotation annotation = annotationHolder.createWarningAnnotation(
                                processor.getSelectionRange(text, currentOffset, errorBean),
                                processor.getMessage(errorBean));

                        for (IntentionAction intentionAction : processor.getFixes(errorBean)) {
View Full Code Here


                        Document doc = editor.getDocument();
                        JSLintRunner runner = JSLintRunnerManager.getInstance().getRunner();
                        Object[] errorBeans = runner.validateScriptString(doc.getText(),
                                validator.getJsLintOptions());
                        final DefaultTableModel model = (DefaultTableModel) errorList.getModel();
                        ErrorBeanWrapper errorBeanWrapper = new ErrorBeanWrapper();
                        if (errorBeans.length > 0) {
                            totalNumberOfErrors.setText(String.format("Total Number Of Errors:%d", errorBeans.length));
                            int counter = 1;
                            for (Object errorBean : errorBeans) {
                                errorBeanWrapper.setError((NativeObject) errorBean);
                                model.addRow(errorBeanWrapper.getErrorTableView(counter++));
                            }
                        } else {
                            model.addRow(new String[]{"Errors not found", "", ""});
                        }
                    }
View Full Code Here

TOP

Related Classes of com.jetbrains.au.jslintplugin.js.error.ErrorBeanWrapper

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.