Author Topic: Javadoc/doxygen wrapping  (Read 595 times)

dunkers

  • Senior Community Member
  • Posts: 599
  • Hero Points: 27
Javadoc/doxygen wrapping
« 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?

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2205
  • Hero Points: 115
Re: Javadoc/doxygen wrapping
« Reply #1 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?

dunkers

  • Senior Community Member
  • Posts: 599
  • Hero Points: 27
Re: Javadoc/doxygen wrapping
« Reply #2 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.
« Last Edit: March 08, 2018, 08:05:12 pm by dunkers »

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2520
  • Hero Points: 367
Re: Javadoc/doxygen wrapping
« Reply #3 on: March 09, 2018, 03:05:21 pm »
Try turning off the "Preserve width on existing comments" option.

dunkers

  • Senior Community Member
  • Posts: 599
  • Hero Points: 27
Re: Javadoc/doxygen wrapping
« Reply #4 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...

dunkers

  • Senior Community Member
  • Posts: 599
  • Hero Points: 27
Re: Javadoc/doxygen wrapping
« Reply #5 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.

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2205
  • Hero Points: 115
Re: Javadoc/doxygen wrapping
« Reply #6 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.

dunkers

  • Senior Community Member
  • Posts: 599
  • Hero Points: 27
Re: Javadoc/doxygen wrapping
« Reply #7 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).

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2205
  • Hero Points: 115
Re: Javadoc/doxygen wrapping
« Reply #8 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.

dunkers

  • Senior Community Member
  • Posts: 599
  • Hero Points: 27
Re: Javadoc/doxygen wrapping
« Reply #9 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 :)