Bug 39399 - New refactoring: Create constant from default value
Summary: New refactoring: Create constant from default value
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 3.0 M2   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-06-26 17:14 EDT by Gary Gregory CLA
Modified: 2003-07-18 06:59 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gary Gregory CLA 2003-06-26 17:14:44 EDT
Example:

Starting with:

    /** Maximum number of connections allowed per host */
    private int maxHostConnections = 2;   // Per RFC 2616 sec 8.1.4

You would get:

    /** Maximum number of connections allowed per host */
    public static final int MAX_HOST_CONNECTIONS = 2;   // Per RFC 2616 sec 8.1.4
    /** Maximum number of connections allowed per host */
    private int maxHostConnections = MAX_HOST_CONNECTIONS;   // Per RFC 2616 sec
8.1.4
Comment 1 Adam Kiezun CLA 2003-06-29 06:37:37 EDT
use ExtractConstant