ItelliLang RegExp Misdiagnosis (?)

Hi,

I'm seeing something I believe is a spurious error (full-blown red) indication on a regular expression string returned from a method annotated as @Language("RegExp").

Here's the code:


(The flagged characters are the two backslashes.)

Two things make me think this error is spurious:

1) I've looked at it a lot and am convinced it's correct.
2) The code that uses the returned value (as an RE pattern) works.


I'm using IntelliLang 2.1.6 on IDEA #7531.


Randall Schulz

5 comments

Evidently the spurious error indication was also sporadic.

I cut the RE (leaving an empty string literal), waited for IDEA to re-inspect then pasted the RE back. After this, the error did not reappear.

Oddly enough, earlier I had commented the @Language("RegExp") annotation from the method, which naturally caused the error to disappear. But when I subsequently reinstated the annotation, the error reappeared.


Odd, no?


Randall Schulz

0

Randall Schulz wrote:

I'm seeing something I believe is a spurious error (full-blown red) indication on a regular expression string returned from a method annotated as @Language("RegExp").


Yes, I've seen this effect on a random basis as well, and it's usually "fixed" after
closing/reopening the project.

I'm not sure if this is an IDEA or the fault of the plugin and unfortunately I haven't been able to
reliably reproduce the effect yet, but I'll have a look at it again.

Sascha

0

It's definitely sporadic for me and all within a single invocation of IDEA.

I didn't notice exactly when it returned this last time, but the "cut and replace" technique of silencing the error indication worked again.

If I can spot some kind of pattern to the appearance of this error, I'll pass it on.


Randall Schulz

0

Randall Schulz wrote:

If I can spot some kind of pattern to the appearance of this error, I'll pass it on.


Thanks, but I think I've already figured it out. It seems to be a bug in IDEA:
http://www.jetbrains.net/jira/browse/IDEA-16218

Sascha

0

Well, that's funky.

Just as well, though, 'cause while it keeps happening, it's never when I'm looking...


RRS

0

Please sign in to leave a comment.