Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » [ECL] How can I determine a type from a set
[ECL] How can I determine a type from a set [message #1353064] Tue, 13 May 2014 19:14 Go to next message
Alexander Fülleborn is currently offline Alexander FüllebornFriend
Messages: 132
Registered: April 2013
Senior Member
Hi Dimitris,

I have a short question: I need to get the type from a dependency supplier property. I do not know how to determine this. This is the example:

If I print the following to the console:
(Dependency): "self.supplier.println();" I receive a set: "Set {Operation [name = method, ...}". I would like to get the type "Operation" from this set, as I need to compare it against the type of another set.

Can you tell me how to do this, please?

Thanks in advance and kind regards, Alex
Re: [ECL] How can I determine a type from a set [message #1353106 is a reply to message #1353064] Tue, 13 May 2014 19:35 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

Hi Alex,

Does self.supplier.first().eClass().name do the trick?

Cheers,
Dimitris
Re: [ECL] How can I determine a type from a set [message #1353209 is a reply to message #1353106] Tue, 13 May 2014 20:37 Go to previous messageGo to next message
Alexander Fülleborn is currently offline Alexander FüllebornFriend
Messages: 132
Registered: April 2013
Senior Member
Hi Dimitris,

yes, it does! Great, thanks! Btw: Would it have been possible to find this out myself via any literature? I have looked closely into the Epsilon book, but did not find the answer you gave me.... Just to be aware Wink.

Thanks and kind regards, have a nice evening, Alex
Re: [ECL] How can I determine a type from a set [message #1353292 is a reply to message #1353209] Tue, 13 May 2014 21:28 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

Hi Alex,

I'm glad this helped. eClass() is an EMF method - it's worth keeping in mind that all model elements in EMF-based models implement the EObject interface [1] which provides several useful methods (e.g. eClass(), eContainer(), eContents() etc.).

Cheers,
Dimitris

[1] http://download.eclipse.org/modeling/emf/emf/javadoc/2.4.2/org/eclipse/emf/ecore/EObject.html

[Updated on: Tue, 13 May 2014 21:29]

Report message to a moderator

Re: [ECL] How can I determine a type from a set [message #1372401 is a reply to message #1353292] Wed, 21 May 2014 20:35 Go to previous message
Alexander Fülleborn is currently offline Alexander FüllebornFriend
Messages: 132
Registered: April 2013
Senior Member
Hi Dimitris,

thanks a lot for the information.

Kind regards, Alex
Previous Topic:Calling ETL + EGL from Eclipse builder: which approach?
Next Topic:[ECL] How to count the number of elements of a model
Goto Forum:
  


Current Time: Sat Apr 20 00:06:18 GMT 2024

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

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

Back to the top