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 238724 - Clicking "Assign Return value to new variable" hint removes previous blank lines
Summary: Clicking "Assign Return value to new variable" hint removes previous blank lines
Status: RESOLVED WONTFIX
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 7.4
Hardware: PC Linux
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-22 22:41 UTC by adithyank
Modified: 2016-07-07 07:18 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
screen shot for showing this sequence of actions (28.22 KB, image/png)
2013-11-22 22:42 UTC, adithyank
Details

Note You need to log in before you can comment on or make changes to this bug.
Description adithyank 2013-11-22 22:41:59 UTC
Product Version = NetBeans IDE 7.4 (Build 201310111528)
Operating System = Linux version 2.6.32-358.23.2.el6.i686 running on i386
Java; VM; Vendor = 1.7.0_45
Runtime = Java HotSpot(TM) Client VM 24.45-b08


1. I am typing below code in editor


    public static void main(String[] args)
    {
	int i = 10;

/*40*/	new ArrayList<String>();
    }

2. Now pressing ALT+ENTER in line 40
3. Assign return value to new variable hint appears
4. I click the hint
5. Suddenly the code becomes as follows

    public static void main(String[] args)
	{
		int i = 10;
		ArrayList<String> arrayList = new ArrayList<String>();
	}

6. It erases all the blank lines above the line where I clicked the above mentioned hint

It should not erase the previous blank lines. It should assign the return value in the same line itself. 
The blank line is usually kept for separating some code blocks for better code readability.

Attaching screen shot for showing this sequence of actions
Comment 1 adithyank 2013-11-22 22:42:54 UTC
Created attachment 142503 [details]
screen shot for showing this sequence of actions
Comment 2 Martin Balin 2016-07-07 07:18:25 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss