Programmatical creation [message #1759430] |
Tue, 11 April 2017 12:16  |
Eclipse User |
|
|
|
Hi,
In order to modify OCL ASTs I would like to create an OperationCallExp to replace one I don't like (with(in) reason). I want to instantiate an "oclIsTypeOF" operation.
Creating the OperationCallExp object is made easy thanks the EcoreFactory, and modifying its fields is straight forward using Ecore eSetters. Plugin a source, changing operation code is ok.
Troubles to perform the creation happen when I try to instantiate an EOperation to fill the referredOperation field. I've tried many ways, investigated in the Ecore code and documentation, but I can't make it.
Do you have any hint where to look for in the documentation and/or code and/or test code to instantiate such EOperation from scratch (I mean, no parsing) ?
Thank you,
Edouard
[Updated on: Tue, 11 April 2017 12:19] by Moderator
|
|
|
|
Re: Programmatical creation [message #1759440 is a reply to message #1759436] |
Tue, 11 April 2017 13:35  |
Eclipse User |
|
|
|
Quote:Programmatically, IIRC there is an additionalOperations capability to register alien operations
Alien ?
I'm modifying OCL within its own boundaries. Operations I want to (re)create are OCL operations : "oclIsTypeOf", "=", "<>", etc.
|
|
|
Powered by
FUDForum. Page generated in 0.04531 seconds