Yeap, that's what I'd do too... Maybe I can do a 'replace selected text' method in pyselection...

Also, I think that the scripting engine could start having some
'utilities' module that you can use, where this kind of stuff would go
so that you could share it among scripts (and maybe provide a more
pythonic interface for many of the things Eclipse provides). What do
you think?

Fabio Zadrozny wrote:> Actually there is 1 method that does it (but it's the single one, so,> you may want to use one of IDocument if it's not what you want):>> public void addLine(String contents, int afterLine)

Ah, ok. This does not do quite what I want. I want to replace thecurrent selection with some new text. Right now I am using something like: