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 92011 - Change "Please save modified files..." dialog
Summary: Change "Please save modified files..." dialog
Status: VERIFIED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Projects UI (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Milos Kleint
URL:
Keywords:
Depends on: 118258
Blocks: 50992
  Show dependency tree
 
Reported: 2007-01-08 12:53 UTC by Lukas Hasik
Modified: 2007-11-06 18:16 UTC (History)
5 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 Lukas Hasik 2007-01-08 12:53:11 UTC
nb0701071900+mp070108

-try to open project properties
-why i have to save all the files before I can see the properties?
Comment 1 Jesse Glick 2007-01-09 00:30:35 UTC
See issue #50992.
Comment 2 Lukas Hasik 2007-01-09 08:24:20 UTC
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
Comment 3 Milos Kleint 2007-01-09 08:32:54 UTC
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)

Comment 4 Adam Sotona 2007-01-09 09:06:03 UTC
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.
Comment 5 Milos Kleint 2007-01-09 09:15:13 UTC
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.
Comment 6 Jesse Glick 2007-01-09 19:19:53 UTC
"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.
Comment 7 Jesse Glick 2007-01-09 19:20:45 UTC
Oops, hit Enter too soon.
Comment 8 jrojcek 2007-01-15 13:47:22 UTC
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.
Comment 9 Milos Kleint 2007-01-15 14:08:44 UTC
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. 

Comment 10 jrojcek 2007-01-15 14:58:17 UTC
I understand, but showing the Save dialog to all users can be pretty annoying.
Comment 11 Milos Kleint 2007-01-15 15:12:34 UTC
yup. 
But saving silently all files is not considered good practice either, is it?
Comment 12 jrojcek 2007-01-15 16:53:26 UTC
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.
Comment 13 Milos Kleint 2007-01-22 15:54:49 UTC
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)
Comment 14 jrojcek 2007-01-23 10:24:03 UTC
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.
Comment 15 Milos Kleint 2007-01-23 11:23:02 UTC
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)
Comment 16 Lukas Hasik 2007-11-06 18:16:25 UTC
v