Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Auto-format comments: tab deletion(Doxygen comments for class member variables lose their tabs, I don't want that.)
Auto-format comments: tab deletion [message #1714259] Wed, 11 November 2015 08:27 Go to next message
Alexander Meier is currently offline Alexander MeierFriend
Messages: 5
Registered: November 2013
Junior Member
Hello everyone,

I have the following problem: I have a member + Doxygen comment that looks like this:
int foo;                          /**< Some Doxygen comment */

When I hit Ctrl+Shift+F to auto-format, all the space between the member and the comment gets deleted, no matter whether they are spaces or tabs. I went through all auto-format options but I couldn't find a way to make the auto-formatter stop from doing that. The following comment-style doesn't work either:
int foo;                          ///< Some Doxygen comment

I use Eclipse for C++ on Linux. Can Eclipse do this somehow? And if it can't: Is there an auto-formatter available that lets me configure this? It doesn't have to be an Eclipse plugin, i.e. I'd be willing to use a separate software for this. I know in JAVA Eclipse you can use "// @formatter:off" and "// @formatter:on" to define blocks the formatter has to leave alone, but in C++ it doesn't work.

Cheers
Alex
Re: Auto-format comments: tab deletion [message #1714286 is a reply to message #1714259] Wed, 11 November 2015 11:49 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30208
Registered: July 2009
Senior Member
It's best to ask about CDT on the eclipse.tools.cdt forum.

On 11/11/2015 9:27 AM, Alexander Meier wrote:
> Hello everyone,
>
> I have the following problem: I have a member + Doxygen comment that
> looks like this:
> int foo; /**< Some Doxygen comment */
> When I hit Ctrl+Shift+F to auto-format, all the space between the
> member and the comment gets deleted, no matter whether they are spaces
> or tabs. I went through all auto-format options but I couldn't find a
> way to make the auto-formatter stop from doing that. The following
> comment-style doesn't work either:
> int foo; ///< Some Doxygen comment
> I use Eclipse for C++ on Linux. Can Eclipse do this somehow? And if it
> can't: Is there an auto-formatter available that lets me configure
> this? It doesn't have to be an Eclipse plugin, i.e. I'd be willing to
> use a separate software for this. I know in JAVA Eclipse you can use
> "// @formatter:off" and "// @formatter:on" to define blocks the
> formatter has to leave alone, but in C++ it doesn't work.
>
> Cheers
> Alex
Re: Auto-format comments: tab deletion [message #1714503 is a reply to message #1714286] Fri, 13 November 2015 09:44 Go to previous message
Alexander Meier is currently offline Alexander MeierFriend
Messages: 5
Registered: November 2013
Junior Member
Thanks, I'll do that.
Previous Topic:Can't install eclipse
Next Topic:Better timeouts for dependency resolution
Goto Forum:
  


Current Time: Wed Jun 19 15:37:28 GMT 2019

Powered by FUDForum. Page generated in 0.02480 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top