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 252219 - Code-format fails to handle multiline {@code}
Summary: Code-format fails to handle multiline {@code}
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 8.1
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-03 22:28 UTC by _ gtzabari
Modified: 2015-08-07 01:16 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ gtzabari 2015-05-03 22:28:17 UTC
Product Version: NetBeans IDE Dev (Build 201504240001)
Java: 1.8.0_45; Java HotSpot(TM) 64-Bit Server VM 25.45-b02
Runtime: Java(TM) SE Runtime Environment 1.8.0_45-b14
System: Windows 7 version 6.1 running on amd64; Cp1252; en_CA (nb)
User directory: C:\Users\Gili\AppData\Roaming\NetBeans\dev
Cache directory: C:\Users\Gili\AppData\Local\NetBeans\Cache\dev

Given a multiline {@code}:

	/**
	 * Creates a new assertion.
	 * <p>
	 * {@code
	 * boolean assertionsEnabled = false;
	 * assert (assertionsEnabled = true);
	 * }
	 * <p>
	 * @param enabled true if assertions are enabled for the class whose preconditions are being
	 *                verified
	 */

Netbeans transforms it to:

	/**
	 * Creates a new assertion.
	 * <p>
	 * {@code
	 * boolean assertionsEnabled = false;
	 * assert (assertionsEnabled = true);
	 * }
	 * <
	 * p>
	 * @param enabled true if assertions are enabled for the class whose preconditions are being
	 *                verified
	 */

Notice that the last <p> is transformed into:
<
p>
Comment 1 Dusan Balek 2015-08-06 12:26:00 UTC
Fixed in jet-main.

http://hg.netbeans.org/jet-main/rev/48c7bde1e0d1
Comment 2 Quality Engineering 2015-08-07 01:16:51 UTC
Integrated into 'main-silver', will be available in build *201508070002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/48c7bde1e0d1
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #252219 - Code-format fails to handle multiline {@code} - fixed.