Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

HACK: Support eclipe.jdt.ls's break with the LSP spec #268

Open
winstliu wants to merge 1 commit into master
base: master
Choose a base branch
Loading
from wl-eclipse.jdt.ls-hack
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions lib/adapters/code-action-adapter.ts
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,20 @@ export default class CodeActionAdapter {
connection: LanguageClientConnection,
): Promise<void> {
if (Command.is(command)) {
await connection.executeCommand({
command: command.command,
arguments: command.arguments,
});
// eclipse.jdt.ls breaks with the spec and expects the client to handle the command
// https://github.com/eclipse/eclipse.jdt.ls/issues/376
if (command.command === 'java.apply.workspaceEdit') {
if (command.arguments) {
// Guaranteed only ever one element in the arguments array
const edit: WorkspaceEdit = command.arguments[0];
CodeActionAdapter.applyWorkspaceEdit(edit);
}
} else {
await connection.executeCommand({
command: command.command,
arguments: command.arguments,
});
}
}
}

Expand Down

AltStyle によって変換されたページ (->オリジナル) /