I am writing an eclipse plug-in that extends editor (UMLDiagramEditor). 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.

first, I don't know how to get the Editor for an EditPart. But maybe this forum isn't the right one because it rather looks like a GMF-related question. Maybe you should place your question in the GMF-Forum and link this thread to the new GMF-Thread.

Besides: I don't know your exact requirement but maybe it would do to only get the active editor. This could be a lot easier.