Build 2155: Move Method

I just cut and pasted a method from one class to another and ReSharper is
showing various method calls in red because the destination class doesn't
have a using System.Text statement. What I don't understand is that the only
quick fix available on any of the errors is "Move to Another Type". If I
click that, I see a "Move to Another Type" dialog that's riddled with "Usage
will be broken. Access rights problem. (invalid)" statements that give no
information about what statement(s) will be broken. I don't see any options
to add a using System.Text statement to fix the reference to StringBuilder.



Attachment(s):
MoveToAnotherType.png
2 comments

Hello Greg,

Are you able to reproduce this behavior (since I couldn't do this on a sample
solution)? Could you please attach a screenshot demonstrating the list of
available quick-fixes? Thank you!

Andrey Serebryansky
Senior Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

I just cut and pasted a method from one class to another and ReSharper
is showing various method calls in red because the destination class
doesn't have a using System.Text statement. What I don't understand is
that the only quick fix available on any of the errors is "Move to
Another Type". If I click that, I see a "Move to Another Type" dialog
that's riddled with "Usage will be broken. Access rights problem.
(invalid)" statements that give no information about what statement(s)
will be broken. I don't see any options to add a using System.Text
statement to fix the reference to StringBuilder.



0

I just tried and can't reproduce it reliably. I do remember when I ran into
the problem the first time it kept blinking the "Apply move refactoring"
tooltip and wouldn't let me do anything other than apply move refactoring
and selecting that wouldn't do anything except popup "Apply move
refactoring" again.

I've since discovered that I can at least make it go away if I press Escape.

"Andrew Serebryansky"  wrote in message
news:c8a898dd123df8cdecdc5f21b799@news.intellij.net...

Hello Greg,

Are you able to reproduce this behavior (since I couldn't do this on a
sample
solution)? Could you please attach a screenshot demonstrating the list of
available quick-fixes? Thank you!

Andrey Serebryansky
Senior Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

I just cut and pasted a method from one class to another and ReSharper
is showing various method calls in red because the destination class
doesn't have a using System.Text statement. What I don't understand is
that the only quick fix available on any of the errors is "Move to
Another Type". If I click that, I see a "Move to Another Type" dialog
that's riddled with "Usage will be broken. Access rights problem.
(invalid)" statements that give no information about what statement(s)
will be broken. I don't see any options to add a using System.Text
statement to fix the reference to StringBuilder.

>

0

Please sign in to leave a comment.