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

Expose the anonymousToNest refactor more widely #1541

Merged
merged 1 commit into from
Sep 9, 2020

Conversation

jdneo
Copy link
Contributor

@jdneo jdneo commented Sep 9, 2020

This PR is to make the refactoring convert anonymous class to nested more widely.

Before, the refactor will only show on the simple name Foo in the example below

Before

public class E {
    public void test() {
        Foo foo = new /**/Foo/**/() {};
    }
}

Now we expand the its appearance to the whole class instance creation, which is the same behavior as the anonymous to lamda refactoring we have. (This refactor in IntelliJ also has a wider visibility)

Now

public class E {
    public void test() {
        Foo foo = new Foo(/*work as well*/) /*work as well*/{/*work as well*/};
    }
}

@fbricon fbricon merged commit 7d064d7 into eclipse-jdtls:master Sep 9, 2020
@fbricon
Copy link
Contributor

fbricon commented Sep 9, 2020

Thansk @jdneo!

@fbricon fbricon added this to the Mid September 2020 milestone Sep 9, 2020
@jdneo jdneo deleted the cs/anonymousToNested branch September 9, 2020 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants