Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 316706

Summary: Normal Checks no more performed on Save?
Product: [Modeling] TMF Reporter: Stephane Barbey <stephane>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED WORKSFORME QA Contact:
Severity: critical    
Priority: P3 CC: sebastian.zarnekow
Version: 1.0.0Flags: sebastian.zarnekow: helios+
Target Milestone: RC4   
Hardware: All   
OS: All   
Whiteboard:

Description Stephane Barbey CLA 2010-06-13 17:05:45 EDT
(I hope this is my environment or somehting I have overlooked, but) it looks like the CheckType.NORMAL checks are not performed on save anymore.

To reproduce:
(1) create the MyDSL project
(2) create a validator, such as
package org.xtext.example.mydsl.validation;

import org.eclipse.xtext.validation.Check;
import org.eclipse.xtext.validation.CheckType;
import org.xtext.example.mydsl.myDsl.Greeting;
import org.xtext.example.mydsl.myDsl.MyDslPackage;
 

public class MyDslJavaValidator extends AbstractMyDslJavaValidator {

	@Check (CheckType.NORMAL)
	public void checkFirst(Greeting greeting) {
		if (!Character.isUpperCase(greeting.getName().charAt(0))) {
			warning("Name should start with a capital", MyDslPackage.GREETING__NAME);
		}
	}
	
}

(3) start a runtime workbench,  type 
Hello sven!
Hello sebastian!

(4) save.

(5) nothing happens... No marker, but also no call to RessourceValidatorImpl.validate (nor to the ValidatingEditorCallback).

Using Xtext 1.0 RC4 on gallileo 3.5.2.
Comment 1 Sebastian Zarnekow CLA 2010-06-14 02:33:12 EDT
The sample works for me. Does the project have the Xtext-Nature assigned?
Comment 2 Sebastian Zarnekow CLA 2010-06-14 07:18:43 EDT
It turned out that Auto-Build was disabled.