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 257539 - Code template for javadoc causes line breaks
Summary: Code template for javadoc causes line breaks
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.1
Hardware: PC Windows 7
: P3 normal with 1 vote (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-12 16:02 UTC by matthies
Modified: 2016-01-16 21:40 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 matthies 2016-01-12 16:02:10 UTC
After defining a javadoc code template "r" for "@return " (note the space at the end), when expanding the template from

    /**
     *  r<caret>
     */

the result is

    /**
     *  @return
     <caret>
     */

instead of the expected

    /**
     *  @return <caret>
     */

I.e. the space in the template is converted into a line break.

Template expansion is configured to "Reformat Text", but that shouldn't be causing the observed behavior.
Comment 1 Jiri Prox 2016-01-16 13:47:11 UTC
Reproducible

The problem is really with "Reformat text". I've set it to "Do nothing" and the problem disappeared.


Product Version: NetBeans IDE Dev (Build 201601150002)
Updates: Updates available
Java: 1.8.0_71; Java HotSpot(TM) 64-Bit Server VM 25.71-b15
Runtime: Java(TM) SE Runtime Environment 1.8.0_71-b15
System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb)
User directory: C:\Users\jprox\AppData\Roaming\NetBeans\dev
Cache directory: C:\Users\jprox\AppData\Local\NetBeans\Cache\dev
Comment 2 matthies 2016-01-16 21:40:41 UTC
If template expansion were configurable per individual template, it would indeed be a workaround to configure it differently for such templates.