Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "Introduce parameter..." code action #1420

Closed
fbricon opened this issue Apr 27, 2020 · 0 comments · Fixed by #1507
Closed

Add "Introduce parameter..." code action #1420

fbricon opened this issue Apr 27, 2020 · 0 comments · Fixed by #1507

Comments

@fbricon
Copy link
Contributor

fbricon commented Apr 27, 2020

Given:

    public void foo(){
        greeting();
    }

    private void greeting() {
        System.out.println("Hello World");
    }

The "Hello World" string could be refactored as a method parameter to give:

    public void foo(){
        greeting("Hello World");
    }

    private void greeting(String text) {
        System.out.println(text);
    }

In Eclipse IDE and Intellij IDEA, this corresponds to the "Introduce Parameter..." refactoring.

extract-parameter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants