Review Request: fix 'file already exists' in new class wizard by a bit of refactoring (essentially creating project model items earlier)

Andreas Pakulat apaku at gmx.de
Mon Apr 12 19:57:29 UTC 2010


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/3576/#review4990
-----------------------------------------------------------

Ship it!


I can't comment much on the technical side, but I do have to wonder wether coupling project items to the class wizard is a good idea. After all its imaginable to create classes without a project being open, just by specifying the where to put the final files...

Nonetheless I like fixed bugs, especially such confusing ones, so feel free to commit and let someone open a wish about that concern above.

- Andreas


On 2010-04-12 19:32:33, Milian Wolff wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/3576/
> -----------------------------------------------------------
> 
> (Updated 2010-04-12 19:32:33)
> 
> 
> Review request for KDevelop.
> 
> 
> Summary
> -------
> 
> refactors CppNewClass generation to create the ProjectFiles before the documentchangeset gets applied. This way we don't get these bugger messages about "file already exists" because the project file manager picks the file creations up (KDirWatch)... my former hack that queried the project file manager didn't work reliably, this should be a proper fix.
> 
> And imo it looks quite well also, much more encapsulated (yet the whole code could really benefit from a cleanup ;-)).
> 
> note: this works since generate() is called in the accept() method of the createclasswizard.
> 
> note2: the "problem" is when we create a class again, it's contents will just be added to the existing files, but afaik that should have been like that even before?
> 
> 
> This addresses bug https://bugs.kde.org/show_bug.cgi?id=234178.
>     https://bugs.kde.org/show_bug.cgi?id=https://bugs.kde.org/show_bug.cgi?id=234178
> 
> 
> Diffs
> -----
> 
>   /trunk/extragear/sdk/kdevelop/languages/cpp/codegen/cppnewclass.h 1114032 
>   /trunk/extragear/sdk/kdevelop/languages/cpp/codegen/cppnewclass.cpp 1114032 
>   /trunk/extragear/sdk/kdevelop/languages/cpp/codegen/simplerefactoring.cpp 1114032 
> 
> Diff: http://reviewboard.kde.org/r/3576/diff
> 
> 
> Testing
> -------
> 
> created a few classes
> 
> 
> Thanks,
> 
> Milian
> 
>





More information about the KDevelop-devel mailing list