Skip to main content



      Home
Home » Language IDEs » ServerTools (WTP) » formatting a jsp but skipping the undo stack
formatting a jsp but skipping the undo stack [message #148370] Tue, 22 November 2005 16:35 Go to next message
Eclipse UserFriend
Hi,
I am inserting some text into a jsp page, then formatting the newly
inserted text by calling IStructuredFormatProcessor.formatDocument() for
the range of the new text.

This all works fine, the only problem is that the format operations all go
onto the undo stack.

So after the insert, if you press ctrl-Z, you first must cycle through
undoing all of the format operations before you can actually undo the
original insertion.

Is there a way to make the format operations skip the undo stack?

Thanks,
Scott
Re: formatting a jsp but skipping the undo stack [message #148691 is a reply to message #148370] Wed, 23 November 2005 16:25 Go to previous messageGo to next message
Eclipse UserFriend
Scott Ellis wrote:
> So after the insert, if you press ctrl-Z, you first must cycle through
> undoing all of the format operations before you can actually undo the
> original insertion.
>
> Is there a way to make the format operations skip the undo stack?

Not skip, no, but you can accumulate it into one big undoable
operations. If you look at the
StructuredTextViewer.doOperation(int) method, you'll see that the
format handling wraps the formatting between a beingRecording and
endRecording method. You'd need to do something similar around the
inserting and formatting of your text.

--
- Nitin
Re: formatting a jsp but skipping the undo stack [message #148699 is a reply to message #148691] Wed, 23 November 2005 16:47 Go to previous message
Eclipse UserFriend
Great! I will try that.
Thanks *very* much for your response.
Previous Topic:Status of M9 and opportunity for early testers: M9 planned for 11/23
Next Topic:JBOSS3.2.5 server definition
Goto Forum:
  


Current Time: Fri May 02 19:09:07 EDT 2025

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

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

Back to the top