History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEABKL-5409
Type: New Feature New Feature
Status: Open Open
Priority: Normal Normal
Assignee: Unassigned
Reporter: Eugene Kirpichov
Votes: 0
Watchers: 1
Available Workflow Actions

Mark as Stalled
Operations

If you were logged in you would be able to see more operations.
IDEA: Backlog

"Convert constant to field" intention

Created: 15 Apr 08 19:29   Updated: 16 Jun 08 20:07
Component/s: Editor. Intention Actions, Refactoring
Affects Version/s: None
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown

Build: 8,280


 Description  « Hide
Sometimes I have private static final constants that I'd like to make configurable.
I have to do this by hand, t.i. rename them from uppercase to camelcase, remove the 'static final' modifiers and introduce setters for them.

Would be nice to have an intention for that over constant fields: it should prompt:

  • whether I'd like to introduce a setter, constructor argument or none
  • whether I'd like to initialize the field in its declaration, initializer or constructor
  • name of the field, default is original name camelcased


 All   Comments   Work Log   Change History      Sort Order:
Dmitry Jemerov - 16 Jun 08 19:50
You suggest to have so many prompts that the time saved compared to perform all these steps manually is minimal. One thing which we can do (you can file a separate JIRA request for this) is make it easier to rename the field by offering the camel-cased name as a suggestion in the combobox.

Eugene Kirpichov - 16 Jun 08 20:07
If these prompts are in a single dialog and have sensible default values, then the time saved is more noticeable.
However, now this issue seems a lot less important to me than it was when I reported it