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 249755 - "Assign return value to new variable" functionality broken (not offered anymore)
Summary: "Assign return value to new variable" functionality broken (not offered anymore)
Status: REOPENED
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 8.0.2
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-12 14:27 UTC by tln
Modified: 2018-01-24 15:56 UTC (History)
1 user (show)

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 tln 2015-01-12 14:27:54 UTC
Hi,

at some time in December the "Assign return value to new variable" functionality suddendly got lost from my existing NetBeans installation. This means upon hitting Alt+Enter on a method call with a return value nothing is happening anymore. This means the functionality is not not only not working, it's no longer offered in the first place. It's as if it never existed.
I also tried it in a simple Java project.

For me this is quite a problem. In my current project I'm working with very complex datastructures with lots of inner classes etc. With aforementioned functionality not there there's a lot of additional manual work as compared to earlier. This feature was really great, and I'd really appreciate if it could be fixed.

Other functionality (e.g. "Use Arrays.hashCode()") upon Alt+Enter is still available if applicable.

My NetBeans installation is about 7 months old and has been updated by automatic updates since. It seems that one of these updates damaged it.

Thanks for looking into it.
Comment 1 Svata Dedic 2015-02-13 15:16:13 UTC
Please check if you didn't accidentally disabled the hint - open Tools | Options - Editor - Hints, select Java, and in the search box, type "assign return". This limits the display to the suggestion.

If enabled, please check on several different sources, even more simplistic ones. 

If still no luck, please zip your $nbuser/config area and attach here. Thanks.
Comment 2 tln 2015-02-13 18:12:22 UTC
Hi Svata,

the checkbox you mentioned was indeed turned off. Now that I've turned it back on the feature is restored. Thanks.
I'm 99% sure I didn't disable it myself, not even accidentally. If none of the updates officially disabled the feature for any reason, it would be a little weird. Anyway, ... next time I know where to look. Thanks again.
Comment 3 vanob 2017-09-08 10:31:55 UTC
I've stumbled upon this bug too.
NetBeans 8.2, jdk 1.8, Windows 7
I did not open Options window in months. It suddenly stopped working. I checked it again in the Options as suggested and it started working again.

I have some exceptions in my Messages.log.
I can attach it if needed.
Comment 4 dazed 2018-01-24 15:56:04 UTC
(In reply to vanob from comment #3)
> I've stumbled upon this bug too.
> NetBeans 8.2, jdk 1.8, Windows 7
> I did not open Options window in months. It suddenly stopped working. I
> checked it again in the Options as suggested and it started working again.
> 
> I have some exceptions in my Messages.log.
> I can attach it if needed.

I also had this problem - BUT I suspect that quick (mis)keying disabled this.  With the hint enabled - alongside "Assign Return Value to New Variable" there is an arrow ">" drop-down menu with an option to "Disable ... suggestion".  I suspect accidentally selecting this is the likely reason for the suggestion disappearing.  i.e. hitting "right-arrow" + "Enter" rather than "Enter" on it's own.