private void reavalia(String codigo) { tabelaDeErros.initComponents(); // boxCode.coloreSource(); controle = new ControleLinkRedundante(); // xhtmlValidator.avalia(arquivo.getFile()); controle.avalia(codigo); if (controle.length() == 0) { tabelaDeErros.addLinha(0, 0, XHTML_Panel.DOC_SEM_ERROS); } for (int i = 0; i < controle.length(); i++) { tabelaDeErros.addLinha(controle.getLinha(i), controle.getColuna(i), controle.getTag(i)); // boxCode.marcaErro(ini, fim); textAreaSourceCode.marcaErro( controle.getLinha(i), controle.getColuna(i), controle.getTag(i).length()); } btnAplicar.setEnabled(false); // domValidator }
public void mouseClicked(MouseEvent e) { if (e.getClickCount() >= 2) { int row = this.tabelaDeErros.getSelectedRow(); if (row == -1) return; int linhaToGo = Integer.parseInt(tabelaDeErros.getValueAt(row, 0).toString()); if (linhaToGo == 0) return; textAreaSourceCode.goToLine(linhaToGo); textAreaSourceCode.selectLine(linhaToGo); erroAtual = row; btnAplicar.setEnabled(true); RegrasHardCodedEmag regra = new RegrasHardCodedEmag(); texto.setText(regra.getAtributo(controle.getTag(erroAtual), "alt")); } }