[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
Re: How to get the actual Editor of a MultiPageEditorPart from outside ?
|
- From: tom_doehler@xxxxxx (Tom Döhler)
- Date: Wed, 14 Aug 2002 16:06:01 +0000 (UTC)
- Newsgroups: eclipse.tools
- Organization: http://www.eclipse.org
- User-agent: NewsPortal 0.23
Hi Chris.
Thank you for your answer.
I\'ve made another solution: i overwrote the method getAdapter(Object o)
in the MultiPageEditor I use. If this method gets an IDocument.class,
it returns the right editors document implementation.
It isn\'t nice, but it works for me. Currently I\'m not able to use
multiple
clipboards (because there is only one system clipboard -- even a array of
org.eclipse.swt.dnd.clipboard uses always one system clipboard), I use
simple StringBuffers to simulate a clipboard. For me
this is ok, because the only thing a really missed in eclipse was multiple
copy/paste buffers for text editing.
>[...]
> I\'m guessing from the TextEditor example you gave that you are dynamically
> determining the class of the current active editor part, casting to it, and
> performing your multiple clipboard functionality with code specific to that
> type of editor part.
Absoluetly right ;-)
> If MultiPageEditorPart is the only editor blocking you right now, consider
> logging a PR requesting this feature, but as the editor parts inside the
> MultiPageEditorPart may not be as easily recognizable as TextEditor, if
> recognizable at all, it might be of limited use to you.
Thats my oppinion.
> Perhaps you could consider contributing a multiple clipboard API that
> editors could choose to adopt?
Hm .. well ... nice idea. But I\'m really new to eclipse api, and
actually I have no idea how to do that.
What do you think how one could start to implement such an api ?
Bye Tom