Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Deprecating keywords
Deprecating keywords [message #1806986] Mon, 20 May 2019 17:16 Go to next message
Mehmetcan Sinir is currently offline Mehmetcan SinirFriend
Messages: 55
Registered: September 2018
Member
Is there a way to mark properties as deprecated in xText.

Rule:
'rule' name=ID '{',
('validProperty') |
( 'deprecatedProperty')
'}'

I can mark the rule itself with @Deprecated , but not the property 'deprecatedProperty'

I other words, how can I best deprecate a keywords, so that I can validate it in the client, as soon as the user uses the keyword?

How can I deprecate this property and how can I validate it in the client?

[Updated on: Mon, 20 May 2019 17:18]

Report message to a moderator

Re: Deprecating properties [message #1806987 is a reply to message #1806986] Mon, 20 May 2019 17:17 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
There is no. You have to implement the validator yourself

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Deprecating properties [message #1806988 is a reply to message #1806987] Mon, 20 May 2019 17:19 Go to previous messageGo to next message
Mehmetcan Sinir is currently offline Mehmetcan SinirFriend
Messages: 55
Registered: September 2018
Member
Okay is there an example for accessing the keywords as the user types them.
I know that the Parser does it, but how can we do it inside a validator?

The parser but inside a validator, I only have access to the EObjects not the tokens that the user types?

[Updated on: Mon, 20 May 2019 17:22]

Report message to a moderator

Re: Deprecating properties [message #1806990 is a reply to message #1806988] Mon, 20 May 2019 17:30 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Maybe you can recycle some modemodelutils usages e.g from here
https://blogs.itemis.com/en/xtext-usability-hovers-on-keywords


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Whitespace validator in XText
Next Topic:Formatter problems
Goto Forum:
  


Current Time: Fri Apr 26 04:20:22 GMT 2024

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

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

Back to the top