### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core Index: compiler/org/eclipse/jdt/internal/compiler/parser/Scanner.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Scanner.java,v retrieving revision 1.164 diff -u -r1.164 Scanner.java --- compiler/org/eclipse/jdt/internal/compiler/parser/Scanner.java 18 Oct 2005 15:29:47 -0000 1.164 +++ compiler/org/eclipse/jdt/internal/compiler/parser/Scanner.java 10 Nov 2005 02:37:52 -0000 @@ -309,6 +309,7 @@ } previous = src[i]; } + boolean containsEmptyTask = false; for (int i = foundTaskIndex; i < this.foundTaskCount; i++) { // retrieve message start and end positions int msgStart = this.foundTaskPositions[i][0] + this.foundTaskTags[i].length; @@ -337,8 +338,12 @@ if (end == -1) end = max_value; } - if (msgStart == end) - continue; // empty + if (msgStart == end) { + // if the description is empty, we might want to see if two tags are not sharing the same message + // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=110797 + containsEmptyTask = true; + continue; + } // trim the message while (CharOperation.isWhitespace(src[end]) && msgStart <= end) end--; @@ -352,6 +357,19 @@ System.arraycopy(src, msgStart, message, 0, messageLength); this.foundTaskMessages[i] = message; } + if (containsEmptyTask) { + for (int i = foundTaskIndex, max = this.foundTaskCount; i < max; i++) { + if (this.foundTaskMessages[i].length == 0) { + loop: for (int j = i + 1; j < max; j++) { + if (this.foundTaskMessages[j].length != 0) { + this.foundTaskMessages[i] = this.foundTaskMessages[j]; + this.foundTaskPositions[i][1] = this.foundTaskPositions[j][1]; + break loop; + } + } + } + } + } } public char[] getCurrentIdentifierSource() {