This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 168578

Summary: Save open files as part of project group, not individual projects
Product: projects Reporter: Jesse Glick <jglick>
Component: Generic Projects UIAssignee: Milos Kleint <mkleint>
Status: RESOLVED FIXED    
Severity: blocker CC: kawazu428, lesar, matthies
Priority: P2    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:
Bug Depends on: 151920    
Bug Blocks: 44319, 168556    

Description Jesse Glick 2009-07-14 19:26:41 UTC
When a project group is closed, the open file list should be stored as part of the project group, not as part of the
individual projects. When a group is opened, the list of files present in the group should be opened (and any lists in
the projects should be cleared).

I often use a project group to work on a single issue. I like to have a list of open files, but this list should pertain
to the issue. It is silly when I open one of those projects for a completely separate reason (possibly even in a
different userdir) and a few of the files open.

Also if you have some files open which are not owned by any (open) project - an MQ patch, a logging config file, etc. -
it would be good to save these in the group. Currently they are neither closed when you close the group, nor reopened
when you reopen the group.
Comment 1 Jesse Glick 2011-04-04 19:46:01 UTC
*** Bug 197273 has been marked as a duplicate of this bug. ***
Comment 2 Jesse Glick 2011-04-04 19:46:21 UTC
Bug #91031 is also related.
Comment 3 Milos Kleint 2012-12-17 14:45:26 UTC
*** Bug 223235 has been marked as a duplicate of this bug. ***
Comment 4 CodeLurker 2013-01-13 17:08:40 UTC
Bluefish editor can only do projects which open all files; and this is wasteful of memory. I think remembering all open files would be handy, but I think it should be an option. Myself, I rarely have more than a handful of files in a project open at a time, and it is no problem to reopen them manually.
Comment 5 Milos Kleint 2013-01-21 14:40:39 UTC
http://hg.netbeans.org/core-main/rev/d78effba779b

done by changing the private project aux configuration format to include group information and store multiple lists there. It was the easiest/safest thing to do in current codebase. No attempt is made to retrieve the old list in old format.
Comment 6 Quality Engineering 2013-01-22 03:04:33 UTC
Integrated into 'main-golden', will be available in build *201301220001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/d78effba779b
User: Milos Kleint <mkleint@netbeans.org>
Log: #168578 remember opened files in project per group, not globally.
Comment 7 lesar 2013-03-15 08:20:49 UTC
This change was active on 7.3 build 201302132200 ??
I use a script to open NB7:
...
PRG="/home/user/netbeans-7.3/bin/netbeans"
...
exec $PRG --userdir "$DIR" --open-group $GROUP
...
this not work well now?
same problem on last group project file not closed.
Comment 8 Milos Kleint 2013-03-15 08:26:22 UTC
(In reply to comment #7)
> This change was active on 7.3 build 201302132200 ??
> I use a script to open NB7:
> ...
> PRG="/home/user/netbeans-7.3/bin/netbeans"
> ...
> exec $PRG --userdir "$DIR" --open-group $GROUP
> ...
> this not work well now?
> same problem on last group project file not closed.

can you verify that the problem only occurs with --open-group cmd line switch? That code path is fairly specific and most likely was not tested extensively.

thanks
Comment 9 lesar 2013-03-15 09:10:25 UTC
(In reply to comment #8)
> (In reply to comment #7)
> > This change was active on 7.3 build 201302132200 ??
> > I use a script to open NB7:
> > ...
> > PRG="/home/user/netbeans-7.3/bin/netbeans"
> > ...
> > exec $PRG --userdir "$DIR" --open-group $GROUP
> > ...
> > this not work well now?
> > same problem on last group project file not closed.
> 
> can you verify that the problem only occurs with --open-group cmd line switch?
> That code path is fairly specific and most likely was not tested extensively.
> 
> thanks

yes.
If I open NB7 and then switch from a group to other group all work fine.
If I use the script above NB7 strart up whith the right group name active but the file open was the last time file opened before close NB7.

In hoter word if I have 2 groups Hissue1 and Hissue2, if I work on Hissue1 end then close NB7 when I next day open NB7 by the script above using --open-group Hissue2 then NB7 open with Hissue2 group active but the file open in editor is the last files open on Hissue1

Best regards
Comment 10 Milos Kleint 2013-04-02 08:25:35 UTC
https://hg.netbeans.org/core-main/rev/c2796b3d9235