Skip to content

Experimental paste handling blocks pasting while project loading #2924

@rgrunber

Description

@rgrunber

slow-paste-handler

[Trace - 11:43:42] Sending request 'workspace/executeCommand - (3)'.
Params: {
    "command": "java.edit.handlePasteEvent",
    "arguments": [
        "{\"location\":{\"range\":{\"start\":{\"line\":83,\"character\":0},\"end\":{\"line\":83,\"character\":0}},\"uri\":\"file:///home/rgrunber/git/lemminx/org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/XMLLanguageServer.java\"},\"text\":\"XMLLanguageServer\",\"formattingOptions\":{\"insertSpaces\":false,\"tabSize\":4}}"
    ]
}
...
...
[Trace - 11:43:56] Received response 'workspace/executeCommand - (3)' in 13986ms.
No result returned.

I tried inserting a breakpoint into the delegate to see if some part of the command was being blocked, but it seems like there's a good chunk of time where the language server hasn't received the request, yet the client is clearly waiting, so maybe this is the language client delaying the request until the server is ready.

CC @datho7561 , @CsCherrYY

Update: Note that regular pasting does work if done before the language server starts up, which is probably prior to onReady. That would at least seem to imply that onReady is not enough, and we need a stronger condition when registering the paste provider. Maybe ServiceReady or Started ?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    ✅ Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions