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 - I think it is useless to leave [Introduce Constant / Variable] options in refactor
Summary: I think it is useless to leave [Introduce Constant / Variable] options in ref...
Status: RESOLVED INVALID
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 7.4
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Ralph Ruijs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-13 12:46 UTC by ssazonov
Modified: 2013-09-13 13:08 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
introduce (56.64 KB, image/png)
2013-09-13 12:46 UTC, ssazonov
Details

Note You need to log in before you can comment on or make changes to this bug.
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.