Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 264837

Summary: Default Extension File for Model
Product: [Modeling] TMF Reporter: Christian Dietrich <christian.dietrich.opensource>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: knut.wannheden, sebastian.zarnekow, sven.efftinge
Version: 0.7.0Keywords: helpwanted
Target Milestone: M3Flags: sven.efftinge: helios+
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
checks extension patch sven.efftinge: iplog+

Description Christian Dietrich CLA 2009-02-13 08:31:25 EST
There is not default extension file generated (Extensions.ext) as it was in oAW Xtext 4.3.1
Comment 1 Sven Efftinge CLA 2009-02-13 08:36:29 EST
What extensions should it contain?
Comment 2 Christian Dietrich CLA 2009-02-13 08:48:41 EST
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
   .... 
Comment 3 Christian Dietrich CLA 2009-02-13 08:55:58 EST
So the file can be created empty
Comment 4 Sebastian Zarnekow CLA 2009-04-17 11:27:09 EDT
Contributions are welcome.
Comment 5 Knut Wannheden CLA 2009-04-24 03:41:48 EDT
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).
Comment 6 Sven Efftinge CLA 2009-08-13 16:33:38 EDT
I think it should be generated by the Check fragment.
Comment 7 Knut Wannheden CLA 2009-08-24 04:54:03 EDT
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.
Comment 8 Sven Efftinge CLA 2009-09-29 05:18:14 EDT
please apply
Comment 9 Sebastian Zarnekow CLA 2009-10-01 07:32:30 EDT
Please feel free to apply the patch.
Comment 10 Sebastian Zarnekow CLA 2009-11-09 07:57:14 EST
Patch applied. Thanks.
Comment 11 Karsten Thoms CLA 2017-09-19 15:54:37 EDT
Closing bug which were set to RESOLVED before Eclipse Neon.0.