File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 11diff --git a/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/protocol/LspServerTelemetryManager.java b/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/protocol/LspServerTelemetryManager.java
2- index d82646afb1..5018896480 100644
2+ index d82646afb1..a4a1b53e26 100644
33--- a/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/protocol/LspServerTelemetryManager.java
44+++ b/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/protocol/LspServerTelemetryManager.java
55@@ -21,6 +21,7 @@ package org.netbeans.modules.java.lsp.server.protocol;
@@ -339,14 +339,14 @@ index d82646afb1..5018896480 100644
339339
340340+ boolean previewEnabled;
341341+ previewEnabled = source != null && isPreviewEnabledForSource(source);
342- + if (!previewEnabled && prjType == ProjectType.gradle ) {
342+ + if (!previewEnabled) {
343343+ assert prj != null;
344344+ FileObject prjRoot = prj.getProjectDirectory();
345345+ String relativePath = prjRoot == null ? null : FileUtil.getRelativePath(prjRoot, source);
346346+ if (relativePath == null || relativePath.isEmpty()) {
347347+ // The source is not inside the project root, and,
348348+ // so the project contents need to be checked for preview-enabled
349- + previewEnabled = previewEnabled || isPreviewEnabledForAnyProjectSourceRoot(prj);
349+ + previewEnabled = isPreviewEnabledForAnyProjectSourceRoot(prj);
350350+ previewEnabled = previewEnabled || isPreviewEnabledForAnyContainedProjects(prj);
351351+ }
352352+ }
You can’t perform that action at this time.
0 commit comments