SlickEdit Community

SlickEdit Product Discussion => SlickEdit® => Topic started by: dunkers on March 08, 2018, 01:16:40 pm

Title: Javadoc/doxygen wrapping
Post by: dunkers on March 08, 2018, 01:16:40 pm
I am trying to use javadoc comments but finding it impossible with wrap enabled. If I turn off wrap via ctl-w, this is what I want to type:
Code: [Select]
/**
 * @brief  A brief comment
 */

Simple enough, right? OK, so ctl-w turns wrap on and as soon as I type the space after 'A' (or make any other change later), I get this:

Code: [Select]
/**
 * @brief
 *  A
 *  brief
 *  comment
 */

Happens for any @ keyword, any length of text, any position of text, any wrap setting (other than off). I can't believe that no-one else has been hit with this, so clearly I have some clever thing set incorrectly.

Can anyone hazard a guess at how to fix this?
Title: Re: Javadoc/doxygen wrapping
Post by: Dan on March 08, 2018, 05:59:03 pm
Go to Document>Java Settings (I'm guessing that this is a Java file), and then click on Comment Wrap.  If you look at Column Width, is something there set too short?
Title: Re: Javadoc/doxygen wrapping
Post by: dunkers on March 08, 2018, 08:02:37 pm
It's a C file, and the set options are as per the screencap.

Edit: for comment width I tried fixed width and automatic. None of them make any difference.

It seems to me that the problem might be the start of the comment - "/**" - which sets the wrap column to 3.
Title: Re: Javadoc/doxygen wrapping
Post by: Dennis on March 09, 2018, 03:05:21 pm
Try turning off the "Preserve width on existing comments" option.
Title: Re: Javadoc/doxygen wrapping
Post by: dunkers on March 09, 2018, 03:17:58 pm
That seems to work!

Thanks very much. I am sure I tried that early on, but perhaps it's one I kept thinking I've tried before...
Title: Re: Javadoc/doxygen wrapping
Post by: dunkers on March 13, 2018, 02:12:27 am
Spoke too soon. Got another header file in which this is happening. Both C and C/C++ comment wrap options have "Preserve width on existing comments" unticked.
Title: Re: Javadoc/doxygen wrapping
Post by: Dan on March 13, 2018, 01:32:42 pm
Did you check comment settings for that document (from the menu)?  Some settings get restored per document.
Title: Re: Javadoc/doxygen wrapping
Post by: dunkers on March 13, 2018, 03:00:58 pm
Ah, no I didn't. But now you've pointed it out I will if it happens again (I can't remember which file it was, now).
Title: Re: Javadoc/doxygen wrapping
Post by: Dan on March 13, 2018, 03:29:16 pm
You could delete the perfile.xml from your config directory, but then you lose the stored cursor position for every file you re-open, among other things.
Title: Re: Javadoc/doxygen wrapping
Post by: dunkers on March 13, 2018, 03:54:13 pm
Thanks for the suggestion, Dan. It wouldn't be a big problem to lose the save cursor position one time, so I might try that if it occurs again. Good tip to know :)