Toggle Function Definition Feature [message #1844340] |
Thu, 09 September 2021 21:23 |
Utsav Trivedi Messages: 5 Registered: September 2021 |
Junior Member |
|
|
Hello Eclipse Community,
I'm using Code composer studio which is built on top of eclipse and when I try to toggle function definition from .h to .cpp file I have these questions and problems below. I had a quick look through other forums as well as C/C++ forums and didn't find any related posts.
1. Implementation in .h file becomes a inline method in .h file first and then moves to .cpp. Is there a way to skip creating inline function?
2. I have to wait for a few seconds before each toggle command else it throws an error (Cannot work without definition)
3. I can't select multiple methods and apply this feature. I want to be able to click on a class and move all implementations in .h file to .cpp instead of selecting one at at time.
Here is an example with Visual Studio: docs.wholetomato.com/default.asp
Im using CCS version: 10.3.1.00003
Thanks,
Utsav
[Updated on: Sun, 12 September 2021 21:25] Report message to a moderator
|
|
|
|
Re: Toggle Function Definition Feature [message #1844395 is a reply to message #1844368] |
Sun, 12 September 2021 21:28 |
Utsav Trivedi Messages: 5 Registered: September 2021 |
Junior Member |
|
|
Hello David,
Thanks for getting back. Ive asked in the third party forum before posting here. So far they dont know if it is possible and they checked these forums as well for an answer.
The base is pretty much eclipse and has a eclipse.ini file. How does one go about doing it in eclipse C/C++? It might give me a hint to change some of the behaviours listed in question.
Thanks,
Utsav
[Updated on: Sun, 12 September 2021 21:28] Report message to a moderator
|
|
|
|
Re: Toggle Function Definition Feature [message #1844428 is a reply to message #1844408] |
Mon, 13 September 2021 22:00 |
Utsav Trivedi Messages: 5 Registered: September 2021 |
Junior Member |
|
|
Hello David,
Thanks for being patient. I realised I pasted the wrong link and that will cause frustation for people. Apologies. Here is the feature. I'm talking about.
Move Method Implementations to Source File: https://docs.wholetomato.com/default.asp?W684
Eclipse Equivalent but only limited to single method: https://rtist.hcldoc.com/help/index.jsp?topic=%2Forg.eclipse.cdt.doc.user%2Ftasks%2Fcdt_t_toggle.htm
As for why cut and paste would not be an ideal approach or even recommended is because one might have to work on huge codebases created by others.
Definitions for C++ Class methods are .h or .hpp files where there are more than 50-70 definitions available. Cut and paste would take too much time and typing.
Currently eclipse base in Code Composer studio only has the option to move one method at a time.
One has to apply the refactoring feature twice in Code Composer Studio. From the second link in this reply, the definition is generated as a inline method directly in the .h or .hpp file and then moved to .cpp.
The delay and errors I face might only be limited to Code Composer Studio. I am not sure.
I just wanted some insight as to if it possible to refactor methods in .h/.hpp files the same way visual studio has.
Thanks,
Utsav
[Updated on: Mon, 13 September 2021 22:13] Report message to a moderator
|
|
|
|
Re: Toggle Function Definition Feature [message #1844434 is a reply to message #1844433] |
Tue, 14 September 2021 01:47 |
Utsav Trivedi Messages: 5 Registered: September 2021 |
Junior Member |
|
|
Hello David,
Thanks for putting the time in to look at this for me. Question number 2 has been answered. Ill try putting things in perspective.
Since Visual studio already has that feature and extensions, I've managed to get by copy pasting my header and source files seamlessly and quickly, but for that Ive had to create a new project in a different ide and move things over from Code Composer studio each time. I'd say its fair to declare this can be categorised as poor user experience and can be improved upon to provide a more "In-House" experience for developers :)
The motivation behind my post was to find out if there is a way to do this within eclipse and save even more time.
I'm unsure from your reply about question 1 and 3. So is right to assume this won't be possible? If you confirm I will close this post or whatever the procedure is. I have to look this up since I am a newcomer.
Thanks,
Utsav
[Updated on: Tue, 14 September 2021 03:12] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03899 seconds