Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsCross References (Scoping) without names
https://www.eclipse.org/forums/index.php/mv/msg/682448/1282480/#msg_1282480
I would like to use Scoping but my objects don't have nice human readable names but 25 digits UIDs.
I would like to use the descriptions of the objects. Since they are not unique I would add a counter. So like 'K1("the description containing spaces")'.
Is this possible?
More details:
I have a Query emf model edited in a form based editor.
Within a Query one can define Key Figures. Key figures have a 25 digits UID and a description.
Queries also contain Formulas. For Formula I have developed the grammar with Xtext. Basically one can do arithmetic with double numbers and the key figures. So key figures are the cross references I want to use.
If there is a key figure with the description "My Amount" I would like to use "K1("My Amount") as Qualifier.
I did not succeed providing this in the IScope impl since it is expecting an ID (refering to terminals.ID) correct? Content Assist did not work for the cross references and if entered by key board the syntax check reported an error.
Thanks, Marcus
]]>Marcus Höpfner2014-04-02T11:15:30-00:00Re: Cross References (Scoping) without names
https://www.eclipse.org/forums/index.php/mv/msg/682448/1282484/#msg_1282484
If the UID's can be converted to something human readable (in content assist, the editor, ...) using e.g. a ValueConverter.
Is this possible?
Maybe this is the even the better solution since UID's a full qualified names. ]]>Marcus Höpfner2014-04-02T11:23:17-00:00Re: Cross References (Scoping) without names
https://www.eclipse.org/forums/index.php/mv/msg/682448/1282485/#msg_1282485
i am not sure if this answers your question xxx=[YYY] stands for xxx=[YYY|ID] wich means "by ID" so you have to use xxx=[YYY|STRING]
update: the rest is a matter of scoping respectively IQualifiedNameProvider]]>Christian Dietrich2014-04-02T11:23:48-00:00Re: Cross References (Scoping) without names
https://www.eclipse.org/forums/index.php/mv/msg/682448/1282494/#msg_1282494
]]>Marcus Höpfner2014-04-02T11:38:12-00:00Re: Cross References (Scoping) without names
https://www.eclipse.org/forums/index.php/mv/msg/682448/1282510/#msg_1282510
Christian Dietrich2014-04-02T12:05:41-00:00Re: Cross References (Scoping) without names
https://www.eclipse.org/forums/index.php/mv/msg/682448/1282517/#msg_1282517
http://christiandietrich.wordpress.com/2011/07/16/iqualifiednameproviders-in-xtext-2-0/]]>Christian Dietrich2014-04-02T12:14:01-00:00Re: Cross References (Scoping) without names
https://www.eclipse.org/forums/index.php/mv/msg/682448/1283191/#msg_1283191
thank a lot.
That's a quite nice feature (yyy=[Xxx|String] and really simple.
You should mention it in the documentation. (I didn't find it)
I use a Scope to provide objects and qualified names since I need to provide a counter in each of the qualified names (S1..., S2..., S3...) so I need to calculate them all at once.
In a QualifiedNameProvider this would be more complicated I guess.]]>Marcus Höpfner2014-04-03T06:22:38-00:00Re: Cross References (Scoping) without names
https://www.eclipse.org/forums/index.php/mv/msg/682448/1283202/#msg_1283202
Christian Dietrich2014-04-03T06:38:59-00:00