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 245196

Summary: Support undo/redo (UndoRedo) from property sheet
Product: platform Reporter: ebakke
Component: Property SheetAssignee: Stanislav Aubrecht <saubrecht>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.0   
Hardware: PC   
OS: Mac OS X   
Issue Type: ENHANCEMENT Exception Reporter:

Description ebakke 2014-06-23 17:57:42 UTC
As noted in Geertjan's blog posts [1,2,3], the Property Sheet currently does not give platform developers a way to support undo and redo, and developers have been devising some intricate workarounds just to achieve this (e.g. creating a custom property sheet TopComponent instead of using the existing one).

Proposal: If an explored Node has an org.openide.awt.UndoRedo object in its lookup, have the property sheet's TopComponent delegate to it. If multiple nodes are selected, delegate to any UndoRedo object in their lookup if all selected nodes have an UndoRedo object in their lookup and all UndoRedo objects are equal per Object.equals().

Also note Geertjan's comment in his most recent blog post about the topic [3]: "Adding a Savable to it would be the next step so that the Save action is enabled when the user changes a property in the Properties window." This would be a nice further enhancement.

[1] https://blogs.oracle.com/geertjan/entry/undoredo_on_nodes
[2] https://blogs.oracle.com/geertjan/entry/undoredo_on_nodes_part_2
[3] https://blogs.oracle.com/geertjan/entry/undoable_property_sheet