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.
Summary: | OpenProjects.close(...) and "File->Close Project" have different semantic | ||
---|---|---|---|
Product: | projects | Reporter: | Thomas Preisler <thp> |
Component: | Generic Projects UI | Assignee: | Milos Kleint <mkleint> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | CC: | anebuzelsky |
Priority: | P3 | ||
Version: | 4.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Bug Depends on: | |||
Bug Blocks: | 44319, 50683 | ||
Attachments: |
551 patch
unified diff of the same |
Description
Thomas Preisler
2005-05-18 21:20:53 UTC
Reasonable. Not really an API change; change in impl behavior. Note: ProjectUtilities.closeAllDocuments(Project[]) can return false if a user doesn't want to close all open&modified documents. It's possible if the close action is invoked from UI. What should a user do if its invoked from code and some project's documents are modified? Should be ignored? Will be determined in NB4.2. Please also check OpenProjects.open(...) for similar problem. Reassign to new owner. Maybe it would be reasonable to save the project's documents unconditionaly when closing via OpenProjects.close, should be discussed. Time estimate: 1-2 weeks. Reassigning to Milos. i would rather close non-modified file and keep the modified ones opened. Write both groups as being part of the project, so once the project gets reopened, all get shown again.. somewhat clumsy, but better than forcing a save on modified files. *** Issue 87552 has been marked as a duplicate of this issue. *** I need this for project groups. Should be pretty simple to do, I think - reassign to me if you want. Agreed with Miloš' last suggestion - don't touch modified files but store their paths. done Checking in projectui/src/org/netbeans/modules/project/ui/OpenProjectList.java; /cvs/projects/projectui/src/org/netbeans/modules/project/ui/OpenProjectList.java,v <-- OpenProjectList.java new revision: 1.62; previous revision: 1.61 done Checking in projectui/src/org/netbeans/modules/project/ui/OpenProjectsTrampolineImpl.java; /cvs/projects/projectui/src/org/netbeans/modules/project/ui/OpenProjectsTrampolineImpl.java,v <-- OpenProjectsTrampolineImpl.java new revision: 1.9; previous revision: 1.8 done Checking in projectui/src/org/netbeans/modules/project/ui/ProjectUtilities.java; /cvs/projects/projectui/src/org/netbeans/modules/project/ui/ProjectUtilities.java,v <-- ProjectUtilities.java new revision: 1.34; previous revision: 1.33 done Checking in projectui/src/org/netbeans/modules/project/ui/actions/CloseProject.java; /cvs/projects/projectui/src/org/netbeans/modules/project/ui/actions/CloseProject.java,v <-- CloseProject.java new revision: 1.11; previous revision: 1.10 done Command Finished. Your commit broke compilation of unit tests in this module. I have fixed them to compile, by adding 'false' as an extra parameter to all calls to close projects, but OpenProjectListTest still fails and I do not know why. ProjectUtilitiesTest passes only after using 'true' in testSavingModifiedNotOpenedFiles67526; using 'true' does not work in OPLT. Please review and correct the unit tests, and next time please run them before committing changes. Checking in ProjectUtilitiesTest.java; /shared/data/ccvs/repository/projects/projectui/test/unit/src/org/netbeans/modules/project/ui/ProjectUtilitiesTest.java,v <-- ProjectUtilitiesTest.java new revision: 1.14; previous revision: 1.13 done Checking in OpenProjectListTest.java; /shared/data/ccvs/repository/projects/projectui/test/unit/src/org/netbeans/modules/project/ui/OpenProjectListTest.java,v <-- OpenProjectListTest.java new revision: 1.10; previous revision: 1.9 done Checking in OpenProjectsTrampolineImplTest.java; /shared/data/ccvs/repository/projects/projectui/test/unit/src/org/netbeans/modules/project/ui/OpenProjectsTrampolineImplTest.java,v <-- OpenProjectsTrampolineImplTest.java new revision: 1.5; previous revision: 1.4 done Checking in actions/SetMainProjectTest.java; /shared/data/ccvs/repository/projects/projectui/test/unit/src/org/netbeans/modules/project/ui/actions/SetMainProjectTest.java,v <-- SetMainProjectTest.java new revision: 1.5; previous revision: 1.4 done Checking in api/RecentProjectsTest.java; /shared/data/ccvs/repository/projects/projectui/test/unit/src/org/netbeans/modules/project/ui/api/RecentProjectsTest.java,v <-- RecentProjectsTest.java new revision: 1.4; previous revision: 1.3 done fixed the OpenProjectListTest Checking in projectui/test/unit/src/org/netbeans/modules/project/ui/OpenProjectListTest.java; /cvs/projects/projectui/test/unit/src/org/netbeans/modules/project/ui/OpenProjectListTest.java,v <-- OpenProjectListTest.java new revision: 1.11; previous revision: 1.10 testSavingModifiedNotOpenedFiles67526 is correct. "false" means no modified files are saved. That's the case when no UI is to be shown on closing project Created attachment 37430 [details]
551 patch
Created attachment 37432 [details]
unified diff of the same
looks OK to me merged into release551 branch Should set TM then. |