File tree Expand file tree Collapse file tree
org.eclipse.lsp4e/src/org/eclipse/lsp4e/operations/symbols/internal Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ private SymbolIconProvider getIconProvider(Object symbol) {
108108
109109 String fileName = null ;
110110 try {
111- fileName = Path . of ( uri . getPath ()). getFileName (). toString ( );
111+ fileName = getFileName (uri );
112112 } catch (Exception e ) {
113113 LanguageServerPlugin .logWarning ("Failed to parse file name from URI " + uri , e ); //$NON-NLS-1$
114114 return defaultIconProvider ;
@@ -129,6 +129,10 @@ private SymbolIconProvider getIconProvider(Object symbol) {
129129 return defaultIconProvider ;
130130 }
131131
132+ private String getFileName (URI uri ) {
133+ return Path .of (uri ).getFileName ().toString ();
134+ }
135+
132136 private @ Nullable URI getUri (Object symbol ) {
133137 return switch (symbol ) {
134138 case SymbolInformation info -> toUri (info .getLocation ().getUri ());
You can’t perform that action at this time.
0 commit comments