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


##########
ide/projectui/src/org/netbeans/modules/project/ui/groups/NewGroupPanel.java:
##########
@@ -439,6 +440,13 @@ private void 
directoryButtonActionPerformed(java.awt.event.ActionEvent evt) {//G
         chooser.setCurrentDirectory(start);
         if (chooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) {
             File f = chooser.getSelectedFile();
+            if (f != null) {
+                    FileObject fo = FileUtil.toFileObject(f);
+                Project owner = FileOwnerQuery.getOwner(fo);

Review Comment:
   - one issue that @lahodaj warned about is:
      - creating a _fallback project_ inside of another project
      - disconnects the `FileOwnerQuery.getOwner` from the right project with 
the right lookup
      - then the `.java` sources may not get the right classpath, etc.
   - simplest way is to prevent that altogether
      - the adbcfc4ae343 change does that
   
   <img width="799" height="584" alt="Select owner project" 
src="https://github.com/user-attachments/assets/fceb18f9-0935-4230-b7d6-34db19975d30";
 />
   
   - even if one selects `src` directory in a Maven project
   - the owning maven `getProjectDirectory()` is selected as the "Folder of 
Projects"
   



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