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

Constant jumping due to Code lens updating #32877

Closed
aeschli opened this issue Aug 21, 2017 · 0 comments
Closed

Constant jumping due to Code lens updating #32877

aeschli opened this issue Aug 21, 2017 · 0 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug code-lens verified Verification succeeded
Milestone

Comments

@aeschli
Copy link
Contributor

aeschli commented Aug 21, 2017

Version 1.15.1

  • install the Java extension
  • create the following Java sample:
package com.aeschli.app;

public class B {

	public static void foo(int count) {
        if (count > 0) {
            
        }
	}

}

code-lens-jumping

  • note that editing is very hard due to the constant lens updating. Not clear why the lenses go away and appear at the same location again, maybe it's the cancel request.

Here's the JLS log (filtered to only show codelense and document change requests):

[Trace - 12:31:43 PM] Sending notification 'textDocument/didChange'.
..
[Trace - 12:31:43 PM] Sending request 'textDocument/codeLens - (349)'.
Params: {
    "textDocument": {
        "uri": "file:///home/aeschli/workspaces/samples/java-maven-hw/aeschli-app/src/main/java/com/aeschli/app/B.java"
    }
}


[Trace - 12:31:44 PM] Sending notification 'textDocument/didChange'.

[Trace - 12:31:44 PM] Sending notification '$/cancelRequest'.
Params: {
    "id": 349
}


[Trace - 12:31:44 PM] Sending request 'textDocument/codeLens - (350)'.
Params: {
    "textDocument": {
        "uri": "file:///home/aeschli/workspaces/samples/java-maven-hw/aeschli-app/src/main/java/com/aeschli/app/B.java"
    }
}

[Trace - 12:31:44 PM] Received response 'textDocument/codeLens - (349)' in 324ms. Request failed: The request (id: 349, method: 'textDocument/codeLens') has been cancelled (-32800).

[Trace - 12:31:44 PM] Received response 'textDocument/codeLens - (350)' in 204ms.
Result: [
    {
        "range": {
            "start": {
                "line": 4,
                "character": 20
            },
            "end": {
                "line": 4,
                "character": 23
            }
        },
        "data": [
            "file:///home/aeschli/workspaces/samples/java-maven-hw/aeschli-app/src/main/java/com/aeschli/app/B.java",
            {
                "line": 4,
                "character": 20
            },
            "references"
        ]
    },
    {
        "range": {
            "start": {
                "line": 2,
                "character": 13
            },
            "end": {
                "line": 2,
                "character": 14
            }
        },
        "data": [
            "file:///home/aeschli/workspaces/samples/java-maven-hw/aeschli-app/src/main/java/com/aeschli/app/B.java",
            {
                "line": 2,
                "character": 13
            },
            "references"
        ]
    }
]


[Trace - 12:31:45 PM] Sending request 'codeLens/resolve - (351)'.
Params: {
    "range": {
        "start": {
            "line": 2,
            "character": 13
        },
        "end": {
            "line": 2,
            "character": 14
        }
    },
    "data": [
        "file:///home/aeschli/workspaces/samples/java-maven-hw/aeschli-app/src/main/java/com/aeschli/app/B.java",
        {
            "line": 2,
            "character": 13
        },
        "references"
    ]
}


[Trace - 12:31:45 PM] Sending request 'codeLens/resolve - (352)'.
Params: {
    "range": {
        "start": {
            "line": 4,
            "character": 20
        },
        "end": {
            "line": 4,
            "character": 23
        }
    },
    "data": [
        "file:///home/aeschli/workspaces/samples/java-maven-hw/aeschli-app/src/main/java/com/aeschli/app/B.java",
        {
            "line": 4,
            "character": 20
        },
        "references"
    ]
}


[Trace - 12:31:45 PM] Sending notification 'textDocument/didChange'.

[Trace - 12:31:45 PM] Sending notification 'textDocument/didSave'.

[Trace - 12:31:45 PM] Received response 'codeLens/resolve - (351)' in 11ms.
Result: {
    "range": {
        "start": {
            "line": 2,
            "character": 13
        },
        "end": {
            "line": 2,
            "character": 14
        }
    },
    "command": {
        "title": "1 reference",
        "command": "java.show.references",
        "arguments": [
            "file:///home/aeschli/workspaces/samples/java-maven-hw/aeschli-app/src/main/java/com/aeschli/app/B.java",
            {
                "line": 2,
                "character": 13
            },
            [
                {
                    "uri": "file:///home/aeschli/workspaces/samples/java-maven-hw/aeschli-app/src/main/java/com/aeschli/app/App.java",
                    "range": {
                        "start": {
                            "line": 10,
                            "character": 8
                        },
                        "end": {
                            "line": 10,
                            "character": 9
                        }
                    }
                }
            ]
        ]
    },
    "data": [
        "file:///home/aeschli/workspaces/samples/java-maven-hw/aeschli-app/src/main/java/com/aeschli/app/B.java",
        {
            "line": 2,
            "character": 13
        },
        "references"
    ]
}


[Trace - 12:31:45 PM] Sending notification 'textDocument/didChange'.

[Trace - 12:31:45 PM] Received response 'codeLens/resolve - (352)' in 523ms.
Result: {
    "range": {
        "start": {
            "line": 4,
            "character": 20
        },
        "end": {
            "line": 4,
            "character": 23
        }
    },
    "command": {
        "title": "0 references",
        "command": "java.show.references",
        "arguments": [
            "file:///home/aeschli/workspaces/samples/java-maven-hw/aeschli-app/src/main/java/com/aeschli/app/B.java",
            {
                "line": 4,
                "character": 20
            },
            []
        ]
    },
    "data": [
        "file:///home/aeschli/workspaces/samples/java-maven-hw/aeschli-app/src/main/java/com/aeschli/app/B.java",
        {
            "line": 4,
            "character": 20
        },
        "references"
    ]
}


[Trace - 12:31:45 PM] Sending request 'textDocument/codeLens - (353)'.
Params: {
    "textDocument": {
        "uri": "file:///home/aeschli/workspaces/samples/java-maven-hw/aeschli-app/src/main/java/com/aeschli/app/B.java"
    }
}


[Trace - 12:31:45 PM] Sending notification 'textDocument/didChange'.

[Trace - 12:31:46 PM] Sending notification '$/cancelRequest'.
Params: {
    "id": 353
}


[Trace - 12:31:46 PM] Sending request 'textDocument/codeLens - (354)'.
Params: {
    "textDocument": {
        "uri": "file:///home/aeschli/workspaces/samples/java-maven-hw/aeschli-app/src/main/java/com/aeschli/app/B.java"
    }
}


[Trace - 12:31:46 PM] Received response 'textDocument/codeLens - (353)' in 323ms. Request failed: The request (id: 353, method: 'textDocument/codeLens') has been cancelled (-32800).

[Trace - 12:31:46 PM] Received response 'textDocument/codeLens - (354)' in 204ms.
Result: [
    {
        "range": {
            "start": {
                "line": 4,
                "character": 20
            },
            "end": {
                "line": 4,
                "character": 23
            }
        },
        "data": [
            "file:///home/aeschli/workspaces/samples/java-maven-hw/aeschli-app/src/main/java/com/aeschli/app/B.java",
            {
                "line": 4,
                "character": 20
            },
            "references"
        ]
    },
    {
        "range": {
            "start": {
                "line": 2,
                "character": 13
            },
            "end": {
                "line": 2,
                "character": 14
            }
        },
        "data": [
            "file:///home/aeschli/workspaces/samples/java-maven-hw/aeschli-app/src/main/java/com/aeschli/app/B.java",
            {
                "line": 2,
                "character": 13
            },
            "references"
        ]
    }
]


[Trace - 12:31:46 PM] Sending request 'codeLens/resolve - (355)'.
Params: {
    "range": {
        "start": {
            "line": 2,
            "character": 13
        },
        "end": {
            "line": 2,
            "character": 14
        }
    },
    "data": [
        "file:///home/aeschli/workspaces/samples/java-maven-hw/aeschli-app/src/main/java/com/aeschli/app/B.java",
        {
            "line": 2,
            "character": 13
        },
        "references"
    ]
}


[Trace - 12:31:46 PM] Sending request 'codeLens/resolve - (356)'.
Params: {
    "range": {
        "start": {
            "line": 4,
            "character": 20
        },
        "end": {
            "line": 4,
            "character": 23
        }
    },
    "data": [
        "file:///home/aeschli/workspaces/samples/java-maven-hw/aeschli-app/src/main/java/com/aeschli/app/B.java",
        {
            "line": 4,
            "character": 20
        },
        "references"
    ]
}


[Trace - 12:31:46 PM] Sending notification 'textDocument/didChange'.



[Trace - 12:31:46 PM] Received response 'codeLens/resolve - (355)' in 13ms.
Result: {
    "range": {
        "start": {
            "line": 2,
            "character": 13
        },
        "end": {
            "line": 2,
            "character": 14
        }
    },
    "command": {
        "title": "1 reference",
        "command": "java.show.references",
        "arguments": [
            "file:///home/aeschli/workspaces/samples/java-maven-hw/aeschli-app/src/main/java/com/aeschli/app/B.java",
            {
                "line": 2,
                "character": 13
            },
            [
                {
                    "uri": "file:///home/aeschli/workspaces/samples/java-maven-hw/aeschli-app/src/main/java/com/aeschli/app/App.java",
                    "range": {
                        "start": {
                            "line": 10,
                            "character": 8
                        },
                        "end": {
                            "line": 10,
                            "character": 9
                        }
                    }
                }
            ]
        ]
    },
    "data": [
        "file:///home/aeschli/workspaces/samples/java-maven-hw/aeschli-app/src/main/java/com/aeschli/app/B.java",
        {
            "line": 2,
            "character": 13
        },
        "references"
    ]
}


[Trace - 12:31:46 PM] Received response 'codeLens/resolve - (356)' in 19ms.
Result: {
    "range": {
        "start": {
            "line": 4,
            "character": 20
        },
        "end": {
            "line": 4,
            "character": 23
        }
    },
    "command": {
        "title": "0 references",
        "command": "java.show.references",
        "arguments": [
            "file:///home/aeschli/workspaces/samples/java-maven-hw/aeschli-app/src/main/java/com/aeschli/app/B.java",
            {
                "line": 4,
                "character": 20
            },
            []
        ]
    },
    "data": [
        "file:///home/aeschli/workspaces/samples/java-maven-hw/aeschli-app/src/main/java/com/aeschli/app/B.java",
        {
            "line": 4,
            "character": 20
        },
        "references"
    ]
}


[Trace - 12:31:47 PM] Sending notification 'textDocument/didChange'.

...
@aeschli aeschli changed the title Constant jumping due to Code lense updating. Constant jumping due to Code lense updating Aug 21, 2017
@aeschli aeschli changed the title Constant jumping due to Code lense updating Constant jumping due to Code lens updating Aug 21, 2017
@jrieken jrieken added the bug Issue identified by VS Code Team member as probable bug label Aug 21, 2017
@jrieken jrieken added this to the August 2017 milestone Aug 21, 2017
@mjbvz mjbvz added the verified Verification succeeded label Aug 31, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug code-lens verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

3 participants