[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
Re: How to get the actual Editor of a MultiPageEditorPart from outside ?
|
You are correct. MultiPageEditorPart does not allow you to get the active
editor part. I would suggest that you subclass MultiPageEditorPart to get
this functionality, but it doesn't sound like you are making any new
editors.
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.
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.
Perhaps you could consider contributing a multiple clipboard API that
editors could choose to adopt?
Thanks,
Chris.
"Tom Döhler" <tom_doehler@xxxxxx> wrote in message
news:ajd79n$1rv$1@xxxxxxxxxxxxxxxx
> Hi,
>
> I need to get the active (inner-) Editor of a MultiPageEditorPart. There
> ise a Method getActiveEditor(), but this is protected and I need to call
> it from "outside".
>
> What I want to do is to extend eclipse with multiple clipboards.
> For a TextEditor everything works fine, because i can call
> editor.getDocumentProvider().getDocument(...) and document.replace(...)
> for the opaste action. But for the multipageeditorpart it doesn't work,
> because of the protected scope of the getActiveEditor() - method ...
>
> How can I get around this?
>
> Thank you, bye Tom
>