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.
Moving the elements around in the diagram does not get marked with the asterisk to indicate the diagram is dirty. So, closing and reopening diagram lost the changes.
Because of this issue, the Save Docuement menu option is not enabled from the diagram tab's popup menu, so no way to save the diagram. This issue causes data loss so raising its priority to a P1.
Sometimes, DnD element from project tree to diagram also does not get the diagram marked as dirty. An interesting observation is that when the diagram is marked as dirty, the popup menu from the diagram tab has Save Document menu option enabled only if there is an item(s) selected in the diagram. If deselect the selected item(s) from the diagram, the Save Docuement menu option is no longer enabled.
UML developers, when your code modifies a diagram in any way, please mark the diagram "dirty" in your code as follows: UMLDiagramDataObject dataObj = getDiagramDO(); dataObj.setDirty(true, getScene()); // "true" for dirty When the diagram is saved, the dirty flag is reset to false, the dirty mark (the *) is removed from the diagram to indicate its clean status. Programmatically, you should never need to mark the diagram "clean" by passing false to the above setDirty method.
Diagram is now marked dirty when moving elements.
Verified in build 20080327. Even creating new elements in the diagram, the dirty indicator (asterisk) is not displayed. This seems to happen on only re-opened diagram since it works ok on initially created diagram.
My fix was overwritten due to a merge. Restored the fix.
verified in build 20080411. This issue still exists but not every time on the same scenario. - create a uml java-platform project - create a class diagram - create a couple of classes on the diagram - save the diagram and close it - reopen the diagram - move the element or create a new class to the diagram, etc. will mark the diagram dirty - now just click the "x" on the diagram tab to close it (will not prompt to save dirty diagram - a separate bug) - reopen the diagram - now moving or creating new element to the diagram will NOT mark the diagram dirty - starting from the 2nd reopen and on, diagram will not be marked dirty any more
Save confirmation dialog now pops up when you try to close a dirty diagram. Diagram is marked dirty when something changes (even after a reopen).
verified in build 20080522. Still a few minor issues (eg, layout would not mark the diagram dirty) which will be tracked separate issues.
Integrated into 'main-golden', available in NB_Trunk_Production #234 build Changeset: http://hg.netbeans.org/main/rev/0ee872991c16 User: jyothivasa@netbeans.org Log: Fix for #127040 - diagram is not marked as dirty when it's modified