Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Ways to navigate to the DiagramDocumentEditor instance
Ways to navigate to the DiagramDocumentEditor instance [message #114159] Sun, 25 March 2007 14:51
Eclipse UserFriend
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
Previous Topic:Problem with EditHelperAdvice
Next Topic:Feature-independent initializer
Goto Forum:
  


Current Time: Tue Jul 22 15:58:15 EDT 2025

Powered by FUDForum. Page generated in 0.06481 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top