Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » all() / allInstances() working - allOfType() / allOfKind() not found
all() / allInstances() working - allOfType() / allOfKind() not found [message #1853755] Sat, 16 July 2022 21:31 Go to next message
Glatz Martin is currently offline Glatz MartinFriend
Messages: 23
Registered: March 2016
Junior Member
Hello ,

I'm experiencing a behaviour, which was already described in https://www.eclipse.org/forums/index.php/m/1549355/?srch=allOfType#msg_1549355

Basically I want to get all instances of a specific class.

I'm facing two problems:

When I use ClassName.all() the call returns the instances, but they are packed in a Sequence instead of a Set as described in the documentation?

In addition I experience the same strange errors as in the linked discussion.

ClassName.all() works fine
ClassName.allOfKind() -> allOfKind not found
ClassName.allInstances() works fine
ClassName.allOfType() -> allOfType not found

Does anyone have an idea, why allOfKind() isn't working, but all (which is based on the docs only an alias) works fine?

Thanks & best regards
Martin
Re: all() / allInstances() working - allOfType() / allOfKind() not found [message #1853766 is a reply to message #1853755] Sun, 17 July 2022 09:13 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 Martin,

Could you please share a minimal example we can use to reproduce the behaviour you are encountering?

Best,
Dimitris
Re: all() / allInstances() working - allOfType() / allOfKind() not found [message #1853773 is a reply to message #1853766] Sun, 17 July 2022 21:40 Go to previous messageGo to next message
Glatz Martin is currently offline Glatz MartinFriend
Messages: 23
Registered: March 2016
Junior Member
Hi Dimitris,

attached you can find a minimal example.

I was able to reproduce with this example the following issues:

.all returns a Sequence
.allofType not found for : Tree

Somehow allOfKind works in this scenario, but maybe it gets clear whats the problem already based on the attachmend and I can update my programm accordingly for allofKind afterwards.

I'm using btw the following Epsilon version:

Epsilon Core 2.4.0.202203041826

Thanks in advance,
Best regards
Martin
Re: all() / allInstances() working - allOfType() / allOfKind() not found [message #1853785 is a reply to message #1853773] Mon, 18 July 2022 09:04 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 Martin,

The name of the method for retrieving all direct instances of a type is "getAllOfType()". "allOfType" also works as the EOL execution engine will try to delegate this pseodo-property call to a "getAllOfType()" operation, but "allOfType()" won't work. Regarding your other question, getAllOfType(), getAllOfKind() etc. return collections - not necessarily sets. I have updated the documentation accordingly.

Best,
Dimitris
Re: all() / allInstances() working - allOfType() / allOfKind() not found [message #1853922 is a reply to message #1853785] Sat, 23 July 2022 12:27 Go to previous message
Glatz Martin is currently offline Glatz MartinFriend
Messages: 23
Registered: March 2016
Junior Member
Hi Dimitris,
thanks - that solved my problem.
Best regards,
Martin
Previous Topic:How to run Epsilon from Java
Next Topic:Models with multipe files and only file reference - preferred approach EVL
Goto Forum:
  


Current Time: Sat Apr 20 04:25:29 GMT 2024

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

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

Back to the top