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

"Unresolved CND namespace" on unrelated property of spring bean #15

Closed babiel-osp closed 7 years ago

babiel-osp commented 7 years ago

Hello, the CND parser seems a little overzealous and tries to parse anything that could remotely resemble an nodetype name. E.g.: `

    <route>
        <from uri="direct:mailUsers"/>

[...]` The "direct:mailUsers" will be interpreted as an non existing node type and thus marked as an error. Maybe it would help to deactivate the parsing for XML files or turn it into an inspection, so the user would be able to suppress it.

PS: I really like your plugin! Great work.

Best regards

Tolc commented 7 years ago

Oh come on, all your XML attribute values including a colon are not Jahia nodetypes? That's a shame!

Just kidding, I knew I would have to fix that eventually. And actually that is done through an Annotator for the moment. What I propose for now is simply to color and/or display an error only if what the plugin recognizes as the namespace is a known and valid cnd namespace (e.g. here you would have to have a 'direct' namespace declared in a cnd file, but no 'direct:mailUsers' nodetype for the error to show up).

I have a huge refactoring planned about moving some parts of the logic into inspections, so this will become an inspection eventually, you're right.

Thank you for your feedback :)