|
Re: [Xtext2.0] Validation [message #705219 is a reply to message #705166] |
Fri, 29 July 2011 15:27 |
|
Hi,
don't understand your problem:
Xtext 2.0
public class MyDslJavaValidator extends AbstractMyDslJavaValidator {
@Check
public void checkGreetingStartsWithCapital(Greeting greeting) {
if (!Character.isUpperCase(greeting.getName().charAt(0))) {
warning("Name should start with a capital", MyDslPackage.Literals.GREETING__NAME);
}
}
}
Xtext 1.0.x
@Check
public void checkGreetingStartsWithCapital(Greeting greeting) {
if (!Character.isUpperCase(greeting.getName().charAt(0))) {
warning("Name should start with a capital", MyDslPackage.GREETING__NAME);
}
}
~Christian
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
|
|
|
|
Powered by
FUDForum. Page generated in 0.03980 seconds