Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 21:35 Go to next message
Scott Ellis is currently offline Scott EllisFriend
Messages: 2
Registered: July 2009
Junior Member
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 21:25 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4435
Registered: July 2009
Senior Member

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


_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: formatting a jsp but skipping the undo stack [message #148699 is a reply to message #148691] Wed, 23 November 2005 21:47 Go to previous message
Scott Ellis is currently offline Scott EllisFriend
Messages: 2
Registered: July 2009
Junior Member
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 Apr 26 12:47:58 GMT 2024

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

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

Back to the top