Skip to main content



      Home
Home » Modeling » TMF (Xtext) » Deprecating keywords
Deprecating keywords [message #1806986] Mon, 20 May 2019 13:16 Go to next message
Eclipse UserFriend
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 13:18] by Moderator

Re: Deprecating properties [message #1806987 is a reply to message #1806986] Mon, 20 May 2019 13:17 Go to previous messageGo to next message
Eclipse UserFriend
There is no. You have to implement the validator yourself
Re: Deprecating properties [message #1806988 is a reply to message #1806987] Mon, 20 May 2019 13:19 Go to previous messageGo to next message
Eclipse UserFriend
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 13:22] by Moderator

Re: Deprecating properties [message #1806990 is a reply to message #1806988] Mon, 20 May 2019 13:30 Go to previous message
Eclipse UserFriend
Maybe you can recycle some modemodelutils usages e.g from here
https://blogs.itemis.com/en/xtext-usability-hovers-on-keywords
Previous Topic:Whitespace validator in XText
Next Topic:Formatter problems
Goto Forum:
  


Current Time: Sat Mar 15 06:29:47 EDT 2025

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

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

Back to the top