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 198230

Summary: "Assign Return Value To New Variable" removes blank lines above
Product: editor Reporter: pekarna <pekarna>
Component: Formatting & IndentationAssignee: Dusan Balek <dbalek>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: P3    
Version: 7.0   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description pekarna 2011-05-02 01:57:16 UTC
STR:

1) Have a method with such code:
------------------------
int a = 1;

System.currentTimeMillis();
------------------------

2) Put the cursor to System
3) press Alt+Enter
4) Choose "Assign Return Value To New Variable"

Result:

------------------------
     int a = 1;
      long currentTimeMillis = System.currentTimeMillis();
------------------------

IMHO, this operation should not affect blank characters at all - simply prepend the type, variable name, and = (with respect to formatting settings).
Comment 1 pekarna 2011-05-02 02:02:32 UTC
Duplicate.

Other "Assign Return Value To New Variable" bugs:
http://netbeans.org/bugzilla/buglist.cgi?quicksearch=Assign+Return+Value+To+New+Variable

*** This bug has been marked as a duplicate of bug 150783 ***