Move type feature
Currently Re#er has 'Move type' feature, which is capable of moving a single
type from one namespace to another. That's useful however not powerful enough.
1) Do you have any plans to add an ability to drag-and-drop a type from one
namespace to another (using Class View or some similar tool)? In most cases
that would much more convinient (this kind of refactoring actually affects
the 'model' of the application, not the code itself; thus a visual representation
of the model is more appropriate)
I had some experience with built in Class View (in VS2003, haven't tested
it in VS2005 though...), and it seems it cannot reflect the changes in the
code on-the-fly. There is a noticable delay (for which I failed to find a
reasonable upper bound) between the moment when the code is changed and the
moment when the tree is updated. So having such kind of view from Re#er would
be very nice.
2) Even if the answer to the previous question is negative still we can improve
the existing feature. One aspect, which I currently dislike, is the neccessity
to invoke the refactoring for each type is the source code file. Yes, usually
we have a 'one type -- one file' relation, but sometimes this rule is violated
(e.g. when I have XXXEventArgs and XXXEventHandler types -- these are often
put in the same file). Besides being inconvinient, the doulble refactoring
produces very strange-looking code like
namespace A.B.C
{
}
namespace A.B.C
{
<2nd type>]]>
}
-- the namespace declarations are not merged. Thus the code requires manual
correction -- the thing which definitely should be avoided.
Just to summarize, my suggestions are:
1) (Possibly hard to implement) Drag-and-drop functionality for ClassView
(either existing one or a completely custom)
2) 'Move all types' refactoring -- should be applicable when all types in
the current source file are in the same namespace. The expected result is:
all types are moved to the given destination namespace.
3) Automatically merge namespace declarations after 'Move type' refactoring.
Please sign in to leave a comment.
Hello Maxim,
I agree with your points 2) and 3) (BTW, please submit them as requests to
the tracker).
As for 1), I think that implementing the functionality you suggest
on top of the VS class view would be too cumbersome, and we currently have
no plans to provide an
equivalent tool in the ReSharper add-in.
Although, personally, what I'm missing most in the current 'Move Type' feature
is that it is not capable of moving nested types.
Regards,
Dmitry Shaporenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
Hello Dmitry,
Done.
So I can only hope this feature will be implemented in Re#er IDE =)
Indeed, that would be very useful. Do you have any plans for implementing
it in 2.0?
Hello Dmitry,
DS> I agree with your points 2) and 3) (BTW, please submit them as
DS> requests to
DS> the tracker).
Those are in tracker for at least several months :)
Sincerely,
Ilya Ryzhenkov
Yes, this feature is mentioned in out plan: "Move Inner Type to Outer Scope
refactoring".
Regards,
Dmitry Shaporenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
>> Although, personally, what I'm missing most in the current 'Move
>> Type' feature is that it is not capable of moving nested types.
>>
Hello Dmitry,
BTW, I just looked through the plan again and found the following feature:
Type Hierarchy (in Other). What does this mean? Is it some sort of replacement
for ClassView?
Hello Maxim,
No, it's a tool window that shows type inheritance hierarchy and allows for
fast navigation
to the types related to the given type in that hierarchy.
Regards,
Dmitry Shaporenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
Hello Dmitry,
OK, I see now. Thank you for the information.
And their link is?
"Ilya Ryzhenkov" <orangy@netix.ru> wrote in message
news:5992f43b501628c76274d6eb3a34@news.jetbrains.com...
>
>
>
Hello Amir,
AK> And their link is?
I will have to search for them as well, so I don't know. I remember I posted
them long ago.
Sincerely,
Ilya Ryzhenkov