angularjs-plugin icon indicating copy to clipboard operation
angularjs-plugin copied to clipboard

scope variable parsing and completion

Open ganarajpr opened this issue 12 years ago • 4 comments

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.

ganarajpr avatar Mar 26 '13 15:03 ganarajpr

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.

johnlindquist avatar Mar 26 '13 16:03 johnlindquist

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.

ganarajpr avatar Mar 26 '13 16:03 ganarajpr

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 .

johnlindquist avatar Mar 26 '13 16:03 johnlindquist

I believe this is mostly handled by JetBrains/intellij-plugins@6b08f4f08de1b2f668befbf6801089087cd91567

denofevil avatar Feb 13 '14 08:02 denofevil