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


##########
ide/projectui/src/org/netbeans/modules/project/ui/groups/Group.java:
##########
@@ -471,10 +472,17 @@ protected static Project projectForPath(String path) {
     }
 
     /**
-     * The projects (currently) contained in the group.
+     * The projects (currently) contained in the group. This includes all 
specified
+     * projects as well as <em>required projects</em> when {@link 
#isSubprojects()}
+     * of the group is on.
      */
-    public Set<Project> getProjects() {
-        return getProjects(null, 0, 0);
+    public final Set<Project> getProjects() {
+        Set<Project> core = getProjects(null, 0, 0);
+        if (isSubprojects()) {

Review Comment:
   @eppleton, this addresses your concern with respect to _Main Project 
action_, e.g. the following shall be fine:
   
   > Common root of the Group.java inline comment and the next point: 
Group.getProjects() used to include the subprojects and now returns only the 
roots, but Group.open and setMainProject still treat getProjects() as the full 
set of projects in the group.
   >
   > setMainProject (not in the diff) keeps the main project only if 
getProjects().contains(mainProject). If the user picks a subproject as main 
project (e.g. a module of the master in a SubprojectsGroup, or a nested module 
in a DirectoryGroup), KEY_MAIN is now removed with a warning, so the main 
project is lost the next time the group is opened.



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