Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » How to contribute to the default cut|copy/paste StyledText commands
How to contribute to the default cut|copy/paste StyledText commands [message #524234] Wed, 31 March 2010 09:11
Laurent Petit is currently offline Laurent PetitFriend
Messages: 35
Registered: July 2009

I have a custom editor extending a TextEditor, and managing structured data above what is manipulated by the user in the text editor area.
E.G. when the user enters the text $a_local_code$ , my editor already enables the user to trigger a dialog providing an editable form for manipulating the structured data associated with a_local_code.

So far, this works great.

What I want now is the ability to make the structured data associated with the text $a_local_code$ "follow" the text during copy|cut / paste operations.
I would like to be able to participate in these operations, by adding, along with the usual TextTransfer and RTFTransfer contents, my own Transfer type for adding a more structured "view" of what is

By looking at the StyledText widget, I can't imagine a way to do that, so I'm asking here: how and where could I plug my code ?

Currently, I'm thinking about something along those lines: find a way to be notified right after the copy/cut/paste operation occurs, and take that opportunity to 1. get the current types and contents
from the Clipboard, 2. create my additional related transfer content if relevant 3. set the content of the clipboard with the old content plus my additional content.

Is there a non hackish way of doing this, if at all ?

Thanks in advance,

Laurent Petit
Previous Topic:Empty root.folder with p2-enabled PDE build?
Next Topic:StyledText: wrong style length in PaintObjectEvent
Goto Forum:

Current Time: Sat May 18 07:25:12 GMT 2024

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

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

Back to the top