From ced66b1468426fbda45b2473196d9f37d5608870 Mon Sep 17 00:00:00 2001 From: Subhash Arabhi Date: Wed, 30 Apr 2025 12:49:10 +0530 Subject: [PATCH] Patch for changes for mainSource variable Naming changes --- build.xml | 1 + patches/8470-draft.diff | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 patches/8470-draft.diff diff --git a/build.xml b/build.xml index bd9f67d..d400bfb 100644 --- a/build.xml +++ b/build.xml @@ -59,6 +59,7 @@ patches/7893-draft.diff patches/8442-draft.diff patches/8460-draft.diff + patches/8470-draft.diff patches/disable-error-notification.diff patches/mvn-sh.diff patches/project-marker-jdk.diff diff --git a/patches/8470-draft.diff b/patches/8470-draft.diff new file mode 100644 index 0000000..b03ca27 --- /dev/null +++ b/patches/8470-draft.diff @@ -0,0 +1,18 @@ +diff --git a/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/debugging/launch/NbLaunchDelegate.java b/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/debugging/launch/NbLaunchDelegate.java +index 01d92d5c82a3..49676ecae0a7 100644 +--- a/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/debugging/launch/NbLaunchDelegate.java ++++ b/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/debugging/launch/NbLaunchDelegate.java +@@ -563,12 +563,7 @@ public void finished(boolean success) { + protected static @CheckForNull Pair findTarget(Project prj, boolean preferProjActions, FileObject toRun, SingleMethod singleMethod, NestedClass nestedClass, boolean debug, boolean testRun, boolean testInParallel, ContainedProjectFilter projectFilter) { + ClassPath sourceCP = ClassPath.getClassPath(toRun, ClassPath.SOURCE); + FileObject fileRoot = sourceCP != null ? sourceCP.findOwnerRoot(toRun) : null; +- boolean mainSource; +- if (fileRoot != null) { +- mainSource = UnitTestForSourceQuery.findUnitTests(fileRoot).length > 0; +- } else { +- mainSource = !testRun; +- } ++ boolean mainSource = !testRun; + ActionProvider provider = null; + String command = null; + Collection actionProviders = findActionProviders(prj);