This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Create function declaration in .h when definition is created in .cpp file | ||
---|---|---|---|
Product: | cnd | Reporter: | antoniocs <antoniocs> |
Component: | Editor | Assignee: | Alexander Simon <alexvsimon> |
Status: | NEW --- | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | Dev | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | ENHANCEMENT | Exception Reporter: |
Description
antoniocs
2017-04-28 16:39:42 UTC
Hello Antonio, yes, it is possible to implement. Thanks for the enhancement report. For now I can recommend to use reverse steps: - declare method foo (in appropriate private/protected/public section) in header inside class - switch to source file (Ctrl+Shift+A) - invoke code completion on empty line in file scope (between other methods) - use "generate foo" It saves quite a few time for me ;-) Btw, http://wiki.netbeans.org/NewAndNoteworthyNB80#C.2FC.2B.2B there is also "Extract method body from class declaration" Thanks Vladimir Voskresensky. I never thought about doing it that way but I can see the benefits. (thanks also for the shortcut to switch between .h and .cpp and vice-versa). Not sure how to utilize the "Extract method body from class declaration" feature you linked to. I always feel that for C++, netbeans is good IDE but the documentation/examples are always behind Java or PHP. Thanks again. > Not sure how to utilize the "Extract method body from class declaration"
> feature you linked to.
I use it when inline-method in class body grows from one line to multiple, i.e. impl need to use declarations which were not in #include sections for header, but now are needed for impl.
So just go to source and extract body... then add #include only in source file reducing (re)compilation time.
|