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 quick fix for dead code. #558

Merged
merged 1 commit into from
Feb 23, 2018
Merged

Conversation

yaohaizh
Copy link
Contributor

Fix for #437

However, there is a bug from the VSCode side: microsoft/vscode#43878

@fbricon

@fbricon
Copy link
Contributor

fbricon commented Feb 21, 2018

Seems to work ok, however I find one behavior particularly annoying, and the same thing happens in Eclipse, with:

    public String getLastName() {
        if (true) {
            return "foo";
        }
        return "bar";
    }

applying the code action on unused "bar", we get:

    public String getLastName() {
        {
            return "foo";
        }
    }

@yaohaizh can you see if getting rid of those surrounding braces is doable? And if you find a solution, you could submit a patch to JDT upstream (https://bugs.eclipse.org/bugs/show_bug.cgi?id=531501)

@fbricon
Copy link
Contributor

fbricon commented Feb 23, 2018

@yaohaizh if you can't fix the extra brackets issue now, go ahead and merge this PR so that you can work on testing on #567

@yaohaizh yaohaizh merged commit a2e1236 into eclipse-jdtls:master Feb 23, 2018
@fbricon
Copy link
Contributor

fbricon commented Feb 23, 2018

@yaohaizh thanks for the new feature!

Please don't create merge commits. Use either Squash and Merge if you have multiple commits or else Rebase and Merge

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

Successfully merging this pull request may close these issues.

2 participants