Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 342916 - [domainmodel] Use filter in DomainmodelGenerator
Summary: [domainmodel] Use filter in DomainmodelGenerator
Status: RESOLVED WORKSFORME
Alias: None
Product: TMF
Classification: Modeling
Component: Common (show other bugs)
Version: 2.0.0   Edit
Hardware: Macintosh Mac OS X
: P3 trivial (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-15 00:00 EDT by Karsten Thoms CLA
Modified: 2016-08-19 02:43 EDT (History)
1 user (show)

See Also:


Attachments
proposed patch (1.23 KB, patch)
2011-04-15 00:18 EDT, Karsten Thoms CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Karsten Thoms CLA 2011-04-15 00:00:31 EDT
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)
    }
  }
Comment 1 Karsten Thoms CLA 2011-04-15 00:18:15 EDT
Created attachment 193320 [details]
proposed patch
Comment 2 Christian Dietrich CLA 2016-08-19 02:43:50 EDT
Domainmodel example is now based on jvm model inferrer.
other examples use filter