/** * Reads the current value at the cursor and compares it. */ public boolean compare(final LineRange lr) { int s = read(); int d = read(); return lr.getStart() == s && lr.getEnd() == s + d; }
/** * Reads the current value at the cursor and compares it. */ public boolean compare(final LineRange lr) { int s = read(); int d = read(); return lr.getStart() == s && lr.getEnd() == s + d; }
boolean isFirstRange = true; for (LineRange range : annotation.getLineRanges()) { while (lineNumber < range.getStart()) { copyLine(output, lineIterator); lineNumber++; output.append("\">\n"); output.append("<div id=\"line"); output.append(range.getStart()); output.append("\" tooltip=\""); if (range.getStart() > 0) { outputEscaped(output, annotation.getMessage()); output.append("\" nodismiss=\"\">\n"); output.append("<code><b>\n"); if (range.getStart() <= 0) { output.append(annotation.getMessage()); if (StringUtils.isBlank(annotation.getMessage())) {
boolean isFirstRange = true; for (LineRange range : annotation.getLineRanges()) { while (lineNumber < range.getStart()) { copyLine(output, lineIterator); lineNumber++; output.append("\">\n"); output.append("<div tooltip=\""); if (range.getStart() > 0) { outputEscaped(output, annotation.getMessage()); output.append("\" nodismiss=\"\">\n"); output.append("<code><b>\n"); if (range.getStart() <= 0) { output.append(annotation.getMessage()); if (StringUtils.isBlank(annotation.getMessage())) {
/** * Verifies the created project. * * @param project the created project */ @SuppressWarnings("PMD") protected void verifyProject(final JavaProject project) { assertTrue(project.hasAnnotations()); checkSummary(project); assertTrue(MODULE_NOT_IN_PROJECT, project.containsModule(MODULE1)); assertTrue(MODULE_NOT_IN_PROJECT, project.containsModule(MODULE2)); checkFirstModule(project.getModule(MODULE1)); checkSecondModule(project.getModule(MODULE2)); for (FileAnnotation annotation : project.getModule(MODULE2).getAnnotations()) { assertEquals("Wrong primary line number.", LINE_NUMBER, annotation.getPrimaryLineNumber()); Collection<LineRange> lineRanges = annotation.getLineRanges(); assertEquals("Wrong number of ranges.", 1, lineRanges.size()); LineRange range = lineRanges.iterator().next(); assertEquals("Wrong start line number.", LINE_NUMBER, range.getStart()); assertEquals("Wrong end line number.", LINE_NUMBER, range.getEnd()); assertEquals("Wrong package prefix.", Messages.PackageDetail_header(), project.getModule(MODULE2).getPackageCategoryName()); assertSame(annotation, project.getAnnotation(annotation.getKey())); assertSame(annotation, project.getAnnotation(Long.toString(annotation.getKey()))); } }
/** * Verifies the created project. * * @param project the created project */ @SuppressWarnings("PMD") protected void verifyProject(final JavaProject project) { assertTrue(project.hasAnnotations()); checkSummary(project); assertTrue(MODULE_NOT_IN_PROJECT, project.containsModule(MODULE1)); assertTrue(MODULE_NOT_IN_PROJECT, project.containsModule(MODULE2)); checkFirstModule(project.getModule(MODULE1)); checkSecondModule(project.getModule(MODULE2)); for (FileAnnotation annotation : project.getModule(MODULE2).getAnnotations()) { assertEquals("Wrong primary line number.", LINE_NUMBER, annotation.getPrimaryLineNumber()); Collection<LineRange> lineRanges = annotation.getLineRanges(); assertEquals("Wrong number of ranges.", 1, lineRanges.size()); LineRange range = lineRanges.iterator().next(); assertEquals("Wrong start line number.", LINE_NUMBER, range.getStart()); assertEquals("Wrong end line number.", LINE_NUMBER, range.getEnd()); assertEquals("Wrong package prefix.", Messages.PackageDetail_header(), project.getModule(MODULE2).getPackageCategoryName()); assertSame(annotation, project.getAnnotation(annotation.getKey())); assertSame(annotation, project.getAnnotation(Long.toString(annotation.getKey()))); } }
if (annotation.isInConsoleLog()) { LineRange lines = annotation.getLineRanges().iterator().next(); return new ConsoleDetail(owner, lines.getStart(), lines.getEnd());
if (annotation.isInConsoleLog()) { LineRange lines = annotation.getLineRanges().iterator().next(); return new ConsoleDetail(owner, lines.getStart(), lines.getEnd());