scope variable parsing and completion
This is perhaps more difficult than the ng-controller code completion. But I believe that Intellij already parses HTML and has an idea about where we are editing in the code. By hooking into this parsed model of the current HTML we are editing, it should be able to hook into the nearest controller ( ofcourse there will be edge cases! ). If we get hold of the controller definition, it should be a simple regex to get hold of its $scope. Then providing code completion based on this scope should not be such a far stretch. I understand this is a really difficult thing to implement, but would be awesome if we could.
I've been thinking of ways to do this. Since you can dynamically assign controllers through routing, templates, etc, I'd probably just have to provide "dumb" completion where it offers anything assigned to $scope.
Yeah, even dumb is better than nothing. While you are at it, perhaps a feature where you can "jump to source" ( cmd+ click - like your controllers suggestion ) on the scope functions would be great too.
Definitely.
On Tue, Mar 26, 2013 at 10:18 AM, Ganaraj P R [email protected]:
Yeah, even dumb is better than nothing. While you are at it, perhaps a feature where you can "jump to source" ( cmd+ click - like your controllers suggestion ) on the scope functions would be great too.
— Reply to this email directly or view it on GitHubhttps://github.com/johnlindquist/angularjs-plugin/issues/13#issuecomment-15468486 .
I believe this is mostly handled by JetBrains/intellij-plugins@6b08f4f08de1b2f668befbf6801089087cd91567