Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Anyone working on "Add Include" refactoring?

"Refactoring" is defined as (from Wikipedia): ...
Apparently I hit a nerve, for someone to quote chapter and verse from the Book of Wikipedia!   

I know about the difference you cited, which we focused on with Sun's Jackpot Project.  Much of that research involved algebraic manipulation of source code, making transformations we could prove didn't change program logic by using predicate logic (such as using DeMorgan's Laws to simplify complex boolean expressions).  Imagine the math involved if we had to prove CDT's refactorings!

But that's not the point -- what matters in a developer tool isn't how correctly it adheres to Wikipedia-definitions, but how well it helps developers get code shipped.  Developers using our tools want to easily and quickly enhance their projects, and don't want to worry about which side of a definition some editing-feature winds up.  The Source/Refactoring menu split shows an important distinction for the authors of JDT/CDT, not the majority of its users.  A perfect tool is one that disappears.

The issue we have at Google is that many of our Emacs C++ developers remain more productive than our Eclipse C++ users, so issues like common commands being hard to find are relevant since they impact productivity.

Tom

On Fri, Jan 30, 2009 at 12:03 PM, Mike Kucera <mkucera@xxxxxxxxxx> wrote:

"Refactoring" is defined as (from Wikipedia):

Code refactoring is the process of changing a computer program's internal structure without modifying its external behavior or existing functionality. This is usually done to improve code readability, simplify code structure, change code to adhere to a given programming paradigm, improve maintainability, or improve extensibility. (http://en.wikipedia.org/wiki/Code_refactoring)

So code manipulations that change external behavior or add functionality are technically not refactorings. For example "genreate hashCode() and equals()" is not a refactoring. I think that's why commands that generate code tend to go in the source menu and not the refactor menu.


Mike Kucera
Software Developer
IBM Eclipse CDT Team
mkucera@xxxxxxxxxx

Inactive hide details for Tom Ball ---01/30/2009 02:00:11 PM---Doh! I keep forgetting that JDT and CDT split their refactoringsTom Ball ---01/30/2009 02:00:11 PM---Doh! I keep forgetting that JDT and CDT split their refactorings into source and refactoring menu lists, and so just assumed t


From:

Tom Ball <tball@xxxxxxxxxx>

To:

"CDT General developers list." <cdt-dev@xxxxxxxxxxx>

Date:

01/30/2009 02:00 PM

Subject:

Re: [cdt-dev] Anyone working on "Add Include" refactoring?




Doh! I keep forgetting that JDT and CDT split their refactorings into source and refactoring menu lists, and so just assumed that because it wasn't in the refactoring menu or in one of the refactoring packages, it didn't exist. Thanks for the pointer -- although the existing Add Include has its problems it should be enough for the other refactoring to use. As I find blockers in Add Include, I'll submit separate patches.

Tom

On Fri, Jan 30, 2009 at 10:26 AM, Sergey Prigogin <eclipse.sprigogin@xxxxxxxxx> wrote:
    There is an existing Add Include command, but it's riddled with problems. See for example 236530 and 255952. I had some ideas regarding Add Include. We can meet to talk about it if you like.

    -sergey

    On Fri, Jan 30, 2009 at 9:47 AM, Tom Ball <tball@xxxxxxxxxx> wrote:
    I'm working on a C++ refactoring similar to the "Change Method Signature" one for Java, and belatedly realized that restricting the list of valid types to choose from to those already resolved by the AST makes the refactoring much less useful. Is anyone working on the C++ equivalent of Java's "Add Import" and/or "Organize Imports" refactorings? If not, should I switch over and work on them first?

    Tom

    _______________________________________________
    cdt-dev mailing list

    cdt-dev@xxxxxxxxxxx
    https://dev.eclipse.org/mailman/listinfo/cdt-dev



    _______________________________________________
    cdt-dev mailing list

    cdt-dev@xxxxxxxxxxx
    https://dev.eclipse.org/mailman/listinfo/cdt-dev
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev



_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev


GIF image

GIF image


Back to the top