Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » The problem of StructuredTextViewerUndoManager
The problem of StructuredTextViewerUndoManager [message #172937] Tue, 04 July 2006 16:28
Eclipse UserFriend
Originally posted by:


I have code like this:

// model is an instanceof IStructuredModel

I expect it will generate one CompoundCommand, but not works, because
StructuredTextViewerUndoManager.UndoNotifier listen selection event of
the TextViewer. if any selection changed, it will call the method
forceEndOfPendingCommand of class IStructuredTextUndoManager. If you
take a look of org.eclipse.jface.text.TextViewerUndoManager, you will
see it listen to the key and mouse event instead of selection event.

In StructuredTextViewer, if you typing some text then move cursor to
other offset then move back, then keep typing, it only generate one
command, but if you typing some text then change the selection then
move cursor back, then keep typing, it will generate tow undo command.
IMO, it is kind weird.

So, is it possible that my previous code only generate one command?
otherwise, this beginRecording, endRecording are totally useless...

Previous Topic:HOWTO solve the application loaded twice problem with Tomcat
Next Topic:installation de wst
Goto Forum:

Current Time: Sat Jun 23 06:49:09 GMT 2018

Powered by FUDForum. Page generated in 0.01231 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top