Examples of Violation


Examples of org.epic.perleditor.editors.util.SourceCritic.Violation

     * @see org.epic.perleditor.actions.PerlJobAction#createMarkerAttributes(org.epic.core.util.MarkerUtilities, java.lang.Object)
     */
    public Map createMarkerAttributes(MarkerUtilities factory, Object violation)
    {
        Map attributes = new HashMap();
        Violation v = (Violation) violation;

        /*
         * XXX: including the violation as part of the message is only temporary
         *
         * future enhancements should have the pbp info displayed as part of the marker annotation, or
View Full Code Here

Examples of org.sonar.api.rules.Violation

        if (!filter.accept(issue)) {
          return false;
        }
      }
      if (deprecatedFilters != null && !deprecatedFilters.isEmpty() && deprecatedViolations != null) {
        Violation v = violation != null ? violation : deprecatedViolations.toViolation(issue);
        return !deprecatedFilters.isIgnored(v);
      }
      return true;
    } else {
      return false;
View Full Code Here

Examples of org.sonar.wsclient.services.Violation

            @Override
            public void valueChanged(ListSelectionEvent e) {
                ListSelectionModel listSelectionModel = (ListSelectionModel) e.getSource();
                if (!listSelectionModel.isSelectionEmpty()) {
                    Integer selectionIndex = listSelectionModel.getMinSelectionIndex();
                    final Violation violation = violationTableModel.getViolation(violationsTable.convertRowIndexToModel(selectionIndex));

                    if (violation.getLine() != null) {
                        DataManager.getInstance().getDataContextFromFocus().doWhenDone(new AsyncResult.Handler<DataContext>() {
                            @Override
                            public void run(DataContext dataContext) {
                                OpenFileDescriptor descriptor = new OpenFileDescriptor(project, violationTableModel.getCurrentVirtualFile(), violation.getLine() - 1, 0);
                                descriptor.navigate(false);
                            }
                        });
                    }
                }
View Full Code Here

Examples of org.sonar.wsclient.services.Violation

        return 5;
    }

    @Override
    public Object getValueAt(int rowIndex, int columnIndex) {
        Violation violation = violations.get(rowIndex);
        switch (columnIndex) {
            case 0:
                return violation.getSeverity();
            case 1:
                return violation.getRuleName();
            case 2:
                return violation.getLine();
            case 3:
                if (this.source == null || violation.getLine() == null) {
                    return "UNKNOWN";
                } else {
                    int lineNumber = violation.getLine();
                    return this.source.getLine(lineNumber);
                }
            case 4:
                return violation.getMessage();
            default:
                return "";
        }
    }
View Full Code Here

Examples of org.sonar.wsclient.services.Violation

        List<Violation> violations = new ArrayList<Violation>();
        model.setViolations(file, violations);

        Assert.assertEquals(0, model.getRowCount());

        violations.add(new Violation());
        Assert.assertEquals(1, model.getRowCount());

        violations.add(new Violation());
        Assert.assertEquals(2, model.getRowCount());
    }
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.