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 235934

Summary: I think it is useless to leave [Introduce Constant / Variable] options in refactor
Product: java Reporter: ssazonov
Component: HintsAssignee: Ralph Ruijs <ralphbenjamin>
Status: RESOLVED INVALID    
Severity: normal    
Priority: P3    
Version: 7.4   
Hardware: PC   
OS: Windows 7   
Issue Type: ENHANCEMENT Exception Reporter:
Attachments: introduce

Description ssazonov 2013-09-13 12:46:06 UTC
I think it is useless to leave [Introduce Constant] and [Introduce Variable] options in refactor because existing [Introduce Field] can replace both tham.

Moreover:
- in Introduce Variable there is no option to set access type
- in Introduce Constant there is unused Declare Final checkbox
Comment 1 ssazonov 2013-09-13 12:46:35 UTC
Created attachment 140049 [details]
introduce
Comment 2 Ralph Ruijs 2013-09-13 13:08:33 UTC
(In reply to ssazonov from comment #0)
> I think it is useless to leave [Introduce Constant] and [Introduce Variable]
> options in refactor because existing [Introduce Field] can replace both tham.

I do not agree. Having the three options helps the user to quickly Introduce one of these, by hint / keyboard shortcut / refactoring menu, without having a complicated dialog presented to them. I think we want to support this more and, if possible, completely remove the need for such dialogs.

> Moreover:
> - in Introduce Variable there is no option to set access type

Local variables do not have an access specifier.

> - in Introduce Constant there is unused Declare Final checkbox

This could be removed, but I think the current state gives a clearer message to the user.


What about Introduce Paramater? This one is similar as well, but would make the configuration even more complicated.