Hello. I've been playing with getting some support for .spark files into the ReSharper 5 beta. I created a reference provider that would treat spark files as the target of references for views. This works very nicely when ctrl-clicking a View(); method in a controller action - it finds the associated <action>.spark file and opens it up a treat.
Things don't work so well when specifying a view by name in a string literal e.g View("Index").
I can ctrl-click the string and again get navigated to the Index.spark file, but it also gets highlighted as unresolved - the string appears in red and the tooltip says "Cannot resolve view 'Index'". And intellisense within the string works a bit oddly - I just get a list of available .spark files, but not .aspx or .ascx files.
I've had a dive through the code and figured out what was going on.
The string literal is getting multiple references associated with it - mine, and one from the standard aspx based MVC reference provider. Mine is saying that it's resolved, hence the underline and the ctrl-click, but the standard MVC reference is of course undefined (because there's no associated aspx file).
And the intellisense provider only gets candidates from the first completable reference it finds, which is my spark one. This makes sense - intellisense normally completes from a single reference (such as a variable), but it does mean that it doesn't include any .aspx files.
So, I guess I'm asking if this can be fixed in a future build? Can the intellisense code combine the references? Is there anything that can be done to prevent the multiple references of the view name string literal? I'd love to get some first class spark support (I'm revving myself up for a full on language service...)