jtulach commented on code in PR #9736: URL: https://github.com/apache/netbeans/pull/9736#discussion_r4398069256
########## ide/generic.project/src/org/netbeans/modules/generic/project/GpSubprojectProvider.java: ########## @@ -0,0 +1,71 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.netbeans.modules.generic.project; + +import java.util.Collections; +import java.util.LinkedHashSet; +import java.util.Set; +import javax.swing.event.ChangeListener; +import org.netbeans.api.project.FileOwnerQuery; +import org.netbeans.api.project.Project; +import org.netbeans.spi.project.SubprojectProvider; +import org.openide.filesystems.FileObject; +import org.openide.util.ChangeSupport; + +/** + * The legacy {@link SubprojectProvider} view of the projects nested + * directly in the project directory: every child folder owned by + * another project is a subproject. + */ +final class GpSubprojectProvider implements SubprojectProvider { + + private final GenericProject prj; + private final ChangeSupport changeSupport = new ChangeSupport(this); + + GpSubprojectProvider(GenericProject prj) { + this.prj = prj; + } + + @Override + public Set<? extends Project> getSubprojects() { + Set<Project> subprojects = new LinkedHashSet<>(); + FileObject[] children = prj.getProjectDirectory().getChildren(); Review Comment: - Shouldn't the subproject be listed inside of the `.nbgp` file optionally? - ideally I'd like such a `.nbgp` file be in the root of NetBeans git repository - but opening all projects is a bit too much as https://github.com/apache/netbeans-vscode/pull/36#issuecomment-5712848203 shows - e.g. I'd be hoping for this new system to control **subset of all projects to open** - Having such a system would help projects with enormous codebases to fight with non-scalability -- 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
