Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » How to get EditPart of semantic element
How to get EditPart of semantic element [message #557872] Thu, 09 September 2010 10:02 Go to next message
123star  is currently offline 123star Friend
Messages: 70
Registered: June 2010
Member
Hi,

how can I get the EditPart of a semantic element? For example a Class or a Port?

Is there a tutorial that explains how to create EditPart programmatically from newly created semantic elements and then show them in the editor?

Thanks in advance, star123
Re: How to get EditPart of semantic element [message #635876 is a reply to message #557872] Thu, 28 October 2010 13:15 Go to previous messageGo to next message
Mostafa ElShafei is currently offline Mostafa ElShafeiFriend
Messages: 39
Registered: October 2010
Member
Hello,

I have the same problem. I do not know how to get the editpart from the semantic element.

Any solutions or updates please??

Thanks in advance. Smile
Re: How to get EditPart of semantic element [message #636015 is a reply to message #635876] Fri, 29 October 2010 00:21 Go to previous messageGo to next message
bachra04  is currently offline bachra04 Friend
Messages: 148
Registered: April 2010
Senior Member
I m not sure but is this what are you looking for :

http://dev.eclipse.org/newslists/news.eclipse.modeling.gmf/m sg13851.html
Re: How to get EditPart of semantic element [message #636049 is a reply to message #636015] Fri, 29 October 2010 07:47 Go to previous messageGo to next message
Mostafa ElShafei is currently offline Mostafa ElShafeiFriend
Messages: 39
Registered: October 2010
Member
Hello,

Thanks bachra04 for your reply.

Unfortunately, this is not what I am looking for. Sad

But, I'll try to give a good representation for my problem.


What I want to do exactly is when a diagram element is clicked, all its outgoing connections change their color.

I have already done a mouse listener to the XXXeditpart, when the diagram element is pressed I get all its outgoing connections -Elements-.
But the problem is how to get their Diagram element to be able to update their color?????


I've searched all over the internet and I haven't found any tutorial or information concerning my problem. Sad Sad

Any help will be highly appreciated Smile

Thank you in advance Smile

[Updated on: Fri, 29 October 2010 07:48]

Report message to a moderator

Re: How to get EditPart of semantic element [message #636106 is a reply to message #557872] Fri, 29 October 2010 10:31 Go to previous message
Jens von Pilgrim is currently offline Jens von PilgrimFriend
Messages: 313
Registered: July 2009
Senior Member
On 09.09.10 12:02, 123star wrote:
> how can I get the EditPart of a semantic element? For example a Class or
> a Port?

If your EditParts are created with the edit part factory, you can use

org.eclipse.gef.EditPartViewer.getEditPartRegistry()

This is pure GEF. Since you mention "semantic model", I'm not sure
whether you may refer to GMF? In that case, there are two models: a
semantic (or domain) model and the notation (or graphical model). The
latter one is the model of the edit part, while the first one is
associated with the notation model. GMF provides a mechanism for that
matter, just have a look at

org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramGraphicalVi ewer.findEditPartsForElement(String,
Class)

If you cannot use the edit part registry nor GMF's mechanism, you may
want to use a ReverseLookupManager I've written for GEF3D. You'll find
that in the SVN at

https://dev.eclipse.org/svnroot/technology/org.eclipse.gef3d /trunk/org.eclipse.gef3d.ext/src/java/org/eclipse/gef3d/ext/ reverselookup/

Cheers,
Jens
Previous Topic:Learn GEF at $499 - Online Training Introductory Offer
Next Topic:How to draw a SWT composite in a GEF container shape and diagram
Goto Forum:
  


Current Time: Tue Apr 16 19:39:01 GMT 2024

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

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

Back to the top