Skip to main content



      Home
Home » Modeling » TMF (Xtext) » How can i scope Strings or IDs?
How can i scope Strings or IDs? [message #1753273] Fri, 03 February 2017 04:41 Go to next message
Eclipse UserFriend
Hello there,

in my grammar i have a path that looks like this:

attribute=ID

i want to scope the possible IDs in the same way i can do it with references.

How can i achieve this?
Re: How can i scope Strings or IDs? [message #1753274 is a reply to message #1753273] Fri, 03 February 2017 04:42 Go to previous messageGo to next message
Eclipse UserFriend
can you please elaborate what you mean by that?

you can add validations and adapt content assist if this is what you mean.
or introduce an enum
Re: How can i scope Strings or IDs? [message #1753276 is a reply to message #1753273] Fri, 03 February 2017 04:45 Go to previous messageGo to next message
Eclipse UserFriend
Make sure that the referrable elements are in the index and use cross references to the elements you want to refer to:
attribute=[Attribute|ID]
Depending on your use case you have to customize your IScopeProvider and/or IQualifiedNameProvider.
Re: How can i scope Strings or IDs? [message #1753277 is a reply to message #1753276] Fri, 03 February 2017 04:50 Go to previous messageGo to next message
Eclipse UserFriend
@Karsten: thx for your answer but i cant use a reference.

@Christian: Thx for your answer too. that sounds what i want to do, where should i start?
Re: How can i scope Strings or IDs? [message #1753278 is a reply to message #1753277] Fri, 03 February 2017 05:02 Go to previous messageGo to next message
Eclipse UserFriend
MyDslValidator => see greeting example and MyDslProposalProvider => there should be "complete_XXXX and completeXXXX_yyyy" methods in the superclass you can override
Re: How can i scope Strings or IDs? [message #1753284 is a reply to message #1753278] Fri, 03 February 2017 05:16 Go to previous message
Eclipse UserFriend
That was easy. thank you christian.
Previous Topic:[SOLVED] Where is FormatterTestHelper?
Next Topic:Mutliline string concatenation
Goto Forum:
  


Current Time: Sat Jun 14 05:17:04 EDT 2025

Powered by FUDForum. Page generated in 0.05358 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top