Automatic code refactoring

Richard Dale Richard_Dale at tipitina.demon.co.uk
Tue Mar 1 12:28:03 UTC 2005


On Monday 28 February 2005 17:02, Calvin Spealman wrote:
> I'm looking into contributing to KDevelop's support of the Python
> programming language, and one of the things I want to do is add refactoring
> features (a'la Bicycle Repair Man). For example, being able to rename
> methods and classes in scope-smart fashions, across multiple modules.
Excellent! But what about using Bicycle Repair Man, and just adding a UI to 
it? That's what Eric3 does, as otherwise you'd have to re-write it.

> I don't see anything in the documentation of how the language parts work,
> as to how this could be accomplished. Idealing, I want to add a menu and/or
> contex sub-menu when working with Python files. Does anyone have any
> suggestions?
>
> Also, I see parsing of source seems to be done in completely arbitrary ways
> by different language parts. What about building in a EBNF parser that
> could make parsing of all languages much more advanced. This could make
> scope identification easier for refactoring features like this, as well as
> the autocomplete mechanisms.
At the moment the ruby class parser uses just regular expressions, and it 
isn't much more complicated than the python one. I'd like to improve it for 
KDevelop 3.3 by using the actual ruby 1.8.2 bison grammar and tokeniser. But 
I don't see any need for a common parser as long as the things we do with the 
parsed data is language independent, which it is at present.

-- Richard




More information about the KDevelop-devel mailing list