Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Get EditPart in the NavigatorActionProvider(Get EditPart in the NavigatorActionProvider)
Get EditPart in the NavigatorActionProvider [message #891862] Tue, 26 June 2012 11:19 Go to next message
Sarath Rachakonda is currently offline Sarath RachakondaFriend
Messages: 16
Registered: May 2012
Junior Member
Hi,

How to get EditPart and View objects in the NavigatorActionProvider where i have only model EObject. I need this to invoke EditPart's setSelection method so that it will be selected in the editor. Currently if i select model element in the project explorer corresponding EditPart is not selected.

Please provide inputs on this

Thanks,
Sarath
Re: Get EditPart in the NavigatorActionProvider [message #892759 is a reply to message #891862] Fri, 29 June 2012 13:56 Go to previous message
Manuel Ihlenfeld is currently offline Manuel IhlenfeldFriend
Messages: 6
Registered: June 2012
Junior Member
Sarath,

maybe the following could help you:

String id = EcoreUtil.getID(modelEObject);

IDiagramWorkbenchPart#getDiagramGraphicalViewer().findEditPartsForElement(id,
Object.class)

Generated diagram editors are instances of IDiagramWorkbenchPart.

(View) editPart.getModel() returns an EditPart's View object.

Also note the generated XyzDiagramEditorUtil.selectElementsInDiagram(..)
method.

Regards,
Manuel
Previous Topic:Creation Problem with connector of PolylineConnectionEx type
Next Topic:EEF advanced screen
Goto Forum:
  


Current Time: Thu Apr 25 15:16:46 GMT 2024

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

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

Back to the top