lahodaj commented on code in PR #6329:
URL: https://github.com/apache/netbeans/pull/6329#discussion_r1415171412


##########
java/java.file.launcher/src/org/netbeans/modules/java/file/launcher/SingleSourceFileUtil.java:
##########
@@ -68,15 +73,15 @@ static FileObject 
getJavaFileWithoutProjectFromLookup(Lookup lookup) {
         return null;
     }
 
-    static boolean isSingleSourceFile(FileObject fObj) {
+    public static boolean isSingleSourceFile(FileObject fObj) {
         Project p = FileOwnerQuery.getOwner(fObj);
         if (p != null || !fObj.getExt().equalsIgnoreCase("java")) { //NOI18N
             return false;
         }
         return true;
     }
 
-    static Process compileJavaSource(FileObject fileObject) {
+    public static Process compileJavaSource(FileObject fileObject) {
         FileObject javac = 
JavaPlatformManager.getDefault().getDefaultPlatform().findTool("javac"); 
//NOI18N

Review Comment:
   I think I (and possibly others) are considering separating the runtime JDK 
and the JavaPlatform used by projects in VS Code extension. Maybe by changing 
the result of `JavaPlatformManager.getDefaultPlatform()`.
   
   This is because the extension will/may require some relatively new JDK, but 
the projects may be developed for an older version.
   
   I don't think anyone really tried that so far, though. (Jaroslav did some 
change in this direction for Maven long time ago, I think, but we need 
something more general.)
   
   For source launcher, we could add a UI to select the JDK - it probably would 
not work in VS Code, but the same is true for JDK selection for other project 
types. If you want to look at that, you are of course welcome to. Or someone 
else might get to it, although I can't promise that, of course.
   
   But I would prefer to avoid doing that here - this PR is complex enough on 
it own.
   
   Thanks for the comment!
   



-- 
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