Text editing [message #116047] |
Mon, 25 August 2003 11:05  |
Eclipse User |
|
|
|
Originally posted by: didier.besset.ch.sogeti.biz
Is there a quick way to assign edit standard menu (Del, Cut, Copy, Paste
and Select All) to a text control? I only found the Global or Retargetable
actions which must be assigned one by one.
Also, I found cut(), paste() and copy() methods in the Text class, but no
delete(). How comes?
Cheers,
Didier
|
|
|
Re: Text editing [message #116147 is a reply to message #116047] |
Mon, 25 August 2003 11:23   |
Eclipse User |
|
|
|
There is good article describing how to add actions (including menu bar
actions):
http://www.eclipse.org/articles/Article-action-contribution/ Contributing%20A
ctions%20to%20the%20Eclipse%20Workbench.html
To delete a region in a text, you could use
text.insert("");
This replaces the current selection with an empty string (which is what you
want).
You can set an arbitrary selection using text.setSelection(start, end)
Chris
"Didier Besset" <didier.besset@ch.sogeti.biz> wrote in message
news:bid8jo$spj$1@eclipse.org...
> Is there a quick way to assign edit standard menu (Del, Cut, Copy, Paste
> and Select All) to a text control? I only found the Global or Retargetable
> actions which must be assigned one by one.
>
> Also, I found cut(), paste() and copy() methods in the Text class, but no
> delete(). How comes?
>
> Cheers,
>
> Didier
>
|
|
|
|
|
Re: Text editing [message #123481 is a reply to message #116047] |
Fri, 05 September 2003 16:56  |
Eclipse User |
|
|
|
Originally posted by: knut_radloff.oti.com
"Didier Besset" <didier.besset@ch.sogeti.biz> wrote in message news:bid8jo$spj$1@eclipse.org...
> Is there a quick way to assign edit standard menu (Del, Cut, Copy, Paste
> and Select All) to a text control? I only found the Global or Retargetable
> actions which must be assigned one by one.
org.eclipse.ui.actions.TextActionHandler seems to be what you want.
Knut
|
|
|
Powered by
FUDForum. Page generated in 0.06984 seconds