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


##########
ide/projectapi.nb/nbproject/project.properties:
##########
@@ -15,5 +15,5 @@
 # specific language governing permissions and limitations
 # under the License.
 is.eager=true
-javac.release=17
+javac.release=21

Review Comment:
   Leftover from the API version? `projectapi.nb` has no source changes any 
more, but its `javac.release` (17 → 21) and its `projectapi` dependency (1.78 → 
1.107, in `project.xml`) are still raised.



##########
ide/projectui/src/org/netbeans/modules/project/ui/OpenProjectList.java:
##########
@@ -1300,9 +1300,11 @@ private static Set<Project> 
URLs2Projects(Collection<URL> urls) {
             FileObject dir = URLMapper.findFileObject(url);
             if (dir != null && dir.isFolder()) {
                 try {
-                    Project p = ProjectManager.getDefault().findProject(dir);
-                    if (p != null && !result.contains(p)) { //#238093, #238811 
if multiple entries point to the same project we end up with the same instance 
multiple times in the linked list. That's wrong.
-                        result.add(p);
+                    if (FileOwnerQuery.getOwner(dir) == null) {

Review Comment:
   This skips every regular project too: a project directory is owned by its 
own project, so `FileOwnerQuery.getOwner(dir)` is non-null for every real 
project in the saved list, and `URLs2Projects` returns nothing for them. With 
this commit, no project is reopened on startup.
   
   I think the owner check only belongs on the fallback path: use 
`findProject(dir)` as before, and fall back only when that returns `null` and 
no other project owns `dir`.



##########
ide/projectapi/test/unit/src/org/netbeans/api/project/ProjectManagerTest.java:
##########
@@ -50,27 +50,28 @@
  * @author Jesse Glick
  */
 public class ProjectManagerTest extends NbTestCase {
-    
+
     static {
         // For easier testing.
         TimedWeakReference.TIMEOUT = 1000;
     }
-    
+
     public ProjectManagerTest(String name) {
         super(name);
     }
-    
+
     private FileObject scratch;
     private FileObject goodproject;
     private FileObject goodproject2;
     private FileObject badproject;
     private FileObject mysteryproject;
+    private FileObject justADir;

Review Comment:
   Since the tests moved to `projectui`, this file only has whitespace changes 
plus this now-unused `justADir` field. The `org.openide.util.ui.svg` test 
dependency added to `ide/projectapi/nbproject/project.xml` also seems unneeded 
now. Maybe revert both?



##########
ide/projectapi/src/org/netbeans/api/project/ProjectActionContext.java:
##########
@@ -220,7 +220,7 @@ public Builder withLookup(Lookup lkp) {
 
         /**
          * Binds to a specific {@link ProjectConfiguration}, which must 
resolve to an instance of
-         * @see <a 
href="@org-netbeans-modules-maven@/org/netbeans/modules/maven/api/MavenConfiguration.html">MavenConfiguration</a>.
+         * @see MavenConfiguration

Review Comment:
   This looks unrelated to the PR. `MavenConfiguration` isn't visible from 
`projectapi`, so `@see MavenConfiguration` can't resolve; the previous 
cross-module link worked.



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