Skip to content

Patch for changes reg. mainSource variable in Netbeans #416

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 2, 2025
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
1 change: 1 addition & 0 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 18 additions & 0 deletions patches/8470-draft.diff
Original file line number Diff line number Diff line change
@@ -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<ActionProvider, String> 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<ActionProvider> actionProviders = findActionProviders(prj);