Skip to content

Commit

Permalink
Merge pull request #2023 from eclipse/cd_issue2022
Browse files Browse the repository at this point in the history
Make more clear how to inject IQualifiedNameProvider into Generator
  • Loading branch information
cdietrich authored Jan 8, 2022
2 parents 5d871df + 80a6718 commit 5faec73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xtext-website/documentation/103_domainmodelnextsteps.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ First of all, locate the file *DomainmodelGenerator.xtend* in the package *org.e
}
```
1. Now let's answer the question how we determine the file name of the Java class that each *Entity* should yield. This information should be derived from the qualified name of the *Entity* since Java enforces this pattern. The qualified name itself has to be obtained from a special service that is available for each language. Fortunately, Xtend allows to reuse that one easily. We simply inject the [IQualifiedNameProvider]({{site.src.xtext_core}}/org.eclipse.xtext/src/org/eclipse/xtext/naming/IQualifiedNameProvider.java) into the generator.
1. Now let's answer the question how we determine the file name of the Java class that each *Entity* should yield. This information should be derived from the qualified name of the *Entity* since Java enforces this pattern. The qualified name itself has to be obtained from a special service that is available for each language. Fortunately, Xtend allows to reuse that one easily. We simply inject the [IQualifiedNameProvider]({{site.src.xtext_core}}/org.eclipse.xtext/src/org/eclipse/xtext/naming/IQualifiedNameProvider.java) as a field into the generator.
```xtend
@Inject extension IQualifiedNameProvider
Expand Down

0 comments on commit 5faec73

Please sign in to comment.