[XText] cross reference ... lazy [message #62519] |
Wed, 22 July 2009 09:01  |
Eclipse User |
|
|
|
Hello *,
cross references are great. I played with them in the last minutes. But I search
a more lazy way for usage. Example (XText) :
===
Service :
'service' name = ID '{' '}';
Invoke :
'invoke' action = [Service|ID] ';';
===
DSLs code:
===
service one {}
service two {}
invoke one;
invoke two;
===
But there are more services than written in this file. However, it would be
great, if "invoke (one|two);" would be an proprosal. An "invoke three;" should
be no error in the generated editor.
How can I modify my grammar for this?
Ciao, Micha
|
|
|
|
|
Re: [XText] cross reference ... lazy [message #62777 is a reply to message #62755] |
Wed, 22 July 2009 10:54  |
Eclipse User |
|
|
|
Hi Michael,
in this case I'ld advise you to not use cross references but plain text
instead. You can use validation rules to provide feedback for the user.
Another possibility is to create the services on demand when a link
should be resolved. Note that this is a tough task and requires
detailled knowledge about the architecture and lifecylce. But this way
round it would be easier to provide content assist for available services.
Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
Am 22.07.2009 16:48 Uhr, schrieb Michael Burkhardt:
> Hi Sebastian,
>
> > you'ld have to implement a scope provider that creates a scope which in
> > turn contains all available services.
> Its a language for a distributed system. There is no difference between
> 'available, but currently unknown' and 'named, but not available'.
>
> In this case, my scope provider should accept all Invoke.action strings.
>
> Ciao, Micha
>
>
> --- Original-Nachricht ---
> Absender: Sebastian Zarnekow
> Datum: 22.07.2009 15:20
>> Hi Michael,
>>
>> you'ld have to implement a scope provider that creates a scope which
>> in turn contains all available services. ContentAssist and linking
>> will work out of the box with it.
>> Otherwise you may try to use plain IDs and do some validation but this
>> way round you'ld have to implement custom content assist.
>>
>> Hope that helps,
>> Sebastian
>>
|
|
|
Powered by
FUDForum. Page generated in 0.20765 seconds