inner scope issue RSRP-95051
Team,
I've been trying to track down why RSRP-95051 was marked not reproducible.
I have been finding the same issue for some time, and tried to report, but with no reply yet.
I have loaded RC1 of 4.5 today, and still see no quick fix for "move to inner scope."
I do tons of C++ to C# porting, and this is one of the most useful refactoring steps.
I even teach a course which states to "always do this before extracting methods" and have slides on how to do it with resharper, but:
The feature seems to have gone away.
I can also not see this in the resharper options page.
Was this refactoring action deliberately removed?
Please let me know.
Thanks
Trevor
Please sign in to leave a comment.
No, this suggestion and refactoring was not removed.
Please could you provide small piece of code (for example, method body)
where this suggestion is not shown, but you would like it.
--
Eugene Pasynkov
ReSharper Technical Lead
JetBrains, Inc.
http://www.jetbrains.com
"Develop with pleasure!"
"Trevor Hall" <no_reply@jetbrains.com> wrote in message
news:10235394.65661239211601677.JavaMail.clearspace@app8.labs.intellij.net...
>
>
>
>
>
>
>
>
Here is the code.
I tried to reply to your email from the forum, to send a good screenshot, but it bounced.
You get a tooltip on the canBeMoved, but no lightbulb.
Resharper 3.0 used to be able to move this declaration, but 4.5 does not appear to have this feature.
I have problems pasting code into this forum, so excuse the formatting.
using
System;
using
System.Collections.Generic;
using
System.Linq;
using
System.Text;
namespace
ResharperTest
{
public class Class1
{
int TestMethod(){
int i = 0;
int canBeMoved;
if (i >= 0)
{
canBeMoved = 5;
i = i + canBeMoved;
}
return i;
}
}
}
I installed the final release 4.5.
same issue.
Interestingly there is a workaround:
I can navigate to the first use, and then "Join declaration and assignment" which moves the scope.
Still: not as productive.
Trevor
Thank you for the example.
At my side everything works right, i.e. the suggestion is here
Please check if this suggestion isn't disabled: visit
ReSharper->Options->Inspection Severity page
--
Eugene Pasynkov
ReSharper Technical Lead
JetBrains, Inc.
http://www.jetbrains.com
"Develop with pleasure!"
"Trevor Hall" <no_reply@jetbrains.com> wrote in message
news:25963437.65941239213880235.JavaMail.clearspace@app8.labs.intellij.net...
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
Hello, Trevor,
Thanks for your feedback. The corresponding JIRA request has been created,
and you are welcome to monitor its status at http://www.jetbrains.net/jira/browse/RSRP-102907
You may want to check our request tracking policy here: http://www.jetbrains.net/confluence/display/ReSharper/ReSharperIssueTracker
Thanks for your repro case!...
Best regards,
Olga
Thanks again for looking into it.
I see you posted this as a defect. Does that mean that you eventually did reproduce it?
Update: I read your bug report, and I think we are on the same page now.
Workaround "Alt enter" shows the list, and it works.
It's just the "no bulb" issue.
Thanks
Trevor
Hello Trevor,
Yes I did. Thanks again for your repro case. =)
Regards,
Olga