Skip to content

Commit bbcafd7

Browse files
committed
fix: do not log exception if provider identified by the URI's scheme
component is not installed
1 parent 266c22d commit bbcafd7

3 files changed

Lines changed: 11 additions & 8 deletions

File tree

org.eclipse.lsp4e/META-INF/MANIFEST.MF

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
22
Bundle-ManifestVersion: 2
33
Bundle-Name: Language Server Protocol client for Eclipse IDE (Incubation)
44
Bundle-SymbolicName: org.eclipse.lsp4e;singleton:=true
5-
Bundle-Version: 0.19.11.qualifier
5+
Bundle-Version: 0.19.12.qualifier
66
Bundle-RequiredExecutionEnvironment: JavaSE-21
77
Require-Bundle: org.eclipse.core.runtime;bundle-version="3.12.0",
88
org.eclipse.equinox.common;bundle-version="3.8.0",

org.eclipse.lsp4e/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
</parent>
1111
<artifactId>org.eclipse.lsp4e</artifactId>
1212
<packaging>eclipse-plugin</packaging>
13-
<version>0.19.11-SNAPSHOT</version>
13+
<version>0.19.12-SNAPSHOT</version>
1414

1515
<build>
1616
<plugins>

org.eclipse.lsp4e/src/org/eclipse/lsp4e/internal/files/FileSystemWatcherManager.java

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
package org.eclipse.lsp4e.internal.files;
1414

1515
import java.net.URI;
16+
import java.nio.file.FileSystemNotFoundException;
1617
import java.nio.file.Path;
1718
import java.nio.file.Paths;
1819
import java.util.ArrayList;
@@ -50,14 +51,16 @@ public final class FileSystemWatcherManager {
5051

5152
public FileSystemWatcherManager(final @Nullable IProject project) {
5253
Path watchedFilesBasePath = null;
54+
if (project != null) {
5355
try {
54-
if (project != null) {
55-
final var loc = project.getLocationURI();
56-
if (loc != null)
57-
watchedFilesBasePath = Paths.get(loc);
56+
final var loc = project.getLocationURI();
57+
if (loc != null)
58+
watchedFilesBasePath = Paths.get(loc);
59+
} catch (IllegalArgumentException ex) {
60+
LanguageServerPlugin.logError(ex);
61+
} catch (FileSystemNotFoundException ex) {
62+
LanguageServerPlugin.logWarning("Watched files notification disabled for project " + project.getName() + " because of: " + ex.getMessage()); //$NON-NLS-1$ //$NON-NLS-2$
5863
}
59-
} catch (IllegalArgumentException ex) {
60-
LanguageServerPlugin.logError(ex);
6164
}
6265
this.basePath = watchedFilesBasePath;
6366
}

0 commit comments

Comments
 (0)