Package com.mountainminds.eclemma.core.analysis

Examples of com.mountainminds.eclemma.core.analysis.ICounter


    return Double.compare(getRatio(), counter.getRatio());
  }

  public boolean equals(Object obj) {
    if (obj instanceof ICounter) {
      ICounter counter = (ICounter) obj;
      return getTotalCount() == counter.getTotalCount()
          && getCoveredCount() == counter.getCoveredCount();
    } else {
      return false;
    }
  }
View Full Code Here


          IJavaElementCoverage c = CoverageTools.getCoverageInfo(element);
          if (c == null || c.getInstructionCounter().getTotalCount() == 0) {
            return false;
          }
          if (settings.getHideUnusedTypes()) {
            ICounter cnt = c.getTypeCounter();
            return cnt.getTotalCount() == 0 || cnt.getCoveredCount() != 0;
          }
          return true;
        }
      }
    });
View Full Code Here

          IJavaElementCoverage c = CoverageTools.getCoverageInfo(element);
          if (c == null || c.getInstructionCounter().getTotalCount() == 0) {
            return false;
          }
          if (settings.getHideUnusedTypes()) {
            ICounter cnt = c.getTypeCounter();
            return cnt.getTotalCount() == 0 || cnt.getCoveredCount() != 0;
          }
          return true;
        }
      }
    });
View Full Code Here

          IJavaElementCoverage c = CoverageTools.getCoverageInfo(element);
          if (c == null || c.getInstructionCounter().getTotalCount() == 0) {
            return false;
          }
          if (settings.getHideUnusedTypes()) {
            ICounter cnt = c.getTypeCounter();
            return cnt.getTotalCount() == 0 || cnt.getCoveredCount() != 0;
          }
          return true;
        }
      }
    });
View Full Code Here

    });
  }
 
  public int compare(Viewer viewer, Object e1, Object e2) {
    ICounterMode mode = settings.getCounterMode();
    ICounter c1 = mode.getCounter(CoverageTools.getCoverageInfo(e1));
    ICounter c2 = mode.getCounter(CoverageTools.getCoverageInfo(e2));
    int res = 0;
    switch (settings.getSortColumn()) {
      case CoverageView.COLUMN_ELEMENT:
        res = elementsorter.compare(viewer, e1, e2);
        break;
      case CoverageView.COLUMN_RATIO:
        res = Double.compare(c1.getRatio(), c2.getRatio());
        break;
      case CoverageView.COLUMN_COVERED:
        res = (int) (c1.getCoveredCount() - c2.getCoveredCount());
        break;
      case CoverageView.COLUMN_TOTAL:
        res = (int) (c1.getTotalCount() - c2.getTotalCount());
        break;
    }
    if (res == 0) {
      res = elementsorter.compare(viewer, e1, e2);
    } else {
View Full Code Here

    if (coverage == null) {
      // no coverage data
      return;
    }
    // TODO obtain counter from preferences
    ICounter counter = coverage.getInstructionCounter();
    ImageDescriptor overlay = EclEmmaUIPlugin.getCoverageOverlay(counter.getRatio());
    decoration.addOverlay(overlay, IDecoration.TOP_LEFT);
    decoration.addSuffix(SUFFIX_FORMAT.format(new Double(counter.getRatio())));
  }
View Full Code Here

          IJavaElementCoverage c = CoverageTools.getCoverageInfo(element);
          if (c == null || c.getInstructionCounter().getTotalCount() == 0) {
            return false;
          }
          if (settings.getHideUnusedTypes()) {
            ICounter cnt = c.getTypeCounter();
            return cnt.getTotalCount() == 0 || cnt.getCoveredCount() != 0;
          }
          return true;
        }
      }
    });
View Full Code Here

    });
  }
 
  public int compare(Viewer viewer, Object e1, Object e2) {
    ICounterMode mode = settings.getCounterMode();
    ICounter c1 = mode.getCounter(CoverageTools.getCoverageInfo(e1));
    ICounter c2 = mode.getCounter(CoverageTools.getCoverageInfo(e2));
    int res = 0;
    switch (settings.getSortColumn()) {
      case CoverageView.COLUMN_ELEMENT:
        res = elementsorter.compare(viewer, e1, e2);
        break;
      case CoverageView.COLUMN_RATIO:
        res = Double.compare(c1.getRatio(), c2.getRatio());
        break;
      case CoverageView.COLUMN_COVERED:
        res = (int) (c1.getCoveredCount() - c2.getCoveredCount());
        break;
      case CoverageView.COLUMN_TOTAL:
        res = (int) (c1.getTotalCount() - c2.getTotalCount());
        break;
    }
    if (res == 0) {
      res = elementsorter.compare(viewer, e1, e2);
    } else {
View Full Code Here

  public double getRatio() {
    return (double) covered / (double) total;
  }

  public int compareTo(Object obj) {
    ICounter counter = (ICounter) obj;
    return Double.compare(getRatio(), counter.getRatio());
  }
View Full Code Here

    return Double.compare(getRatio(), counter.getRatio());
  }

  public boolean equals(Object obj) {
    if (obj instanceof ICounter) {
      ICounter counter = (ICounter) obj;
      return getTotalCount() == counter.getTotalCount()
          && getCoveredCount() == counter.getCoveredCount();
    } else {
      return false;
    }
  }
View Full Code Here

TOP

Related Classes of com.mountainminds.eclemma.core.analysis.ICounter

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.