Language Injection - enable? 关注 Dave Lorde 创建于 2010年05月21日 12:49 D'oh! I accidentally clicked on 'Disable' while using the Language Injection intention on a String, and I can't see how to re-enable it...Anyone?
Settings | IDE Settings | Language Injection
I tried that - I couldn't see any unchecked injections, so I selected them all and clicked 'Enable Selected Injections' and now the status bar shows '69 injections (241 of 241 places enabled)', but I still don't get the language injection intention when I select a String in the editor (all I see now is 'Convert to atomic').
Ah, yes... I remember now.. same thing happened to a coworker of mine once. Took him forever to find the setting to turn it back on.It ended up being in a strange place if I recall. Unfortunately I do not remember where he eventually found it. And he's on vacation today so I cannot ask him. I can however give you the "hard" way to resolve the issue.
The issue is the "Inject Language" intention got turned off. But I am not seeing the setting under the intentions list.So you can solve it as follows:
Close IDEA and open .IntelliJIdea90/options/intentionSettings.xml
In there, there will be a <component> element with a name attribute of "IntentionManagerSettings". It will have a child <ignoreAction name="Inject Language" /> That's the culprit.
My intentionSettings.xml file is simply the emtpy element <application /> as I have them all turned on.
Sounds like this is a significant usability issue if three long time IDEA users are struggling to find this setting. If you want to open a YouTrack on such, I'd be happy to vote for it.
Thanks Mark, that did the trick!
I've opened YouTrack issue 55203.