----- Original Message -----
From: "Andre Baresel" <and...@gm...>
To: "CppTool Mailing List" <Cpp...@li...>
Sent: Sunday, December 22, 2002 12:30 PM
Subject: [Cpptool-develop] New Methodlevel Refacturing Features ??
> I was just remembering some usefull functionality in a Java IDE.
> What about having:
>
> - moving a declaration to the top of the container compound statement or
> even move it to parent scopes,
> the is "Increase scope of a variable" ... might this be usefull ?
I don't see this refactoring as being used often. What do you mean by 'even
move it to parent scopes' ? Change a local variable in an attribute ?
> - add a try-catch-block arround a function call (or any other
> statement). For the first we could ask the
> user for the exception type that will be catched and later we could
> analyse the statement and give the user
> a list of exceptions that maybe have to be handled because of "throws"
> in function declarations of calls.
Adding a try/catch is doable. Guessing the exception type is nearly
impossible. Even C++ compiler can't do that (because of virtual call among
other things). Even a basic analysis requires very advanced expression
analysis.
I would classify those two in the 'code generation' category rather than
refactoring. This is probably a tool we will develop when we have a good
code rewritter, as it can be very useful.
>
> -- Andre
|