lahodaj commented on code in PR #9631: URL: https://github.com/apache/netbeans/pull/9631#discussion_r4168046612
########## ide/projectui/src/org/netbeans/modules/project/ui/groups/OpenFolderAsGroupAction.java: ########## @@ -0,0 +1,69 @@ +/* + * 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.project.ui.groups; + +import java.awt.HeadlessException; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.io.File; +import javax.swing.JFileChooser; +import org.netbeans.spi.project.ui.support.ProjectChooser; +import org.openide.awt.ActionID; +import org.openide.awt.ActionReference; +import org.openide.awt.ActionRegistration; +import org.openide.filesystems.FileObject; +import org.openide.filesystems.FileUtil; +import org.openide.util.NbBundle.Messages; + +@ActionID( + category = "Project", + id = "org.netbeans.modules.project.ui.groups.OpenFolderAsGroupAction" +) +@ActionRegistration( + displayName = "#CTL_OpenFolderAsGroupAction", + lazy = true, asynchronous = true +) +@ActionReference(path = "Menu/File", position = 1200, separatorAfter = 1250) Review Comment: > @lahodaj [provided a feedback](https://github.com/apache/netbeans/pull/9650#issuecomment-5936102979) that touches fundamantal questions of UX and I believe it's better to be discussed in this PoC PR. Replying here... > ### Helpful without Killing > > > there could be a UI tweak to not show these projects, unless explicitly open by the user; this is probably the trickiest part to implement, and would probably need an API > > Yes, this is the crucial part! How could such a UI tweak look like? Also: the problem isn't to show the projects, but to initialize them! But without initializing, the IDE cannot provide essential cross project functionality (find usages, go to...). It is certainly the trickiest part. > > As this is the PoC UX PR: how do you want such a "UI tweak" to behave, @lahodaj? Well, I think there are two things: - the UI tweak I had in mind was simply having the projects open as reported by `OpenProjects`, but not show them in the Projects view. I don't have a particular idea how to implement that, and, frankly, I don't think it matters much during the current exploration phase. Any ugly way to achieve that will work for experimentation, and we can clean up when we gain more confidence and experience. Note that showing the "nested" projects as open is a UX problem even with a relatively small number of projects. - the problem with having too many projects is real, and hard to tackle. About a week or two ago, I was looking at the priming the in VS Code extension, which works particularly bad. I have some ideas there, but that is mostly irrelevant to the IDE, as the IDE uses a different way to prime Maven projects (ugh). I don't think discovering projects is that costly compared to the other stuff. -- 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
