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: | Change "Please save modified files..." dialog | ||
---|---|---|---|
Product: | projects | Reporter: | Lukas Hasik <lhasik> |
Component: | Generic Projects UI | Assignee: | Milos Kleint <mkleint> |
Status: | VERIFIED FIXED | ||
Severity: | blocker | CC: | asotona, jglick, jrojcek, mkleint, mmirilovic |
Priority: | P2 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Bug Depends on: | 118258 | ||
Bug Blocks: | 50992 |
Description
Lukas Hasik
2007-01-08 12:53:11 UTC
See issue #50992. I don't understand why it's invalid issue. When I open project properties of mobile project the crazy dialog "Save all your properties ..." appears. I didn't open any properties, I'm not editing a "properties" file then it's probably an issue with the mobility project type that modifies files behind the scenes. reassigning, please reassing back if it happens with every project type. (meaning only one project type is opened and it happens) The request was simple - please remove the nonsense dialog. If the dialog is the only fix of issue #50992 the we should reopen it (as Jano suggested) and look for some better fix. BTW Mobility project customizer is modal from the very beginning and from the same reasons as described in #50992. Saving all files before opening the dialog does not prevent users to do parallel modifications when the dialog is non-modal. ok, marked as blocking the #50992, as per suggestion of jglick in #50992 I do believe too that having the properties dialog non-modal is asking for trouble, but modality won't prevent all possible failures alone. please note that with the 6.0 api to plug panels into the customizer, we have even more unpredictable list of files that can be touched by the customizer's code when saving. "Saving all files before opening the dialog does not prevent users to do parallel modifications when the dialog is non-modal." - of course not, but users are much less likely to edit metadata files while the properties dialog is open than they are to edit metadata files and then open the properties dialog without saving them. #50992 fixes the latter; I doubt the former requires a fix. Oops, hit Enter too soon. Rising priority to P2. The dialog cannot stay as it is. I believe there's a very small number of users who modify project files manually. Now they have to deal with the dialog they don't understand and doesn't really affect them. Can we show the current dialog before opening project properties but only if a project file is modified ("project.properties", "project.xml", etc.)? Do not show it when some unrelated file is modified. jrojcek: as I stated in a comment from Jan 9 09:15:13, it's fairly hard to guess what all the project files could be on the generic project support code and since 6.0 also in the actual project type code. project.xml/project.properties are the obvious files to check, but the project customizer can check stuff like web.xml, webservices.xml or layer.xml (for nb projects) and these are pretty often edited by the user. I understand, but showing the Save dialog to all users can be pretty annoying. yup. But saving silently all files is not considered good practice either, is it? No, we should not save files silently. We need to ask users if we're sure it would cause problems. I understand it's more work on our site, but the current dialog doesn't work from UI perspective. ok. implemented this way: 1. look for modified files, filter out the ones that belong to other projects. 2. then look for the ProjectOperations.getDataFiles() list (which are all the files in the project that are not considered metadata - usually java files, bundles, images, etc.) and agan filter those out. 3. if there are any remaining modified files, these are the eventually dangerous to have modified, so show the dialog. 4. changed the dialog to have cancel and Save All buttons, allowing to process if it's finw with the user (as it usually is for most people) Thanks Milos, this is much better. A question... What kind of files are considered not belonging to ProjectOperations.getDataFiles()? I'm trying to better understand in which situations the dialog shows up. basically the metadata files, plus the unknowns. I didn't want to restrict on metadata files (as known by the ProjectOperations class) because that's not necessarily a complete set in all corner cases when people start extending our project types. in plain text: it's everything under project root except stuff under the the src or test folders (for j2se project at least).. and since most of the files edited by users fall under src/test folders we're pretty safe and no additional work is required by the project implementations. (most/all already implement the ProjectOperations related interfaces) v |