Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsUnable to show derived values in table colum
https://www.eclipse.org/forums/index.php/mv/msg/636038/1229945/#msg_1229945
Somehow, I don't manage to get a proper table for a very simple metamodel.
My meta model defines the concepts Model, Block, Terminal and Connection. The Model contains Block and Connection entities. The Block contains Terminal entities. Besides everybody having a 'name' feature, Connections refer to 2 Blocks by a 'from' and a 'to' reference.
Now I want to create a tabular representation of all Connections in the model. For each Connection, I would like to display its name, and the source and target of the Connection. The source of a connection is defined by the Terminal and the Block that contains it.
Given two Blocks 'a' and 'b', a connection 'c' between them should look like:
| Connection name | Source | terminal | Target | terminal |
| c | a | out | b | in |
(Here I assume that 'a' contains a Terminal named 'out' and 'b' contains a Terminal named 'in'.
I tried to create an Edition Table Description with Line Mapping for Connections. The column representing the connection name is trivial. However, I don't manage to refer to the name of the source block.
I think that I should create a Feature Column Mapping based on the 'name' feature. However, the name should not be taken from the Connection but from the Block containing the 'from' Terminal.
Therefore I tried a Feature Parent Expression like: [ self.from.eContainer() /]
This results in an empty column unfortunately. Any help would be appreciated.
Greetings,
Wilbert.
PS. Is there a reason why defining a feature named 'to' (counterpart of 'from') would be a bad idea? Does this lead to any reserved keyword conflicts?
]]>Wilbert Alberts2014-01-10T16:09:21-00:00Re: Unable to show derived values in table colum
https://www.eclipse.org/forums/index.php/mv/msg/636038/1230861/#msg_1230861
Anyhow, I got it working. Though I must say that I changed one thing. My workspace also contained the projects containing the meta models and generated code. I also exported them (to eclipse's dropins directory). As a result the metamodels were present in the workspace and in the plugin registry. Maybe that confused the Sirius tool.
Finally I closed the meta model related projects (so now they are only registered via the exported plugins).