Ways to navigate to the DiagramDocumentEditor instance [message #114159] |
Sun, 25 March 2007 14:51 |
Eclipse User |
|
|
|
Hi all,
how can I navigate to the instance of the associated
DiagramDocumentEditor(s) with only an EObject or EditPart at hand?
So far, I do the following:
// Get diagram.
IWorkbench workbench =
MosaicplDiagramEditorPlugin.getInstance().getWorkbench();
IWorkbenchPage activePage =
workbench.getActiveWorkbenchWindow().getActivePage();
IEditorPart activeEditor = activePage.getActiveEditor();
MosaicplDiagramEditor mosaicplDiagramEditor =
(MosaicplDiagramEditor) activeEditor;
mosaicplDiagramEditor.myFunc();
This is obviously causing trouble, e.g. when the editor is not visible
yet, when the application starts up.
Is it possible by going via the RootEditPart of a given EditPart?
Thanks for your help,
Martin
|
|
|
Powered by
FUDForum. Page generated in 0.06481 seconds