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 82003 - [ProjectGroups] Related files are not closed using "Close Other Projects"
Summary: [ProjectGroups] Related files are not closed using "Close Other Projects"
Status: RESOLVED WONTFIX
Alias: None
Product: contrib
Classification: Unclassified
Component: Code (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-05 18:08 UTC by Martin Krauskopf
Modified: 2007-03-25 22:05 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Krauskopf 2006-08-05 18:08:15 UTC
1) e.g. make a group of modules *without* QuickFileChooser module
2) Open QuickFileChooser
3) Open ChooserComponentUI class
4) Go to the group and invoke "Close Other Projects"

ChooserComponentUI stays open. And when you close such a files manually then
they are not opened during the project next open. (i.e. ChooserComponentUI is
not opened when you open QuickFileChooser again). Might sounds like nitpicking
but you could find it unconvenient with habits similar to mine ;)
Should behave like standard project's Close action.
Comment 1 Jesse Glick 2006-08-06 03:31:44 UTC
Need to check but may be a bug in projectui. IIRC it was decided (jrechtacek? I
think) to only open/close files when prjs opened/closed from the regular GUI
actions, not from the OpenProjects API. Not sure why.
Comment 2 Martin Krauskopf 2006-08-06 08:35:57 UTC
More I'm using this more inconvenient it is. Since often I want to temporarily
close all project in the groups through Group view. Then all projects leave
there their files opened - which was the original reason to close the group. So
in the end one lost "opened-files-setting" of all projects -> P3 ;)

Jirka's reason is in the issue 41853. Probably could be solved in the
projects/projectui in o.n.m.project.ui.OpenProjectsTrampolineImpl.closeAPI() by
calling "if (ProjectUtilities.closeAllDocuments(projects)) { close them }" (has
to be called from within AWT).

Probably would have to be documented in OpenProjects.close() that projects may
stay opend. Ideally the method would return boolean saying whether the user (or
something) cancels a closing process.
Comment 3 _ tboudreau 2006-08-06 20:57:15 UTC
Okay.  Any pointers to what the standard close project action is doing to save
the file list would be appreciated.  I assumed it was automatic when closing the
project via OpenProjects - I didn't know the code doing the closing needed to do
something.
Comment 4 Martin Krauskopf 2006-08-06 21:12:09 UTC
See my previous comment.
o.n.m.project.ui.ProjectUtilities.closeAllDocuments|storeProjectOpenFiles in
projects/projectui module do this. But it is not called by OpenProjects.close()
-> actually OpenProjectsTrampolineImpl#closeAPI() (to which OpenProjects.close()
delegates by default) does not call the PU.cAD(). cf. my previous comment.
Comment 5 _ tboudreau 2006-08-07 06:28:15 UTC
Would adding OpenProjects.close (boolean closeFiles) be simpler?  (and
optionally deprecate OpenProjects.close(), or just document that it will not
close files?).  It seems more straightforward.
Comment 6 Jesse Glick 2006-11-20 20:45:32 UTC
Not maintaining this module any more.