objects from the model [message #1775101] |
Tue, 24 October 2017 14:51 |
Breno Zupeli Messages: 8 Registered: October 2017 |
Junior Member |
|
|
Hi,
I'd like to access the objects from the model in memory to use in another method. For this, i have to use a extension with External Java Action, like this https://www.eclipse.org/sirius/doc/specifier/general/Model_Operations.html#extensions
in the code bellow, i can access the information about style, but it's not what I want.
@Override
public void execute(Collection<? extends EObject> selections, Map<String, Object> parameters) {
for(EObject obj : selections) {
TreeIterator<EObject> eAllContents = obj.eAllContents();
while(eAllContents.hasNext()) {
EObject next = eAllContents.next();
EList<EAttribute> nameElement = next.eClass().getEAllAttributes();
}
}
}
I want information about the packages, classes, attributes, etc of the model.
How can I do this? It's possible? Sorry, I'm a beginner in sirius.
Thanks
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03266 seconds