diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/TodoTaskParser.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/TodoTaskParser.java index 923d8d1369b..d1584cc8d35 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/TodoTaskParser.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/TodoTaskParser.java @@ -145,10 +145,12 @@ public class TodoTaskParser { } } // Trim the message - while (msgStart < end && CharOperation.isWhitespace(comment[end - 1])) + while (msgStart < end && CharOperation.isWhitespace(comment[end - 1])) { end--; - while (msgStart < end && CharOperation.isWhitespace(comment[msgStart])) + } + while (msgStart < end && (CharOperation.isWhitespace(comment[msgStart]) || comment[msgStart] == ':')) { msgStart++; + } if (msgStart == end) { // If the description is empty, we might want to see if two tags // are not sharing the same message. diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/TaskTagRule.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/TaskTagRule.java index 7ee4fc3d0f6..a0059f18b4c 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/TaskTagRule.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/TaskTagRule.java @@ -43,8 +43,7 @@ public final class TaskTagRule extends CombinedWordRule implements IPropertyChan } public boolean isWordPart(char c) { - // Allow task tags like "todo(myname):" - return c == '.' || c == '(' || c == ')' || c == ':' || Character.isJavaIdentifierPart(c); + return c == '.' || Character.isJavaIdentifierPart(c); } }