11 comments
Comment actions Permalink

Did you try an IDE restart? Did you check it in other file extensions (.js,.html ...)?

0
Comment actions Permalink

TODO-Comments not working for me either. Has been a problem for several weeks. Restart doesn't help. I presume you'll want the logs? Here they are anyway https://drive.google.com/file/d/1gSP4Wibkh1jpn0Il5Q89wyJbBOfje6wa/view?usp=sharing 

1
Comment actions Permalink

You got it right, thanks for the log - they'll totally fine.

Seems like the problem is code-related. Please check if todo comments work in small files & in another project. Do you have the TODO patterns as pictured at the top at File | Settings | Editor | TODO?

0
Comment actions Permalink

Apologies for the delayed response.

TODO-comments don't work for small files (sub 30 lines of code) or other projects either. The patterns I have stored are all valid regex, I'm pretty sure. Here's a screenshot just in case: https://drive.google.com/file/d/1sp7uXTFo61soPyo9lgcAzZ9UOBKklTjf/view?usp=sharing 

1
Comment actions Permalink

Found the problem: the expressions listed above are all in lowercase. Though I thought it would ignore case-sensitivity, as it did before, it doesn't anymore. It does properly detect all lowercase-todo patterns. Is this intended behaviour?

1
Comment actions Permalink

What version are you on? Can't reproduce that in 2018.2.4.

There's basically a whole checkbox for case sensitivity, does it do anything at all? Also, please check if the issue persists after caches invalidation.

0
Comment actions Permalink

It's in the slashes.

With the text

var maintenanceOriginId = "S3-XXX"; //abc MUDO add origin to prod

in a *.js file, the pattern 

abc\s+MUDO\b.*

works

and the pattern

//abc\s+MUDO\b.*

does not.

Patterns with slashes worked "before".

IntelliJ IDEA 2018.3.4 (Ultimate Edition)

Build #IU-183.5429.30, built on January 29, 2019

Treat indented text … selected (but it doesn't make a difference).

1
Comment actions Permalink

Thanks, it did turn out to be the case sensitivity check mark though. For whatever reason it reset to disable case insensitivity over an update (or maybe I changed it and forgot about it, I doubt it though) and enabling it fixed it

1
Comment actions Permalink

Hi Jan, Jan here :-) thx for the response.

Well, then there are multiple problems, because for me, it does not work when my pattern starts with a '/' (see above), whether or not case sensitivity is selected, and it does with the pattern without the slashes.

1
Comment actions Permalink

Hi Jan,

I can see why that would be a problem, as RegEx won’t match a pattern with slashes like that. Note that the todo search thing looks through comments already, so you don’t have to specify the slashes themselves.

If you’re unfamiliar with RegEx, there are excellent validators online.

Jan

0
Comment actions Permalink

Hi Jan,

RegEx familiarity is up-to-speed, that is not the issue. Thank you for your concern.

No, RegEx does match patterns with slashes like that, in general (although one might need to escape the slashes, depending on the implementation). And these patterns did work "earlier" as TODO pattern. They do not work now.

But the issue probably is with an undocumented change you refer to: "that the todo search thing looks through comments".

The intention of having a pattern like

(//|/\*|#)\s+TODO\b.*

was

  1. to limit matches to TODO in comments, and not anywhere else
  2. to also select the opening comment symbols, when applying to color scheme's

The latter is just cosmetic. In the string

// TODO this is my todo

with the current implementation, background and foreground color is applied to " TODO this is my todo" with the pattern

\s+TODO\b.*

and not to the leading "//".

(1.) was necessary in earlier versions of IDEA. In the current version, it seems the TODO patterns only match in comments, regardless.

That is ok for me, but this change was not clear to me.

What I would like is for the color scheme to be applied to the whole comment block, not only to the text, purely for cosmetic reasons.

1

Please sign in to leave a comment.