List Info

Thread: Refactoring support




Refactoring support
user name
2008-02-26 18:29:36
Hello,

Something that was mentioned as a long-term goal for
KDevelop, at
Akademy I believe, was refactoring support for C++ and
possibly other
languages.  This is the one aspect of an environment like
Eclipse/JDT
which is I greatly miss when dealing with KDE code.  I
couldn't find
any further documentation on the wiki about it though so I'm
not sure
if it has been discussed in detail yet.  This is something
I'd be
interested in helping to implement.

I have been looking at the C++ language support (the
DUChain) in
KDevelop 4 and it seems to be pretty good shape apart from
the lack of
persistence - which I don't think is a problem for at least
getting
the basics of a refactoring framework working.

Any thoughts about how to proceed on this?

Regards,
Robert.

_______________________________________________
KDevelop-devel mailing list
KDevelop-develkdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinf
o/kdevelop-devel

Re: Refactoring support
country flaguser name
Germany
2008-02-26 18:55:28
On Wednesday 27 February 2008 01:29:36 Robert Knight wrote:
> Hello,
>
> Something that was mentioned as a long-term goal for
KDevelop, at
> Akademy I believe, was refactoring support for C++ and
possibly other
> languages.  This is the one aspect of an environment
like Eclipse/JDT
> which is I greatly miss when dealing with KDE code.  I
couldn't find
> any further documentation on the wiki about it though
so I'm not sure
> if it has been discussed in detail yet.  This is
something I'd be
> interested in helping to implement.
>
> I have been looking at the C++ language support (the
DUChain) in
> KDevelop 4 and it seems to be pretty good shape apart
from the lack of
> persistence - which I don't think is a problem for at
least getting
> the basics of a refactoring framework working.
>
> Any thoughts about how to proceed on this?
>
> Regards,
> Robert.

Hi! The underlying C++ support is in a that good shape, that
refactoring 
support is just around the corner. However a lot of testing
and small-bug 
fixing will be needed before it can actually be reliable.
Today I've tried 
for the first time enabling use-building(that means
recording all places 
where a declaration is used) globally while parsing
kdevelop, and the 
memory-usage and parsing-speed was not much higher than
without.

We could implement a refactoring user-interface right now
with just a few 
hundreds lines of code, but before it can actually be useful
we definitely 
need DUChain persistence, because the parsing is slow, and
the duchain needs 
too much memory to hold the whole thing in memory for a big
project.

However duchain persistence is not that easy, because at
least the C++ support 
part consists of many additional components that need to
work together 
seamlessly. It's a too big project for me to start because
of my limited 
time, so I try reducing my efforts to fixing bugs.

Kris Wong has written a mail to me last weekend that he
wants to start working 
on duchain persistence, however I don't know how far he's
gotten.

Btw. what exactly do you expect a "refactoring
framework" to do?

Greetings, David

_______________________________________________
KDevelop-devel mailing list
KDevelop-develkdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinf
o/kdevelop-devel

Re: Refactoring support
user name
2008-02-27 02:07:18
On 27.02.08 01:55:28, David Nolden wrote:
> Btw. what exactly do you expect a "refactoring
framework" to do?

What I'd expect:

- basics, like moving/renaming classes, members, functions -
everything
- creating getter/setter for member variables (including
proper
  namespace support)
- the "create stub implementation" feature of
kdev3 is also handy

Now the possibly harder things:

- extract a bunch of source lines from a code block and
create a
  function from that
- extract an interface or superclass from a class public
methods.
- implement methods from superclass (i.e. create stubs for
those)
- organize #include's, at least removing duplicates
- push/pull member functions through the inheritance
hierarchy
- replace occurrences of the class "Foo" with one
of its superclasses

Thats all for now.

In case you wonder: Thats stolen from eclipse, I left out
the stuff
which I didn't understand or doesn't make that much sense
for C++..

Andreas

-- 
You enjoy the company of other people.

_______________________________________________
KDevelop-devel mailing list
KDevelop-develkdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinf
o/kdevelop-devel

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )