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 108640 - Changes in XML schema doesn't make document "modified"
Summary: Changes in XML schema doesn't make document "modified"
Status: RESOLVED WONTFIX
Alias: None
Product: editor
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-02 14:17 UTC by Michael Nazarov
Modified: 2009-11-02 11:14 UTC (History)
0 users

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 Michael Nazarov 2007-07-02 14:17:27 UTC
Product Version: NetBeans IDE Dev (Build 200707020000)

1. Create XML schema and add new element (Attribute, Element, Simple or Complex Type).
2. Remove element using Refactor -> Delete.

"*" mark will appear in file title (indicating there are changes) and will disappear immediately. So you can close file
without prompt "Save changes?" just like there are no changes. This is bit strange and dangerous.
Comment 1 Sonali Kochar 2007-07-05 23:01:38 UTC
Refactor - Delete removes the element and saves the file. There are no unsaved changes hence you wont see the the "Save
Changes" prompt. This is the designed behavior just like java refactoring delete. Please close the bug.
Comment 2 Sonali Kochar 2007-07-05 23:06:34 UTC
Refactor -> Delete removes the element and saves the file. There are no unsaved changes after the delete and you wont
see the "Save Changes" prompt. This is the designed behavior just like java refactoring delete. Please close the bug.
Comment 3 Michael Nazarov 2007-07-06 13:05:28 UTC
I completely disagree with such "design" and can't close this issue.
Comment 4 tonybeckham 2007-07-17 20:15:57 UTC
There is something to this I think.

Something is happening when there has been more than one action in the editor.

To see what I mean:
1. Create a new Schema
2. In schema view right click Attributes and choose add Attribute (accept defaults)
3. The Asterisk appears in the File's Tab
4. Choose Refactor -> safely delete, and the new attribute is deleted and asterisk goes away

5. Now again in schema view right click Attributes and choose add Attribute (accept defaults)
6. Now right click on elements and select add element (accept defaults)
7. Right click newElement ->refactor->safely delete
8. The asterisk in the files tab goes away

I think that when a second action has happened the previous actions are saved automatically.  

I do think that anytime there have been changes to a file (ones that did not have a dialog regarding are you sure, like
refactoring) when closing there should be a confirmation to ask if the new version should be saved.  As of now, if more
than one element or attribute is added, the only thing that is questioned is the last action.

For instance, a user could add 4 new elements and delete the last one.  The 3 new elements created prior to the last one
would be save automatically without asking when the schema is closed.

As for the original issue, I think this is standard behavior, but upon further investigation my findings warrant a
further investigation. But I do not think P2 is appropriate so I am going to change to P3. 
Comment 5 Sonali Kochar 2008-07-17 05:04:51 UTC
The core refactoring saves all the files before doing any refactoring and then again saves the file after doing the
refactoring changes. This is outside my control. Transferring the core team so that they can evaluate.
Comment 6 David Strupl 2009-03-31 15:56:49 UTC
Resolving all issues with milestone "future" as LATER. If you feel strongly that
it should be implemented please reopen and set the target milestone to "next".
Comment 7 Quality Engineering 2009-11-02 11:14:13 UTC
NetBeans.org Migration: changing resolution from LATER to WONTFIX