This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 96670 - One line documentation has no word wrap
Summary: One line documentation has no word wrap
Status: VERIFIED FIXED
Alias: None
Product: uml
Classification: Unclassified
Component: Reporting (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Yang Su
URL:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2007-02-27 11:30 UTC by Sergey Petrov
Modified: 2007-08-07 19:01 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
screenshot of documentation in one long line (29.25 KB, image/png)
2007-08-07 08:24 UTC, Peter Lam
Details
model report html file (5.47 KB, text/plain)
2007-08-07 08:25 UTC, Peter Lam
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey Petrov 2007-02-27 11:30:14 UTC
reproducible with 070226_3, not reproducible in jse8.1

One line documentation has no word wrap (javadoc has and in jse8.1 all looks good).

steps:
1. create uml project
2. add class
3. add documentation "The UML Modeling project provides UML modeling features to
the <a
href="http://wiki.netbeans.org/wiki/view/NetBeansUserFAQ#section-NetBeansUserFAQ-UML">NetBeans
IDE</a>. UML modeling allows analysts and designers to design applications using
a standard modeling language. Developers are then able to generate source code
from the UML model and update the model from changes made in their source code. "
4. generate report
5. open class page in report
documentation is shown in one line without word wrapping.
Comment 1 Peter Lam 2007-02-28 19:27:27 UTC
I copied and pasted the text in the quotes and then removed anchors
"StartFragment" and "EndFragment" that were created in the Documentation window
 when the text was pasted. Then, the generated report has the text wrapped.
Comment 2 Sergey Petrov 2007-02-28 20:33:25 UTC
Did you remove extra newlines added by issuezilla? (see summary, documentation
should be in one line)
Comment 3 Yang Su 2007-03-01 19:01:43 UTC
OK, in order to address all the format issues we have to stop supporting mixed
use of two editors. Feedbacks seem to suggest users tend to close documentation
window to save space and invoke doc editor from property panel without knowing
it's a different one that expects raw html source for formatting. See issue
84368, issue 89654 issue 92129 issue 89650.

The suggested solution is to provide custom html editor for documentation
property, as seen in documentation window. Raw html source derived from the
presentation in the visual editor will be persisted and later retrieved for
display in the IDE and web report without additional format processing.

The visual html editor will be enhanced to allow user to view and edit ( not
recommended however ) the html source. 

It's targeted for the next release as the current code freeze has passed.

Comment 4 Yang Su 2007-07-30 18:08:03 UTC
removed <PRE> tag in html report documentation section after the fix to issue 89654 and various formatting issues.
Comment 5 Peter Lam 2007-08-07 08:23:18 UTC
verified in build 20070807-b2306.
The line is still a single line without wrapping in model report. See attached screenshot showing the <pre> tags when
the pointer stops at the documentation in the properties window. The attached generated html file from model report also
still shows the following line with "<pre>" tags.

<pre>The UML Modeling project provides UML modeling features to the &lt;a href=&quot;<a
href="http://wiki.netbeans.org/wiki/view/NetBeansUserFAQ#section-NetBeansUserFAQ-UML">http://wiki.netbeans.org/wiki/view/NetBeansUserFAQ#section-NetBeansUserFAQ-UML</a>&quot;&gt;NetBeans
IDE&lt;/a&gt;. UML modeling allows analysts and designers to design applications using a standard modeling language.
Developers are then able to generate source code from the UML model and update the model from changes made in their
source code.</pre></P><HR>
Comment 6 Peter Lam 2007-08-07 08:24:14 UTC
Created attachment 46243 [details]
screenshot of documentation in one long line
Comment 7 Peter Lam 2007-08-07 08:25:55 UTC
Created attachment 46244 [details]
model report html file
Comment 8 Yang Su 2007-08-07 08:49:16 UTC
The original issue is about adding <PRE> tag to documentation text for report that results in no word wrapping in html
display, it was corrected so that report takes documentation text (which is guaranteed in html format) without further
processing. In your case, the <PRE> tag is in the documentation raw html source, as seen in documentation property
tooltip and in html editor (no wrapping), it will be rendered in report the same way (WYSIWYG).

To test the fix, you just need to enter documentation a long line without linebreak and generate report to see how it
gets  rendered.   
Comment 9 Peter Lam 2007-08-07 09:03:30 UTC
I don't get it. Any text that I entered in the documentation window, I see the "<pre>" tags in the documentation
properties. Is this what the correct behaviour should be by automatically adding the "<pre>" tags to any text typed in
the documentation window?
Comment 10 Yang Su 2007-08-07 18:08:22 UTC
I see, you must have copied and pasted the pre-formatted text (with <PRE>) to the documentation text pane once, and got
into this situation where <PRE> sticks and all texts entered get enclosed in the tag.  

The current editor does not allow user to choose paragraph format (to specify 'body text', 'preformat', 'paragraph'
etc), once the format is set through copy & paste, it stays for the rest of editing. The workaround is to copy & paste
another text without <PRE> to the editor pane to reset the tag.

Ideally, the documentation editor should function like Thunderbird email composer, but currently, there's no plan for
further enhancement. 
Comment 11 Peter Lam 2007-08-07 19:01:21 UTC
Ok, I got it now. Looks like that's a separate issue unrelated to this one and this one is now fixed. 
The other issue is that I just copied the text from this issue desc and pasted into the documentation window for a class
and automatically get the "<pre>" tags. Even after deleting the pasted text, the "<pre>" tags are still hanging there as
seen from the Properties window.