|
|
|
|
|
|
Re: How to get from an EditPart to its Editor in Eclipse? [message #778168 is a reply to message #547188] |
Wed, 11 January 2012 14:13 |
Daniel Krügler Messages: 853 Registered: July 2009 |
Senior Member |
|
|
On 2010-07-15 22:59, SM wrote:
> I am writing an eclipse plug-in that extends editor. Inside the editor I
> put some EditParts. From some of these edit parts I need a reference to
> their encapsulating editor (so that for example, when clicking an
> instance of MyEditPart, I want to programmatically close the editor).
>
> Please advise on the API to get from an EditPart instance to the Editor
> it is in.
You seem to assume that there exists a (general) 1:1 mapping between
EditPart and an Eclipse Editor, but this does not exist. If you have
your own specific configuration, where this guarantee holds, you need to
define this mapping manually. This is especially easy, once you have
your own MyEditPart, because you could store a reference to the Editor
(or maybe to an IEditorDescriptor to be able to open a new editor if
needed).
HTH & Greetings from Bremen,
Daniel Krügler
|
|
|
Powered by
FUDForum. Page generated in 0.02451 seconds