Find the fe of a ce

How to find the functional exchanges of an exchange item?
it seems hard to start from an exchange item.

There is no direct EReference from ExchangeItem to FuncionalExchange, but you can use the opposite of the EReference exchangedItems:

myExchangeItem.eInverse('exchangedItems')

Thanks! But I failed to get the result.



How to decide which string to write in the ‘()’? I’ve also seen ‘target’.

Another question, if I write my own plugin project and call them in the service class using Template Wizard, should the plugin project must be in the same workspace? Otherwise it seems the service class cannot be called.

The String passed as parameter of the eInverse() service is the name of the EReference you want to navigate in the opposite direction. You can get the list of all features of an EClass using the following AQL expression:

fa::FunctionalExchange.eAllStructuralFeatures


In the screen shot above you can see the EReference and its type ExchangeItem.

The name in the GUI might also reflect the name of the EReference:


Here we can see the referenced ExchangeItem for the FunctionalExchange Audio-Video Stream. And If we select this ExchangeItem the above expression returns the FunctionalExchange:

When you write a Java service the plugin need to be deployed, so you need to launch a runtime if you are in development mode. If you are in production, you will need to install the plugin in your production Capella. To do this you need to create an update site and so on. You can find more details in this thread.