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 118258 - 'Please save project's modified...' dialog window appears when user call 'Project Properties' window
Summary: 'Please save project's modified...' dialog window appears when user call 'Pro...
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Infrastructure (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Milos Kleint
Depends on:
Blocks: 92011
  Show dependency tree
Reported: 2007-10-09 15:49 UTC by soldatov
Modified: 2007-10-12 10:15 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description soldatov 2007-10-09 15:49:15 UTC
- Open any makefile based project (DDD for example)
- Open any file in editor
- Modify file
- Select project node in 'Projects' tab and call context menu. Select 'Properties' menu item
==> 'Save modified files' dialog window appears. It is strange question for me, because I want see property only. And If
it is expected behavior, why this dialog doesn't appear in standard C/C++ projects?
Comment 1 Thomas Preisler 2007-10-09 16:59:52 UTC
Problem confirmed. Yes, it is strange. The dialog is not ours and I don't know what is triggering it to appear.
Comment 2 Thomas Preisler 2007-10-10 19:22:32 UTC
I was able to reproduce with a plain Java project:

Create a Java Project with Existing ant Script and add a source root *outside* of the project. Modify one of the files (don't save) under the external source root 
and bring up the project's properties. You will get the same dialog.

I don't know who own this dialog or why it is popping up. It may be applicable for some projects (Java?) but it is not for our (C/C++) projects.

Reassigning to Projects.
Comment 3 Jesse Glick 2007-10-10 22:03:44 UTC
Fix of issue #92011 (refinement of fix of issue #50992, which is applicable for all project types AFAIK) is not getting
activated in these cases. Needs to be investigated but probably failure of certain project types to correctly implement

BTW please remember to use the "Reassign issue to owner of selected subcomponent" button when changing components.
Comment 4 Milos Kleint 2007-10-12 10:15:01 UTC
the current algorithm for showing the dialog is:
iterate all modified files in the IDE. If they belong to the project, check weather they belong to
ProjectOperations.getDataFiles(). If at least one is not in datafiles, show dialog.
That algorithm is rather defensive as it assumes that any file not explicitly marked as source/datafile is automatically
a metadate file that's eventually touched during customizer dialog.

I've changed that to check against the list of ProjectOperations.getMetadataFiles() and only show if the modified files
are explicitly listed in the metadata list (or their parent directory is)

/cvs/projects/projectui/src/org/netbeans/modules/project/ui/actions/,v  <--
new revision: 1.13; previous revision: 1.12

This change means that in order to prevent clashes with modified files, each project type needs to make sure the list of
metadata files is correct. Otherwise it risks issue #50992 reoccuring)