| Summary: | Syntax errors in generated JvmModelInferer | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Modeling] TMF | Reporter: | Karsten Thoms <karsten.thoms> | ||||
| Component: | Xtext | Assignee: | Project Inbox <tmf.xtext-inbox> | ||||
| Status: | VERIFIED FIXED | QA Contact: | |||||
| Severity: | major | ||||||
| Priority: | P3 | CC: | sven.efftinge | ||||
| Version: | 2.0.0 | Flags: | sven.efftinge:
indigo+
|
||||
| Target Milestone: | RC1 | ||||||
| Hardware: | PC | ||||||
| OS: | Mac OS X - Carbon (unsup.) | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
pushed to master works after update |
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(); } }