|
Re: Scoping specific GMF elements in xtext grammar [message #1060309 is a reply to message #1060271] |
Fri, 24 May 2013 06:36 |
Alexander Nittka Messages: 1193 Registered: July 2009 |
Senior Member |
|
|
Hi,
I cannot help you with the GMF-related part, but better practice is not to adapt the scoping but rather do validation (and code completion). Limiting the scope will result in generic "could not resolve reference"-errors (yes, you could also adapt those messages). If you implement validation, you can give the user specific error messages, like "you cannot reference X here, because...".
Think of a java assignment:
Long x=(String)y;
What would you think of the java tooling, if you were told that the type String could not be found? After all, it's there (Visibility vs validitiy).
Alex
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext@itemis.de
|
|
|
|
Powered by
FUDForum. Page generated in 0.03044 seconds