Bug 93459 - [formatter] HTML tags in Javadoc sometimes don't get wrapped
Summary: [formatter] HTML tags in Javadoc sometimes don't get wrapped
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P5 minor (vote)
Target Milestone: 4.6 M7   Edit
Assignee: Mateusz Matela CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-02 17:23 EDT by Gary Gregory CLA
Modified: 2016-04-26 05:10 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gary Gregory CLA 2005-05-02 17:23:55 EDT
Version: 3.1.0
Build id: I20050401-1645

A Javadoc 120 max line width limit is not applied to:

    /**
     * <p>
     * Returns whether the named charset is supported.
     * </p>
     * <p>
     * This is similar to <a
     *
href="http://java.sun.com/j2se/1.4.2/docs/api/java/nio/charset/Charset.html#isSupported(java.lang.String)">java.nio.charset.Charset.isSupported(String)</a>
     * </p>
     * 
     * @param name
     *            the name of the requested charset; may be either a canonical
name or an alias
     * @return <code>true</code> if, and only if, support for the named charset
is available in the current Java
     *         virtual machine
     * 
     * @see <a
href="http://java.sun.com/j2se/1.3/docs/api/java/lang/package-summary.html#charenc">JRE
character
     *      encoding names</a>
     */

Note that the @see properly breaks the line appart in the <a>.
Comment 1 Dani Megert CLA 2005-05-03 06:54:42 EDT
The link cannot be broken more appart than:

href=
"
https://bugs.eclipse.org/bugs/show_bug.cgi?id=61725
">Some Text</a>

Adding a break after '">' and 'Some Text</a>' is not OK since this would add a
space.
Comment 2 Dani Megert CLA 2005-10-10 12:05:24 EDT
Ownership changed.
Comment 3 Frederic Fusier CLA 2008-08-18 08:06:52 EDT
Ownership has changed for the formatter, but I surely will not have enough time to fix your bug during the 3.5 development process, hence set its priority to P5.
Please provide a patch if you definitely need the bug to be fixed in this version and I'll have a look at it...
TIA
Comment 4 Mateusz Matela CLA 2016-04-23 12:29:07 EDT
Fixed with http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=a5f9b84c6743f892b63f4aa51b257e7f6671437f

(In reply to Dani Megert from comment #1)
> The link cannot be broken more appart than:
> 
> href=
> "
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=61725
> ">Some Text</a>
> 
> Adding a break after '">' and 'Some Text</a>' is not OK since this would add
> a space.

Adding whitespace at the beginning or end of URL also seems fishy, so I didn't implement it. Just fixed wrapping on the equal sign, which sometimes didn't work. For other places, user can manually insert a space so that formatter can wrap there.
Comment 5 Jay Arthanareeswaran CLA 2016-04-26 05:10:51 EDT
Verified for 4.6 M7 with build I20160425-1300