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

5485 apply workspace edit #5955

Merged
merged 2 commits into from
Sep 7, 2017

Conversation

tsmaeder
Copy link
Contributor

@tsmaeder tsmaeder commented Aug 9, 2017

What does this PR do?

Adds a "ApplyWorkspaceEditAction" that applies a LSP WorkspaceEdit to many files both open in and editor or not.

What issues does this PR fix or reference?

#5485

Changelog

Added "ApplyWorkspaceEditAction" to allow LSP code actions to edit multiple files at once.

Release Notes

Added "ApplyWorkspaceEditAction" to allow LSP code actions to edit multiple files at once.

Docs PR

eclipse-che/che-docs#271

@codenvy-ci
Copy link

Can one of the admins verify this patch?

1 similar comment
@codenvy-ci
Copy link

Can one of the admins verify this patch?

@benoitf
Copy link
Contributor

benoitf commented Aug 9, 2017

ci-build

@codenvy-ci
Copy link

Build # 3322 - FAILED

Please check console output at https://ci.codenvycorp.com/job/che-pullrequests-build/3322/ to view the results.

@benoitf
Copy link
Contributor

benoitf commented Aug 9, 2017

@tsmaeder build is failing with

[WARNING] Missing header in: /home/codenvy/workspace/che-pullrequests-build/wsagent/che-core-api-languageserver-shared/src/test/java/org/eclipse/che/api/languageserver/shared/util/StringStreamEditor.java
[WARNING] Missing header in: /home/codenvy/workspace/che-pullrequests-build/wsagent/che-core-api-languageserver-shared/src/test/java/org/eclipse/che/api/languageserver/shared/util/StreamEditorTest.java
[WARNING] Missing header in: /home/codenvy/workspace/che-pullrequests-build/wsagent/che-core-api-languageserver-shared/src/main/java/org/eclipse/che/api/languageserver/shared/util/CharSource.java
[WARNING] Missing header in: /home/codenvy/workspace/che-pullrequests-build/wsagent/che-core-api-languageserver-shared/src/main/java/org/eclipse/che/api/languageserver/shared/util/CharSink.java
[WARNING] Missing header in: /home/codenvy/workspace/che-pullrequests-build/wsagent/che-core-api-languageserver-shared/src/main/java/org/eclipse/che/api/languageserver/shared/util/PositionComparator.java
[WARNING] Missing header in: /home/codenvy/workspace/che-pullrequests-build/wsagent/che-core-api-languageserver-shared/src/main/java/org/eclipse/che/api/languageserver/shared/util/RangeComparator.java
[WARNING] Missing header in: /home/codenvy/workspace/che-pullrequests-build/wsagent/che-core-api-languageserver-shared/src/main/java/org/eclipse/che/api/languageserver/shared/util/CharStreamEditor.java
[WARNING] Missing header in: /home/codenvy/workspace/che-pullrequests-build/wsagent/che-core-api-languageserver-shared/src/main/java/org/eclipse/che/api/languageserver/shared/model/FileEditParams.java


private File createTempIoFile(VirtualFile parent, String prefix, String suffix) throws IOException {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't use parameters prefix and suffix - may be makes sense to remove them.

@benoitf
Copy link
Contributor

benoitf commented Aug 16, 2017

ci-build

@codenvy-ci
Copy link


private void writeAndCount(int ch, Consumer<Integer> dest) {
dest.accept(ch);
if (ch == '\r') {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we avoid empty block?

return new Supplier<Integer>() {
@Override
public Integer get() {
try {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

formatting issue

Copy link
Contributor

@vparfonov vparfonov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

basically ok for me, except a lot of formatting issues

@Override
public void accept(Integer ch) {
try {
w.write(ch);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

formatting issue

};
}

}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new line

public class PositionComparator implements Comparator<Position> {

@Override
public int compare(Position o1, Position o2) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

formatting issue

@vparfonov
Copy link
Contributor

@tsmaeder When do you plan merge it?

@tsmaeder
Copy link
Contributor Author

tsmaeder commented Sep 6, 2017

@vparfonov I was asking on the Eclipse Che Mattermost if we need additional review, since I've done some small changes.
Otherwise as soon as I've rebased it (again ;-))

Signed-off-by: Thomas Mäder <tmader@redhat.com>
Signed-off-by: Thomas Mäder <tmader@redhat.com>
@benoitf
Copy link
Contributor

benoitf commented Sep 6, 2017

ci-build

Copy link
Contributor

@vparfonov vparfonov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, we will run nightly test with your branch

@codenvy-ci
Copy link

@vparfonov vparfonov merged commit 7faecba into eclipse-che:master Sep 7, 2017
@slemeur
Copy link
Contributor

slemeur commented Sep 7, 2017

@vparfonov : As a maintainer, you have to ensure the PRs are merged with appropriate labels and milestone. Thanks

@vparfonov vparfonov added the kind/enhancement A feature request - must adhere to the feature request template. label Sep 8, 2017
@vparfonov vparfonov added this to the 5.18.0 milestone Sep 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement A feature request - must adhere to the feature request template.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants