Lines 309-314
Link Here
|
309 |
} |
309 |
} |
310 |
previous = src[i]; |
310 |
previous = src[i]; |
311 |
} |
311 |
} |
|
|
312 |
boolean containsEmptyTask = false; |
312 |
for (int i = foundTaskIndex; i < this.foundTaskCount; i++) { |
313 |
for (int i = foundTaskIndex; i < this.foundTaskCount; i++) { |
313 |
// retrieve message start and end positions |
314 |
// retrieve message start and end positions |
314 |
int msgStart = this.foundTaskPositions[i][0] + this.foundTaskTags[i].length; |
315 |
int msgStart = this.foundTaskPositions[i][0] + this.foundTaskTags[i].length; |
Lines 337-344
Link Here
|
337 |
if (end == -1) |
338 |
if (end == -1) |
338 |
end = max_value; |
339 |
end = max_value; |
339 |
} |
340 |
} |
340 |
if (msgStart == end) |
341 |
if (msgStart == end) { |
341 |
continue; // empty |
342 |
// if the description is empty, we might want to see if two tags are not sharing the same message |
|
|
343 |
// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=110797 |
344 |
containsEmptyTask = true; |
345 |
continue; |
346 |
} |
342 |
// trim the message |
347 |
// trim the message |
343 |
while (CharOperation.isWhitespace(src[end]) && msgStart <= end) |
348 |
while (CharOperation.isWhitespace(src[end]) && msgStart <= end) |
344 |
end--; |
349 |
end--; |
Lines 352-357
Link Here
|
352 |
System.arraycopy(src, msgStart, message, 0, messageLength); |
357 |
System.arraycopy(src, msgStart, message, 0, messageLength); |
353 |
this.foundTaskMessages[i] = message; |
358 |
this.foundTaskMessages[i] = message; |
354 |
} |
359 |
} |
|
|
360 |
if (containsEmptyTask) { |
361 |
for (int i = foundTaskIndex, max = this.foundTaskCount; i < max; i++) { |
362 |
if (this.foundTaskMessages[i].length == 0) { |
363 |
loop: for (int j = i + 1; j < max; j++) { |
364 |
if (this.foundTaskMessages[j].length != 0) { |
365 |
this.foundTaskMessages[i] = this.foundTaskMessages[j]; |
366 |
this.foundTaskPositions[i][1] = this.foundTaskPositions[j][1]; |
367 |
break loop; |
368 |
} |
369 |
} |
370 |
} |
371 |
} |
372 |
} |
355 |
} |
373 |
} |
356 |
|
374 |
|
357 |
public char[] getCurrentIdentifierSource() { |
375 |
public char[] getCurrentIdentifierSource() { |