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 96543

Summary: Need a way to get Undo Manager for a NbDocument
Product: platform Reporter: Maros Sandor <msandor>
Component: TextAssignee: issues@editor <issues>
Status: NEW ---    
Severity: blocker CC: jtulach, mmetelka
Priority: P1    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description Maros Sandor 2007-02-26 10:02:36 UTC
Editable Diff window needs a way to enable undo/redo functionality in its
editable diff pane. The pane is custom, NbDocument is from EditorCookie.
Comment 1 Maros Sandor 2007-02-28 16:10:01 UTC
A side note:
I noticed there is getUndoRedo() method in TopComponent. However, I have one
DiffTopComponent that can contain many editor panes with editable documents each
one with its own UndoRedo instance ... and I am not sure that delegating will be
of any help here.
Comment 2 Maros Sandor 2007-03-01 09:47:03 UTC
Update: Undo delegation works with one exception: I have no way of telling the
UndoAction that my UndoRedo support has changed for my TopComponent.
Comment 3 Jaroslav Tulach 2007-03-01 10:53:44 UTC
Re. delegation. Create a wrapper UndoRedo, delegate in it, when delegate 
changes, fire change event. Should be simple, UndoRedo is an interface.

Re. actual problem of getting UndoRedo for a Document, I like more an more to 
use document.getProperty("org.openide.awt.UndoRedo") and making sure that our 
CloneableEditorSupport documents have this property correctly assigned.
Comment 4 Maros Sandor 2007-04-19 13:29:52 UTC
Deleting dependency and tracking independently.
Comment 5 Antonin Nebuzelsky 2008-04-17 15:15:14 UTC
Reassigning to new module owner mslama.