Skip to content

Commit

Permalink
open file from type hierarchy when file not in workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
ghentschke committed Aug 24, 2023
1 parent c4d9f08 commit 524d81f
Showing 1 changed file with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -229,14 +229,7 @@ public void controlResized(ControlEvent e) {
public void doubleClick(final DoubleClickEvent event) {
var selection = ((IStructuredSelection) event.getSelection()).getFirstElement();
if (selection instanceof TypeHierarchyItem item) {
try {
var symbolsContainer = cachedSymbols.get(new URI(item.getUri()));
if (symbolsContainer != null) {
LSPEclipseUtils.open(symbolsContainer.file.getLocationURI().toASCIIString(), item.getSelectionRange());
}
} catch (URISyntaxException e) {
LanguageServerPlugin.logError(e);
}
LSPEclipseUtils.open(item.getUri(), item.getSelectionRange());
}
}
});
Expand Down

0 comments on commit 524d81f

Please sign in to comment.