| Summary: | Default Extension File for Model | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Modeling] TMF | Reporter: | Christian Dietrich <christian.dietrich.opensource> | ||||
| Component: | Xtext | Assignee: | Project Inbox <tmf.xtext-inbox> | ||||
| Status: | CLOSED FIXED | QA Contact: | |||||
| Severity: | enhancement | ||||||
| Priority: | P3 | CC: | knut.wannheden, sebastian.zarnekow, sven.efftinge | ||||
| Version: | 0.7.0 | Keywords: | helpwanted | ||||
| Target Milestone: | M3 | Flags: | sven.efftinge:
helios+
|
||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Christian Dietrich
What extensions should it contain? I just expect the behavior that i find in oaw 4.3.1 I have a file! created for me and included e.g. in the check file ( and the root template) so that i do not have to to this on my own. In oAW 4.3.1 this is the project structure my.dsl -src -org.example.dsl -Checks.chk - Extensions.ext <- I want this back .... So the file can be created empty Contributions are welcome. If I create a project as proposed by the Xtext project wizard with runtime project name "org.xtext.example.mydsl" and grammar name "org.xtext.example.MyDsl" then I will get the following (after a generation run): org.xtext.example.mydsl - src - org.xtext.example - MyDslRuntimeModule.java - GenerateMyDsl.mwe - GenerateMyDsl.properties - MyDsl.xtext - MyDslChecks.chk - src-gen - org.xtext.example - MyDsl.ecore - org.xtext.example.mydsl - MyDslPackage.java In the same vein the default Xtend file should include the "MyDsl" prefix: MyDslExtensions.ext. This can be important when there are multiple projects as they will typically (using this default naming strategy) have the same top level package (i.e. org.xtext.example or com.mycompany.fooproduct) containing the grammar and the extension file. If the file were only called Extensions.ext unexpected things may happen at runtime (wrong file loaded from classpath). I think it should be generated by the Check fragment. Created attachment 145389 [details]
checks extension patch
With the attached patch the CheckFragment will generate a MyDslExtensions.ext file into the validation package and also add a corresponding "extension" statement to each of the three "chk" files.
please apply Please feel free to apply the patch. Patch applied. Thanks. Closing bug which were set to RESOLVED before Eclipse Neon.0. |