Mass replacement in GrepView : mock-up

Andreas Pakulat apaku at gmx.de
Tue Oct 26 17:40:48 UTC 2010


On 26.10.10 19:07:51, Julien Desgats wrote:
> Hey all,
> I'm currently working on an implementation of replace in files in grepview
> plugin for a university project (see
> http://gitorious.org/+kdevelop-developers/kdevelop/devel-kdevplatform/commits/findreplace
> ).
> 
> As of today, we managed to batch replace patterns in files, but we want to
> make a more convenient way to do mass replace. You can find a mock-up of
> what we want to do on KDevelop wiki :
> http://www.kdevelop.org/mediawiki/index.php?title=Find-replace#Mock-up
> 
> All feedbacks are welcome.

Looks good and is similar to what the replace-in-files plugin in
KDevelop3, except that back then one had to provide the replacement-text
before starting the whole thing.

One thing that I didn't quite understand is the 'open files that are to
be modified', do you mean open a text editor for each file where a
replacement occurs? IMHO thats not good, in KDev3 days I've used for
real mass-replace, i.e. a few hundred files. I wouldn't want all those to
be opened up in the editor.

What would be good though is a short preview of how the code will look
like after the replacement (thats obviously easier when one has to
provide the replacement before starting the search). That way one can
more easily decide wether the occurrence is to be replaced or not.
Ideally with 2-3 files of before/after context. Not sure how to
integrate that into the gui without making the tree harder to navigate,
maybe a tooltip?

Andreas

-- 
You'll be called to a post requiring ability in handling groups of people.




More information about the KDevelop-devel mailing list