Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion org.eclipse.lsp4e/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Language Server Protocol client for Eclipse IDE (Incubation)
Bundle-SymbolicName: org.eclipse.lsp4e;singleton:=true
Bundle-Version: 0.19.12.qualifier
Bundle-Version: 0.19.13.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-21
Require-Bundle: org.eclipse.core.runtime;bundle-version="3.12.0",
org.eclipse.equinox.common;bundle-version="3.8.0",
Expand Down
2 changes: 1 addition & 1 deletion org.eclipse.lsp4e/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</parent>
<artifactId>org.eclipse.lsp4e</artifactId>
<packaging>eclipse-plugin</packaging>
<version>0.19.12-SNAPSHOT</version>
<version>0.19.13-SNAPSHOT</version>

<build>
<plugins>
Expand Down
10 changes: 7 additions & 3 deletions org.eclipse.lsp4e/src/org/eclipse/lsp4e/LSPEclipseUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import java.io.OutputStream;
import java.lang.reflect.Method;
import java.net.URI;
import java.nio.file.FileSystemNotFoundException;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Arrays;
Expand Down Expand Up @@ -432,12 +433,15 @@ public static CallHierarchyPrepareParams toCallHierarchyPrepareParams(int offset
}

public static @Nullable String getFileName(URI uri) {
final java.nio.file.Path path;
try {
return java.nio.file.Path.of(uri).getFileName().toString();
} catch (Exception e) {
path = java.nio.file.Path.of(uri);
} catch (IllegalArgumentException | FileSystemNotFoundException e) {
LanguageServerPlugin.logWarning("Failed to parse file name from URI " + uri, e); //$NON-NLS-1$
return null;
}
return null;
java.nio.file.Path fileName = path.getFileName();
return fileName == null ? null : fileName.toString();
}

public static int toEclipseMarkerSeverity(@Nullable DiagnosticSeverity lspSeverity) {
Expand Down
Loading