Closed rhdunn closed 8 years ago
NOTE: This is also happening if I reload the page and change:
let $foo := <p>{foo($bar)}</p>
to:
let $foo := <p>{afoo($bar)}</p>
Hi Reece,
Thanks for raising all of the issues. It's a great controbution! Without users feeding back I would not be able to improve the plugin! I'll definitely have a look at all of them soon.
Thanks, Grzegorz
Hi
I tried to recreate the issue (on latest codebase as I don't know which version you are using) but was unable to. Also I don't fully understand this part of sentence "but the formatting gets thrown off ". Is it formatting or highlighting that you mean? Would you be able to attach some screenshots or a recorded video that shows the error? Also please let me know the version of plugin and Idea/Pycharm/Webstorm/etc... that you are using.
Thanks, Grzegorz
The issue is with the highlighting, not formatting, in this issue. For the issue I am seeing, I am using intellij-xquery 2.2.1 with the community edition of IntelliJ 14.1.4 and Java 1.8 on Windows 7. I haven't tested other setups.
The issue I am experiencing (as best I can describe it) is that the green font highlighting used for {...}
constructs is flowing past the closing }
and into the following XML and XQuery code, causing the code from that point to be incorrectly highlighted.
I'll provide more information on Monday when I have access to the machine I am experiencing this issue on.
Given:
declare function createMessage($message, $value) {
if ($message) then
<message value="{$value}">{$message}</message>
else
<message test="foo">Test</message>
};
Modify {$message}
to {f$message}
:
This exhibits the same behaviour as the other similar issue (so may be triggering the same underlying bug). I have also noticed that if you modify {$value}
to {f$value}
first, then delete the inserted f
, you don't get the bug when subsequently modifying {$message}
to {f$message}
.
I was able to reproduce the issue on 2.2.1. It was fixes as part of https://github.com/ligasgr/intellij-xquery/issues/117 Can you please check a plugin version from this link which only contains the fix if it solves the issue? Same applies to the other issue ( #134 ) which also should be fixed by this. JetBrains have pretty clear instructions on how to install plugin from disk.
Given:
If you start wrapping the
$bar
expression in a function call, e.g.:An error is generated at the
}
as expected, but the formatting gets thrown off (it continues the{
expression into</p>
and beyond. Finishing the code, e.g.:does not correct the highlighting.