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 247576 - Tabs cause code-format to break vertical alignment in Javadoc
Summary: Tabs cause code-format to break vertical alignment in Javadoc
Status: NEW
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: 2014-09-30 04:16 UTC by _ gtzabari
Modified: 2014-09-30 04: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 2014-09-30 04:16:32 UTC
Product Version: NetBeans IDE Dev (Build 201409270001)
Java: 1.8.0_20; Java HotSpot(TM) 64-Bit Server VM 25.20-b23
Runtime: Java(TM) SE Runtime Environment 1.8.0_20-b26
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

1. Given:

/**
 * @param owner  user who owns the row
 * @param toUser	the user owner is connecting to
 */

The first parameter contains two spaces between the parameter name and value. The second parameter contains one tab between the parameter name and value.

2. "Expand tabs to spaces" is unchecked
3. Invoke code-format.
4. Resulting Javadoc is:

/**
 * @param owner  user who owns the row
 * @param toUser	  the user owner is connecting to
 */

The first parameter retains two spaces. The second parameter has one tab, followed by two spaces.

That is, the code-format engine treats tabs as having a width of zero and adds spaces to compensate for their lack of indentation. This leads to an uneven vertical alignment between the two parameters.

Expected behavior: Parameter values should be vertically aligned.