pdt icon indicating copy to clipboard operation
pdt copied to clipboard

Newlines in PhpDOC

Open fpierrat opened this issue 3 years ago • 2 comments

I'm new to Eclipse, it seems an excellent IDE, but I get stuck on a very simple problem on which I can't find doc anywhere. When PhpDOC-commenting a function like this:

/**
 * Short description here.
 * 
 * Long desciption here line #01.
 * Long description continuing on line #02.
 * Long description third line etc, etc, etc...
 *  
 * @param unknown $arg01
 * @param unknown $arg02
 */
function myfunc($arg01, $arg02){
	....
}

I just can't see what to do to get my linebreaks shown (between line #01 and line #02, line #02 and line #03) when the coder's help appears on hovering on the function name. The whole long description text gets concatenated on a single line. The only way I found was to add '<br>' tags, but it can't be the way it has to be done, I don't want to be using HTML in PHP comments...

Can someone help me, give me a hint to the documentation place where I can find that? Thanks in advance.

phpdoc ?

fpierrat avatar Jan 12 '22 15:01 fpierrat

For now I can only suggest to disable comment formatting in profile

zulus avatar Jan 13 '22 12:01 zulus

Thanks for your answer. Where can I find a profile to configure?

[EDIT] Got it (Preferences/PHP/Code Style/Formatter) Thanks again

[EDIT2] I tryed, can't see any diffference, it's still rendered like in my screenshot above. Linebreaks are still ignored.

fpierrat avatar Jan 13 '22 13:01 fpierrat

I fix this with <pre>-Tags

fglueck avatar Feb 01 '23 09:02 fglueck

Thanks! Much smarter than the <br>-tags I finally added everywhere (and which besides don't solve any kind of indentation problems).

fpierrat avatar Feb 01 '23 09:02 fpierrat