jtulach commented on code in PR #9666:
URL: https://github.com/apache/netbeans/pull/9666#discussion_r4183474370


##########
java/java.file.launcher/src/org/netbeans/modules/java/file/launcher/SingleSourceFileUtil.java:
##########
@@ -88,16 +91,39 @@ public static boolean isSingleSourceFile(FileObject fObj) {
         return true;
     }
 
+    /**
+     * Find a Java-like project that owns the file.
+     *
+     * @param file the file to find project for
+     * @return the project (if it has some Java sources) or {@code null} 
otherwise
+     */
+    public static Project findJavaOwner(FileObject file) {

Review Comment:
   @neilcsmith-net asked:
   
   > Have you tested with a Maven parent (POM) project? If it works fine in 
there
   
   I am able to execute and debug single java file inside of `pom.xml` project 
with pom packaging:
   
   <img width="1097" height="764" alt="in pom project" 
src="https://github.com/user-attachments/assets/55647588-9c10-4601-8860-a218adddfc5a";
 />



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to