DataContext toolContext = DataManager.getInstance().getDataContextFromFocus().getResult();
Project project = DataKeys.PROJECT.getData(toolContext);
Editor editor = FileEditorManager.getInstance(project).getSelectedTextEditor();
if (editor != null) {
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));