Using certain live JavaScript live templates in language injected code sections causes IDEA to halt or create scrambled code.
In Bindows it is possible to have JavaScript together with xml in the same file. JavaScript is put inside a cdata section inside a special tag like this:
<?xml version="1.0"?>
<Application autoNameMapping="true" xmlns="http://www.bindows.net/Schema/3.0/">
<Window caption="name" width="400" height="400">
</Window>
<Resources>
<Script><![CDATA[
function MTest() {
// JAVASCRIPT AND PROBLEMATIC SECTION
}
MTest.main = function() {
new MTest();
};
]]></Script>
</Resources>
</Application>
Now when IDEA offers its own language injections, I don't have to use IntelliLang for that. The BindowsPlugin provides several live templates and some of them does not work correctly inside the cdata section. They do however work perfectly in plain .js files. This issue might be related: http://www.jetbrains.net/jira/browse/IDEADEV-17261
To reproduce: install the BindowsPlugin and try the live templates called "blog2", and "addEventL".
blog2 makes IDEA spin into an eternal loop consuming 100% cpu and addEvent creates scrambled code.