Repository navigation
Conversation
|
Why not a The Aside - that |
True, typos might be a problem ( at least for me ;-) ) We could print a line like "Created new empty project group 'X'" to the console via env.getOutputStream() to make this more visible. (or use "--new-group") |
i use Now combine it with a path, like: What I thought about was |
Mine is rarely empty. As said above, I wonder whether the default for that option, and for switching to
Aside - need a way to share some of the cache? That could be tricky, but sharing the Maven indexing would be good. Something to discuss elsewhere. |
eb82443 to
9eb0fce
Compare
| } else { | ||
| OpenProjectListSettings settings = OpenProjectListSettings.getInstance(); | ||
| settings.setOpenProjectsURLsAsStrings(nue != null ? nue.projectPaths() : getProjectPathsByPreferences(noneGroupPref)); | ||
| settings.setOpenProjectsURLsAsStrings(nue != null ? nue.projectPaths() : Collections.emptyList()); |
There was a problem hiding this comment.
Here is the new approach:
- let
--close-groupnot only close the group (if any) - but also empty the list of projects
- if I got it right, that's exactly what @neilcsmith-net hinted here:
The
--close-groupoption does cover some of your scenario. That might be better enforcing an empty group anyway?
@mbien wrote and Neil replied:i use --close-group often. It starts in group none which should be empty by default.
Mine is rarely empty. As said above, I wonder whether the default for that option, and for switching to none in the UI, would be better as a clean slate.
- Exactly! Clean state is better.
- when @jglick introduced the project groups:
- Jesse (probably) wanted to keep compatibility with the prior state
- e.g. when one opts for groups and the opts out by closing them...
- one gets to a previous state just like groups support wouldn't exists
- that made some sense but it shows its limits these days - let's change it
There was a problem hiding this comment.
Yes, this is what I meant. I should make my "hints" more explicit! 😆
Ideally this should be handled in open too when projectsLoaded == true.
Interestingly, there's a TODO matching this behaviour in there already.
netbeans/ide/projectui/src/org/netbeans/modules/project/ui/groups/Group.java
Lines 579 to 582 in c25d20f
There was a problem hiding this comment.
Here is an ideological justification of the behavioral change of --close-group with an outline of the future:
Group Centric View
- Let build NetBeans projects and file view around the concept of a ProjectGroup .
- a group is a set of projects (same as now) with few implementations
AdhocGroup,DirectoryGroup, etc.) - there is always a single opened project group in the NetBeans IDE
- there is a way to listen and obtain the current group
- users can create new groups and switch between existing groups
- the default group (none in current implementation) is switch non-persistent
- e.g. when switching to it, it starts empty, as a fresh group
- it keeps its project list on shutdown/restart however
- developers can query the current group, observe its changes and get list of
Projectin the current group- there already is getActiveProjectGroup()
- created by 6a3ae0aed18ca3e6a7af31901311ee63bd798351used only by Maven support for not clear reasons
- let's enhance ProjectGroup with additional getters to look alike workspace and serve similar purpose
- where
workspaceFolderswould begetProjects(),isTrusted(), maybetextDocumentsto deal with opening previously opened editor views on group switch
- shift the UI towards the group centric view while keeping the flexibility for expert users
There was a problem hiding this comment.
Agreed! With the obligatory, that discussion really belongs on dev@ 😄
created by 6a3ae0aed18ca3e6a7af31901311ee63bd798351used only by Maven support for not clear reasons
I intended to bring this up in the dev@ discussion that Groups can have different settings. Maven support can theoretically have a different Maven Home for each group configured under group properties. I think this is for that. Not sure how well we test that feature, and not that useful compared to pushing mvnw anyway.
Still, anything taking an enhanced group perspective can probably look to provide more group oriented settings available, and provide an easier UI for them.
--open-group newgrp CLI option--close-group empty the project list
neilcsmith-net
left a comment
There was a problem hiding this comment.
Tested a build. Seems to work great. Thanks!
Hopefully @mbien is still OK with the extra change. I think it makes sense for the UI to work like this, and one less TODO is always a good thing!
You might want to remove the TODO comment though when squashing this. 😄
Use
netbeans --close-groupto start the IDE with an empty set of projects.Motivation
netbeans--userdirfor that--open-groupCLI option would be good enoughFeature
netbeans --close-groupnow always starts with an empty project list