Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Using EStructuralFeature
Using EStructuralFeature [message #1787230] Tue, 22 May 2018 13:25 Go to next message
Breno Zupeli is currently offline Breno ZupeliFriend
Messages: 8
Registered: October 2017
Junior Member
I have to get all EStructuralFeature elements in a list.
Now I'm using it this way:
EObject model = ....
EStructuralFeature packagedElement = model.eClass().getEStructuralFeature("packagedElement");
EcoreEList list = (EcoreEList) model.eGet(packagedElement);


But I'd like to use like this:
List<EStructuralFeature> controllers = model.eClass().getEStructuralFeatures().stream().filter(x -> x instanceof ViewPackage).collect(Collectors.toList());


How can I do this?
Using getEStructuralFeatures or getAllEStructuralFeatures? Both return an empty list, but getEStructuralFeature("packagedElement") return an element.
Re: Using EStructuralFeature [message #1787240 is a reply to message #1787230] Tue, 22 May 2018 16:03 Go to previous messageGo to next message
Laurent Redor is currently offline Laurent RedorFriend
Messages: 238
Registered: July 2009
Senior Member
Hi,

What is the link with Sirius?
It seems that your question is more general and should be in EMF forum [1]. No?

[1] https://www.eclipse.org/forums/index.php?t=thread&frm_id=108

Regards,

Laurent


Laurent Redor - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Using EStructuralFeature [message #1787242 is a reply to message #1787240] Tue, 22 May 2018 16:12 Go to previous message
Breno Zupeli is currently offline Breno ZupeliFriend
Messages: 8
Registered: October 2017
Junior Member
Yes, I'm sorry for the mistake. Thank you!
Previous Topic:Rotating a diagram element
Next Topic:Node position on creation
Goto Forum:
  


Current Time: Fri Nov 16 05:08:13 GMT 2018

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

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

Back to the top