Push members down and pull members up not showing up

I can only push members down and pull members up by right klicking on a class/interface in the type dependency diagram an going to refactor this. However, the push members down and pull members up do not appear in the refactor this menu inside by right klicking on classes/methods inside class files (.cs files)... Does anyone know how to solve this problem?

4 comments
Comment actions Permalink

Hello,

Could you please provide a screenshot demonstrating the specified behavior?

Also please note there's an option to  ssign a shortcut in Tools | Options | Environment | Keyboard to ReSharper_PullUp/ReSharper_PushDown commands.

Thank you.

0
Comment actions Permalink

Sure, here would be images showing my problem: I want to pull the method ToXml() down, but cannot do it from the code file. However from the type dependency diagram it works... 

And assigning a shortcut did not solve the issue:

If I press the sortcut on the first image instead of right-klicking, I get the message "key combination is bound to command Resharper_PushDown which is currently not available". 

The shortcut has the exact same behavior as right clicking and going to refactor this. (which makes sense)

0
Comment actions Permalink

Okay I figured it out. It seems to matter how you select/click inside the code.

Before I used to double klick on the method in the code to select it. Then the ReSharper_PullUp/ReSharper_PushDown are not available. (and it selects the method with the parentheses)

However, if I just go with my mouse inside the methodname and let the method name be automatically highlighted the commands are available. (and the parentheses of the method are not selected)

0
Comment actions Permalink

Hello,

 

There's no need to double click on the method name, just put cursor on the method and then "Pull members Up/Down" refactoring becomes available.

Thank you.

0

Please sign in to leave a comment.