For a long time I've wanted a feature in ReSharper: If I declare something unknown it turns red. What I want to do is leave the red there and move elsewhere in the code. Perhaps I declared a new variable, property or method but opted not to auto insert the declaration right then and there. I move manually to a different position in my code file to be able to in detail choose where to put my new member. If I start typing at this location that I chose I would love to have intellisence for the thing which is not declared. I attached a sample file of what I mean. Where it says No Suggestions I would like intellisence suggested for my variable aField.
As I start to type a-F and so on it would be cool if intellisence suggested the undeclared aField as an auto-complete where it says No suggestions. I find that quite often I don't want Resharper to put my declaration at the place where it winds up. Often I let Resharper introduce the variable/field or what have you and then I cut-paste it to a new location. That is two actions instead of one. If I could put my cursor where I want my new declaration and get autocomplete for it i would be very happy! THAT is the feature I am looking for.
Please get back to me if you need further clarifications!
class Foo { aField| void Bar() { aField = 1; } }What do you want to do next?
Another situation would be if I had written the code:
class Foo { AMethod| void Bar() { AMethod(1); } }Then we would clearly have the intention to create a method named AMethod. Parameters can be inferred in the same way as "Extract Method".
I hope you continue to enhance this feature to apply to all scopes, within a class and even within a solution (global scope).
Cheers,
M.