eclipse-lsp4e / eclipse-lsp4e/lsp4e

Operation "Open Symbol in Workspace" does not work on external file

Open
#643 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
85
Forks
69
Avg merge
8h 33m
Merged PRs (30d)
6

Description

The "Open Symbol in Workspace" operation fails when triggered by Ctrl+Shift+T and the active editor has opened a file outside the workspace (and a LS is enabled on it).

Reason: The current implementation in
org.eclipse.lsp4e.operations.symbols.LSPSymbolInWorkspaceHandler.execute(ExecutionEvent)
work only for editor input from within a workspace resource.

Possible solution: When resource == null use a method like LanguageServers.forUri(...) to determine the LS.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in org.eclipse.lsp4e.operations.symbols.LSPSymbolInWorkspaceHandler.execute(ExecutionEvent) and trace how the language server is selected when the editor input has no workspace resource. Investigate LanguageServers.forUri(...) as suggested. Done means Ctrl+Shift+T successfully opens symbols for an external file with a language server enabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.