| Summary: | [domainmodel] Use filter in DomainmodelGenerator | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Modeling] TMF | Reporter: | Karsten Thoms <karsten.thoms> | ||||
| Component: | Common | Assignee: | Project Inbox <tmf.common-inbox> | ||||
| Status: | RESOLVED WORKSFORME | QA Contact: | |||||
| Severity: | trivial | ||||||
| Priority: | P3 | CC: | christian.dietrich.opensource | ||||
| Version: | 2.0.0 | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | Macintosh | ||||||
| OS: | Mac OS X | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
Created attachment 193320 [details]
proposed patch
Domainmodel example is now based on jvm model inferrer. other examples use filter |
In the Xtend class DomainmodelGenerator there is still a TODO to use filtering: override void doGenerate(Resource resource, IFileSystemAccess fsa) { // TODO: use filter for(element: resource.allContentsIterable) { if(element instanceof Entity) { val entity = element as Entity fsa.generateFile(entity.fileName, entity.compile) } } } This snippet should be changed to: override void doGenerate(Resource resource, IFileSystemAccess fsa) { for(entity: resource.allContentsIterable.filter(typeof(Entity))) { fsa.generateFile(entity.fileName, entity.compile) } }