Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 96543 - Need a way to get Undo Manager for a NbDocument
Need a way to get Undo Manager for a NbDocument
Status: NEW
Product: platform
Classification: Unclassified
Component: Text
All All
: P1 (vote)
Assigned To: issues@editor
Depends on:
  Show dependency treegraph
Reported: 2007-02-26 10:02 UTC by Maros Sandor
Modified: 2010-01-12 05:20 UTC (History)
2 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
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.

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo