On August 16, 2011, Christian Kamm wrote:
> Hello everyone,
> 
> the C++ editor in qtcreator/master just got a new feature that should be
> really useful and that I'd like feedback on. It is a way of automatically
> keeping function declarations and definitions in sync.
> 
> Whenever you edit a function signature Creator will check if it can find
> the matching declaration or definition. If it found it and thinks it can
> apply your changes there, a little light bulb will appear at the end of
> the function. Your options are:
> * Press Enter to apply the changes
> * Press Shift-Enter to apply the changes and jump to the changed location
> * Press Escape or move your cursor away to do nothing
> 
> Please give it a try and let me know what you think about it! Bug reports
> should still go to http://bugreports.qt.nokia.com though.
> 

I tried this new feature and I find it very interesting and useful.

I believe, though, that an uniformization or integration with the other 
refactoring tools would render this feature even more useful.

I.e., instead of the lightbulb to be the only way of getting to this feature 
(and require a mouse), perhaps it would be useful to activate a menu entry in 
the contextual menu associated with refactoring (and perhaps in 
Tools/C++/Refactor).

I guess that this menu entry could become active whenever the text cursor is 
located on a declaration of definition line that has a new modif which is not 
reflected in its pair.

Problems exists presently, also, with polymorphic functions. It would be 
rather complex to explain, but trying to play a bit with the synchronization 
tool in the case of polymorphic functions will easily help you see what I 
mean.

(The "add definition for new declaration" refactoring tool also has problems 
with polymorphic functions, thus probably it is a lack of infrastructure in 
the QtCreator core code (sorry, my level of the QtCreator code is still quite 
low)).

Thanks again for an excellent idea and for the implementation.

-- 
Cristian Tibirna
KDE developer .. [email protected] .. http://www.kde.org
_______________________________________________
Qt-creator mailing list
[email protected]
http://lists.qt.nokia.com/mailman/listinfo/qt-creator

Reply via email to