Tolc / IntelliJ_Jahia_plugin

Jahia's definitions.cnd files syntax highlighting, code completion, and other amazing stuff
Apache License 2.0
22 stars 3 forks source link

Plugin too strict in Java code #21

Closed cbrandes closed 7 years ago

cbrandes commented 7 years ago

In Java class code (maybe in other place, didn't check), if you have a string containing the pattern 'cndNamespace:[A-Za-z]+', the plugin will try to match against declared nodes. If the nodetype doesn't exist, the editor will mark the string as if there were an error. But sometimes you need to reference a property that has the same pattern (for example, jcr:title) and is not a node, and the error will be there, even if you know that's not an error. I don't know if that affects the build process, but it's middly disturbing.

I think the plugin should warn about the fact that it's not a known node, but not mark the string as if there was an error.

Edit : just checked, same thing in JSPs

Tolc commented 7 years ago

What version of the plugin are you using? Because i've fixed something really similar in 1.2. See #15

cbrandes commented 7 years ago

Yep, same issue, but the fix is only for non referenced namespaces. Referenced namespaces will always trigger the name check :

image

plugin version is 1.2

Tolc commented 7 years ago

It does not affect build process or anything in any way, it is just a visual assist. From now on it will be warnings only.

Thanks for opening an issue!