Exemplo n.º 1
0
 // FIXME - this is an inefficient lookup, and in the following method
 public boolean suppress(DiagnosticSource file, int pos, String label) {
   int line = file.getLineNumber(pos);
   for (Item i : nowarns) {
     if (i.label != null && !label.equals(i.label)) {
       // continue
     } else if (i.source == null) {
       return true; // FIXME - don't we check the line number? what use case is this?
     } else {
       if (file.equals(i.source) && line == i.line) return true;
     }
   }
   return false;
 }
Exemplo n.º 2
0
 /** Add a new occurrence of an annotation to the record. */
 public void addItem(DiagnosticSource file, int pos, String label) {
   nowarns.add(new Item(file, file.getLineNumber(pos), label));
 }