JetBrains/resharper-angularjs — pull request #11 by citizenmatt (2013-07-12 16:16:09+00:00)
Title: Code completion and references for controllers

This PR is intended to hold the changes required to get ReSharper to understand controllers in angular.

Specifically:
* Code completion in ``ng-controller`` and ``data-ng-controller`` attributes
* Ctrl-click/goto definition navigation from the attribute value to the JS declaration of the controller
* Renaming the controller should rename the attribute value
* Find usages on the controller should highlight the attribute value, and vice versa

Steps to get this done:
- [x] Add a test project
- [ ] Create an ``ICache`` implementation to parse all JS files in the solution and find controller declarations. See ReSharper's ``JavascriptTestCache`` implementation.
- [ ] Write tests to validate the cache implementation
- [ ] Create a reference provider that builds references on ``ng-controller`` and ``data-ng-controller`` attribute value tree elements. When resolving the reference, it looks up the controller in the cache. The reference allows navigation, find usages and renaming to work, and highlights when references can't be found
- [ ] Write tests for the reference provider
- [ ] Extend the reference provider to give code completion by implementing ``ICompletableReferenceProvider``

The PsiPlugin sample in the SDK provides an implementation of ``ICache``. Also, ReSharper's ``JavascriptTestCache`` class is a good example (dotPeek is your friend) - it parses JavaScript files to locate and cache tests.

The [xunitcontrib project](https://xunitcontrib.codeplex.com/SourceControl/latest#resharper/src/xunitcontrib.runner.resharper.provider/PropertyData/PropertyDataReferenceProviderFactory.cs) has an example of a reference provider to give code completion and navigation/find usages/renaming in a string literal in an attribute.

Note that this should support 7.1 as well as 8.0