Bug 440880 - [Xbase] Revise and publish JvmModelGenerator
Summary: [Xbase] Revise and publish JvmModelGenerator
Status: NEW
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 2.6.1   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 409500
Blocks: 440881
  Show dependency tree
 
Reported: 2014-07-31 08:11 EDT by Sven Efftinge CLA
Modified: 2015-11-11 04:15 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Efftinge CLA 2014-07-31 08:11:42 EDT

    
Comment 1 Miro Spönemann CLA 2015-03-03 10:08:00 EST
Some thoughts that could be considered.

The ITreeAppendable and the GeneratorConfig are passed through all methods of JvmModelGenerator. However, the GeneratorConfig is not passed to the Compiler, so it was put into the SharedAppendableState in order to make it available. Now the TreeAppendable and the SharedAppendableState are responsible for a considerable number of concepts:

 * Append code
 * Manage variable scopes
 * Trace between model and code
 * Provide the import manager
 * Provide the generator configuration

I would propose to separate these concepts from each other. For example, we could define a GeneratorContext that is passed through the JvmModelGenerator and the Compiler. Each of the concepts above could be defined in its own class and be accessed through the GeneratorContext.