Skip to content

Commit

Permalink
Added resolution tests for call/declaration before/after.
Browse files Browse the repository at this point in the history
  • Loading branch information
ylussaud committed Jan 25, 2024
1 parent 28a6e70 commit 28ac8a8
Show file tree
Hide file tree
Showing 32 changed files with 216 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

header position 0..53
module m1
metamodel http://www.eclipse.org/emf/2002/Ecore (12..50)
public query myQuery(param1 : EClass (77..99)) ) : java.lang.String .aqlFeatureAccess(param1, 'name') (114..125)
/] (55..128)
[comment @main (139..145) /] (130..147)

public template mainTemplate(param1 : EClass (178..200))
@main
[file url .add(.aqlFeatureAccess(param1, 'name'), '.txt') (212..232) mode overwrite
[.myQuery(param1) (251..267)/] (newLineNeeded (250..270) (245..272)
[/file] (205..279)
(newLineNeeded) (279..280) (202..280)
[/template] (148..291) (0..291)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(null 0 0) null[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[module m1('http://www.eclipse.org/emf/2002/Ecore')/]

[query public myQuery(param1 : ecore::EClass) : String =
param1.name
/]

[comment @main /]
[template public mainTemplate(param1 : ecore::EClass)]
[file (param1.name + '.txt', overwrite)]
[param1.myQuery()/]
[/file]
[/template]
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<ecore:EPackage
xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
name="anydsl"
nsURI="http://www.eclipse.org/acceleo/anydsl"
nsPrefix="anydsl">
<eClassifiers
xsi:type="ecore:EClass"
name="World"/>
</ecore:EPackage>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
World
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

header position 0..53
module m1
metamodel http://www.eclipse.org/emf/2002/Ecore (12..50)

public template myTemplate(param1 : EClass (83..105))
[.aqlFeatureAccess(param1, 'name') (111..122)/] (newLineNeeded (110..125) (107..125)
[/template] (55..136)
[comment @main (147..153) /] (138..155)

public template mainTemplate(param1 : EClass (186..208))
@main
[file url .add(.aqlFeatureAccess(param1, 'name'), '.txt') (220..240) mode overwrite
[.myTemplate(param1) (259..278)/] (newLineNeeded (258..281) (253..283)
[/file] (213..290)
(newLineNeeded) (290..291) (210..291)
[/template] (156..302) (0..303)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(null 0 0) null[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[module m1('http://www.eclipse.org/emf/2002/Ecore')/]

[template public myTemplate(param1 : ecore::EClass)]
[param1.name/]
[/template]

[comment @main /]
[template public mainTemplate(param1 : ecore::EClass)]
[file (param1.name + '.txt', overwrite)]
[param1.myTemplate()/]
[/file]
[/template]
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<ecore:EPackage
xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
name="anydsl"
nsURI="http://www.eclipse.org/acceleo/anydsl"
nsPrefix="anydsl">
<eClassifiers
xsi:type="ecore:EClass"
name="World"/>
</ecore:EPackage>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
World
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

header position 0..53
module m1
metamodel http://www.eclipse.org/emf/2002/Ecore (12..50)
[comment @main (64..70) /] (55..72)

public template mainTemplate(param1 : EClass (103..125))
@main
[file url .add(.aqlFeatureAccess(param1, 'name'), '.txt') (137..157) mode overwrite
[.myQuery(param1) (176..192)/] (newLineNeeded (175..195) (170..197)
[/file] (130..204)
(newLineNeeded) (204..205) (127..205)
[/template] (73..216)
public query myQuery(param1 : EClass (240..262)) ) : java.lang.String .aqlFeatureAccess(param1, 'name') (277..288)
/] (218..291) (0..291)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(null 0 0) null[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[module m1('http://www.eclipse.org/emf/2002/Ecore')/]

[comment @main /]
[template public mainTemplate(param1 : ecore::EClass)]
[file (param1.name + '.txt', overwrite)]
[param1.myQuery()/]
[/file]
[/template]

[query public myQuery(param1 : ecore::EClass) : String =
param1.name
/]
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<ecore:EPackage
xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
name="anydsl"
nsURI="http://www.eclipse.org/acceleo/anydsl"
nsPrefix="anydsl">
<eClassifiers
xsi:type="ecore:EClass"
name="World"/>
</ecore:EPackage>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
World
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

header position 0..53
module m1
metamodel http://www.eclipse.org/emf/2002/Ecore (12..50)
[comment @main (64..70) /] (55..72)

public template mainTemplate(param1 : EClass (103..125))
@main
[file url .add(.aqlFeatureAccess(param1, 'name'), '.txt') (137..157) mode overwrite
[.myTemplate(param1) (176..195)/] (newLineNeeded (175..198) (170..200)
[/file] (130..207)
(newLineNeeded) (207..208) (127..208)
[/template] (73..219)

public template myTemplate(param1 : EClass (249..271))
[.aqlFeatureAccess(param1, 'name') (277..288)/] (newLineNeeded (276..291) (273..291)
[/template] (221..302) (0..303)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(null 0 0) null[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[module m1('http://www.eclipse.org/emf/2002/Ecore')/]

[comment @main /]
[template public mainTemplate(param1 : ecore::EClass)]
[file (param1.name + '.txt', overwrite)]
[param1.myTemplate()/]
[/file]
[/template]

[template public myTemplate(param1 : ecore::EClass)]
[param1.name/]
[/template]
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<ecore:EPackage
xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
name="anydsl"
nsURI="http://www.eclipse.org/acceleo/anydsl"
nsPrefix="anydsl">
<eClassifiers
xsi:type="ecore:EClass"
name="World"/>
</ecore:EPackage>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
World
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[module m1('http://www.eclipse.org/emf/2002/Ecore')/]

[query public myQuery(param1 : ecore::EClass) : String = param1.name/]

[comment @main /]
[template public mainTemplate(param1 : ecore::EClass)]
[file (param1.name + '.txt', overwrite)]
[param1.myQuery()/]
[/file]
[/template]
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[module m1('http://www.eclipse.org/emf/2002/Ecore')/]

[template public myTemplate(param1 : ecore::EClass)]
[param1.name/]
[/template]

[comment @main /]
[template public mainTemplate(param1 : ecore::EClass)]
[file (param1.name + '.txt', overwrite)]
[param1.myTemplate()/]
[/file]
[/template]
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[module m1('http://www.eclipse.org/emf/2002/Ecore')/]

[comment @main /]
[template public mainTemplate(param1 : ecore::EClass)]
[file (param1.name + '.txt', overwrite)]
[param1.myQuery()/]
[/file]
[/template]

[query public myQuery(param1 : ecore::EClass) : String = param1.name/]
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[module m1('http://www.eclipse.org/emf/2002/Ecore')/]

[comment @main /]
[template public mainTemplate(param1 : ecore::EClass)]
[file (param1.name + '.txt', overwrite)]
[param1.myTemplate()/]
[/file]
[/template]

[template public myTemplate(param1 : ecore::EClass)]
[param1.name/]
[/template]

0 comments on commit 28ac8a8

Please sign in to comment.