Skip to content

Commit

Permalink
Added super call support for serializers.
Browse files Browse the repository at this point in the history
  • Loading branch information
ylussaud committed Jan 10, 2024
1 parent 87802dc commit fc4636d
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -697,6 +697,9 @@ private void call(Call call) {
builder.append('.');
serviceName = AstBuilder.protectWithUnderscore(call.getServiceName());
}
if (call.isSuperCall()) {
builder.append("super:");
}
builder.append(serviceName);
builder.append('(');
if (!arguments.isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ module queryOverrideQuery
[/file] (191..299)
(newLineNeeded) (299..300) (188..300)
[/template] (143..311)
public query toOverride(param1 : EClass (338..360)) ) : java.lang.String .toOverride(param1) (375..400)
public query toOverride(param1 : EClass (338..360)) ) : java.lang.String .super:toOverride(param1) (375..400)
/] (313..403) (0..403)
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ module queryOverrideTemplate
[/file] (197..305)
(newLineNeeded) (305..306) (194..306)
[/template] (149..317)
public query toOverride(param1 : EClass (344..366)) ) : java.lang.String .toOverride(param1) (381..406)
public query toOverride(param1 : EClass (344..366)) ) : java.lang.String .super:toOverride(param1) (381..406)
/] (319..409) (0..409)
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ module templateOverrideQuery
[/template] (149..317)

public template toOverride(param1 : EClass (347..369))
[.toOverride(param1) (375..400)/] (newLineNeeded (374..403) (371..403)
[.super:toOverride(param1) (375..400)/] (newLineNeeded (374..403) (371..403)
[/template] (319..414) (0..414)
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ module templateOverrideTemplate
[/template] (155..323)

public template toOverride(param1 : EClass (353..375))
[.toOverride(param1) (381..406)/] (newLineNeeded (380..409) (377..409)
[.super:toOverride(param1) (381..406)/] (newLineNeeded (380..409) (377..409)
[/template] (325..420) (0..420)
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
[/file]
[/template]

[query public toOverride(param1 : ecore::EClass) : String = param1.toOverride()/]
[query public toOverride(param1 : ecore::EClass) : String = param1.super:toOverride()/]
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
[/file]
[/template]

[query public toOverride(param1 : ecore::EClass) : String = param1.toOverride()/]
[query public toOverride(param1 : ecore::EClass) : String = param1.super:toOverride()/]
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
[/template]

[template public toOverride(param1 : ecore::EClass)]
[param1.toOverride()/]
[param1.super:toOverride()/]
[/template]
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
[/template]

[template public toOverride(param1 : ecore::EClass)]
[param1.toOverride()/]
[param1.super:toOverride()/]
[/template]
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2016, 2023 Obeo.
* Copyright (c) 2016, 2024 Obeo.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
Expand Down Expand Up @@ -177,6 +177,9 @@ public Void caseCall(Call call) {
} else {
builder.append('.');
}
if (call.isSuperCall()) {
builder.append("super:");
}
builder.append(call.getServiceName());
builder.append('(');
final StringBuilder previousBuilder = builder;
Expand Down

0 comments on commit fc4636d

Please sign in to comment.