Community
Participate
Working Groups
Created attachment 195333 [details] Test project When introducing Xbase to a DSL and generate the DSL, the initially created JvmModelInferrer xtend class has syntax errors. To reproduce import the attached project and run the workflow. - import com.google.inject.Inject is missing - instance name for injected associator is missing ============================================== GENERATED: ============================================== package org.xtext.example.mydsl.jvmmodel import org.eclipse.xtext.xbase.jvmmodel.* import org.eclipse.xtext.common.types.* import org.eclipse.emf.ecore.EObject import java.util.List import com.google.inject.Inject /** * <p>Infers a JVM model from the source model.</p> * * <p>The JVM model should contain all elements that would appear in the Java code * which is generated from the source model. * Other Xtend models link against the JVM model rather than the source model. The JVM * model elements should be associated with their source element by means of the * {@link IJvmModelAssociator}.</p> */ class MyDslJvmModelInferrer implements IJvmModelInferrer { @Inject IJvmModelAssociator jvmModelAssociator override List<? extends JvmDeclaredType> inferJvmModel(EObject sourceObject) { return newArrayList(); } } ============================================== FIXED: ============================================== package org.xtext.example.mydsl.jvmmodel import org.eclipse.xtext.xbase.jvmmodel.* import org.eclipse.xtext.common.types.* import org.eclipse.emf.ecore.EObject import java.util.List /** * <p>Infers a JVM model from the source model.</p> * * <p>The JVM model should contain all elements that would appear in the Java code * which is generated from the source model. * Other Xtend models link against the JVM model rather than the source model. The JVM * model elements should be associated with their source element by means of the * {@link IJvmModelAssociator}.</p> */ class MyDslJvmModelInferrer implements IJvmModelInferrer { @Inject IJvmModelAssociator override List<? extends JvmDeclaredType> inferJvmModel(EObject sourceObject) { return newArrayList(); } }
pushed to master
works after update