Skip to content

Commit

Permalink
handle DocumentSymbolWithURI
Browse files Browse the repository at this point in the history
  • Loading branch information
sebthom committed May 5, 2024
1 parent 6d3517e commit 0dcc051
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import org.eclipse.jdt.annotation.Nullable;
import org.eclipse.lsp4e.LSPEclipseUtils;
import org.eclipse.lsp4e.outline.SymbolsModel.DocumentSymbolWithFile;
import org.eclipse.lsp4e.outline.SymbolsModel.DocumentSymbolWithURI;
import org.eclipse.lsp4j.DocumentSymbol;
import org.eclipse.lsp4j.SymbolInformation;
import org.eclipse.lsp4j.WorkspaceSymbol;
Expand Down Expand Up @@ -66,8 +67,10 @@ public boolean test(@Nullable final Object candidate, @Nullable final String pro
final IFile file;
if (candidate instanceof final IFile f) {
file = f;
} else if (candidate instanceof final DocumentSymbolWithFile d) {
file = LSPEclipseUtils.getFileHandle(d.uri);
} else if (candidate instanceof final DocumentSymbolWithURI docSymbolWithURI) {
file = LSPEclipseUtils.getFileHandle(docSymbolWithURI.uri);
} else if (candidate instanceof final DocumentSymbolWithFile docSymbolWithFile) {
file = LSPEclipseUtils.getFileHandle(docSymbolWithFile.uri);
} else if (candidate instanceof DocumentSymbol) {
file = Editors.getActiveFile();
} else {
Expand Down

0 comments on commit 0dcc051

Please sign in to comment.