Skip to content

Commit 0c7ff83

Browse files
committed
Merge remote-tracking branch 'origin/v4' into v4
2 parents 250fce6 + cd701b7 commit 0c7ff83

File tree

59 files changed

+164
-744
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+164
-744
lines changed

src/FAST-Java-Model-Generator/FASTJavaMetamodelGenerator.class.st

Lines changed: 32 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,10 @@ Class {
128128
'tAnnotationElement',
129129
'javaLiteral',
130130
'javaArrayAnnotationElement',
131-
'javaTypePattern'
131+
'javaTypePattern',
132+
'tConditionalStatement',
133+
'tLoopStatement',
134+
'javaVarTypeExpression'
132135
],
133136
#category : 'FAST-Java-Model-Generator',
134137
#package : 'FAST-Java-Model-Generator'
@@ -799,6 +802,8 @@ FASTJavaMetamodelGenerator >> defineClasses [
799802
javaLongTypeExpression withTesting.
800803
javaShortTypeExpression := self newClassNamed: #ShortTypeExpression comment: 'I represent a short type'.
801804
javaShortTypeExpression withTesting.
805+
javaVarTypeExpression := self newClassNamed: #VarTypeExpression comment: 'I represent a var type (type inference)'.
806+
javaVarTypeExpression withTesting.
802807
javaVoidTypeExpression := self newClassNamed: #VoidTypeExpression comment: 'I represent a short type'.
803808
javaVoidTypeExpression withTesting.
804809

@@ -914,12 +919,17 @@ FASTJavaMetamodelGenerator >> defineHierarchy [
914919
javaCaseStatement --|> tStatementBlock.
915920
javaContinueStatement --|> tStatement.
916921
javaDoWhileStatement --|> tStatement.
922+
javaDoWhileStatement --|> tConditionalStatement.
923+
javaDoWhileStatement --|> tLoopStatement.
917924
javaForStatement --|> tStatement.
925+
javaForStatement --|> tConditionalStatement.
926+
javaForStatement --|> tLoopStatement.
918927

919928
javaIdentifier --|> javaVariableExpression.
920929
javaIdentifier --|> tReceiver.
921930

922931
javaIfStatement --|> tStatement.
932+
javaIfStatement --|> tConditionalStatement.
923933

924934
javaArrayAnnotationElement --|> tAnnotationElement.
925935
javaArrayAnnotationElement --|> tExpression. "because annotationElement=value are modeled as assignment expression"
@@ -990,6 +1000,8 @@ FASTJavaMetamodelGenerator >> defineHierarchy [
9901000

9911001
javaVariableDeclarator --|> tEntity.
9921002
javaWhileStatement --|> tStatement.
1003+
javaWhileStatement --|> tConditionalStatement.
1004+
javaWhileStatement --|> tLoopStatement.
9931005
javaMethodInvocation --|> tNamedEntity.
9941006
javaCastExpression --|> tExpression.
9951007
javaCastExpression --|> tReceiver.
@@ -1000,6 +1012,7 @@ FASTJavaMetamodelGenerator >> defineHierarchy [
10001012

10011013
javaTryCatchStatement --|> tStatement.
10021014
javaForEachStatement --|> tStatement.
1015+
javaForEachStatement --|> tLoopStatement.
10031016
javaUnaryExpression --|> tExpression.
10041017

10051018
javaNewExpression --|> tExpression.
@@ -1252,10 +1265,6 @@ FASTJavaMetamodelGenerator >> defineRelations [
12521265
<>- ((tExpression property: #javaLabeledCaseStatementOwner) comment:
12531266
'The javaLabeledCaseStatement owner (if possible)').
12541267

1255-
((javaForEachStatement property: #body) comment:
1256-
'The body of the for-each statement')
1257-
<>- ((tStatement property: #javaForEachStatementOwner) comment:
1258-
'The javaForEachStatement owner (if possible)').
12591268
((javaForEachStatement property: #list) comment:
12601269
'The list that the for-each statement iterates over')
12611270
<>- ((tExpression property: #javaForEachStatementOwner) comment:
@@ -1302,10 +1311,6 @@ FASTJavaMetamodelGenerator >> defineRelations [
13021311
<>- ((javaVariableExpression property: #javaCatchParameterOwnler)
13031312
comment: 'The javaCatchPartParameterOwner owner (if possible)').
13041313

1305-
((javaIfStatement property: #condition) comment:
1306-
'The condition of the statement')
1307-
<>- ((tExpression property: #ifConditionOwner) comment:
1308-
'I represent a condition for my owner').
13091314
((javaIfStatement property: #elsePart) comment: 'else part')
13101315
<>- ((tStatement property: #ifElsePartOwner) comment:
13111316
'The if owner (if possible)').
@@ -1333,10 +1338,6 @@ FASTJavaMetamodelGenerator >> defineRelations [
13331338
((tExpression property: #infixOperationRightOperandOwner) comment:
13341339
'The right operand (if possible)').
13351340

1336-
((javaForStatement property: #condition) comment:
1337-
'The condition of the statement')
1338-
<>- ((tExpression property: #forConditionOwner) comment:
1339-
'I represent a condition for my owner').
13401341
((javaForStatement property: #incrementor) comment:
13411342
'Expression evaluated at the end of each loop')
13421343
<>- ((tStatement property: #forIncrementorOwner) comment:
@@ -1345,34 +1346,12 @@ FASTJavaMetamodelGenerator >> defineRelations [
13451346
'Expression used at initialization phase of a for loop')
13461347
<>- ((tStatement property: #forIninitializerOwner) comment:
13471348
'I am the initializer of the for').
1348-
((javaForStatement property: #body) comment:
1349-
'A statement to be evaluated in the loop')
1350-
<>- ((tStatement property: #forBodyOwner) comment:
1351-
'I am the body of the for').
13521349

13531350
((javaSwitchStatement property: #condition) comment:
13541351
'The condition of the statement')
13551352
<>- ((tExpression property: #switchConditionOwner) comment:
13561353
'I represent a condition for my owner').
13571354

1358-
((javaDoWhileStatement property: #condition) comment:
1359-
'The condition of the statement')
1360-
<>- ((tExpression property: #doConditionOwner) comment:
1361-
'I represent a condition for my owner').
1362-
((javaDoWhileStatement property: #body) comment:
1363-
'A statement to be evaluated in the loop')
1364-
<>- ((tStatement property: #doBodyOwner) comment:
1365-
'I am the body of the do').
1366-
1367-
((javaWhileStatement property: #condition) comment:
1368-
'The condition of the statement')
1369-
<>- ((tExpression property: #whileConditionOwner) comment:
1370-
'I represent a condition for my owner').
1371-
((javaWhileStatement property: #body) comment:
1372-
'A statement to be evaluated in the loop')
1373-
<>- ((tStatement property: #whileBodyOwner) comment:
1374-
'I am the body of the do').
1375-
13761355
((javaInitializer property: #statementBlock) comment:
13771356
'Statements block of the behavioural entity')
13781357
<>- ((tStatementBlock property: #javaInitializerOwner) comment:
@@ -1586,23 +1565,29 @@ FASTJavaMetamodelGenerator >> defineTraits [
15861565

15871566
"From FAST"
15881567
tEntity := self remoteTrait: #TEntity withPrefix: #FAST.
1589-
tComment := self remoteTrait: #TComment withPrefix: #FAST.
1590-
tWithComments := self remoteTrait: #TWithComments withPrefix: #FAST.
1591-
tExpression := self remoteTrait: #TExpression withPrefix: #FAST.
1592-
tStatement := self remoteTrait: #TStatement withPrefix: #FAST.
1568+
1569+
tBooleanLiteral := self remoteTrait: #TBooleanLiteral withPrefix: #FAST.
15931570
tCharacterLiteral := self remoteTrait: #TCharacterLiteral withPrefix: #FAST.
15941571
tLiteral := self remoteTrait: #TLiteral withPrefix: #FAST.
1595-
tVariableExpression := self remoteTrait: #TVariableExpression withPrefix: #FAST.
1596-
tNamedBehaviouralEntity := self remoteTrait: #TNamedBehaviouralEntity withPrefix: #FAST.
15971572
tNullPointerLiteral := self remoteTrait: #TNullPointerLiteral withPrefix: #FAST.
15981573
tStringLiteral := self remoteTrait: #TStringLiteral withPrefix: #FAST.
1574+
1575+
tExpression := self remoteTrait: #TExpression withPrefix: #FAST.
1576+
tVariableExpression := self remoteTrait: #TVariableExpression withPrefix: #FAST.
1577+
1578+
tStatement := self remoteTrait: #TStatement withPrefix: #FAST.
1579+
tConditionalStatement := self remoteTrait: #TConditionalStatement withPrefix: #FAST.
1580+
tExpressionStatement := self remoteTrait: #TExpressionStatement withPrefix: #FAST.
1581+
tLoopStatement := self remoteTrait: #TLoopStatement withPrefix: #FAST.
1582+
tReturnStatement := self remoteTrait: #TReturnStatement withPrefix: #FAST.
1583+
tStatementBlock := self remoteTrait: #TStatementBlock withPrefix: #FAST.
1584+
1585+
tComment := self remoteTrait: #TComment withPrefix: #FAST.
1586+
tInvocation := self remoteTrait: #TInvocation withPrefix: #FAST.
1587+
tNamedBehaviouralEntity := self remoteTrait: #TNamedBehaviouralEntity withPrefix: #FAST.
1588+
tNamedEntity := self remoteTrait: #TNamedEntity withPrefix: #FAST.
15991589
tScopableEntity := self remoteTrait: #TScopableEntity withPrefix: #FAST.
16001590
tVariableEntity := self remoteTrait: #TVariableEntity withPrefix: #FAST.
1601-
tStatementBlock := self remoteTrait: #TStatementBlock withPrefix: #FAST.
1602-
tExpressionStatement := self remoteTrait: #TExpressionStatement withPrefix: #FAST.
1591+
tWithComments := self remoteTrait: #TWithComments withPrefix: #FAST.
16031592
tWithParameters := self remoteTrait: #TWithParameters withPrefix: #FAST.
1604-
tNamedEntity := self remoteTrait: #TNamedEntity withPrefix: #FAST.
1605-
tReturnStatement := self remoteTrait: #TReturnStatement withPrefix: #FAST.
1606-
tBooleanLiteral := self remoteTrait: #TBooleanLiteral withPrefix: #FAST.
1607-
tInvocation := self remoteTrait: #TInvocation withPrefix: #FAST
16081593
]

src/FAST-Java-Model/FASTJavaArrayAccess.class.st

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,7 @@ liste[i]
1717
| `conditionalConditionOwner` | `FASTTExpression` | `condition` | `FASTJavaConditionalExpression` | I represent a condition for my owner|
1818
| `conditionalElsePartOwner` | `FASTTExpression` | `elsePart` | `FASTJavaConditionalExpression` | The if owner (if possible)|
1919
| `conditionalThenPartOwner` | `FASTTExpression` | `thenPart` | `FASTJavaConditionalExpression` | The if owner (if possible)|
20-
| `doConditionOwner` | `FASTTExpression` | `condition` | `FASTJavaDoWhileStatement` | I represent a condition for my owner|
2120
| `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case|
22-
| `forConditionOwner` | `FASTTExpression` | `condition` | `FASTJavaForStatement` | I represent a condition for my owner|
23-
| `ifConditionOwner` | `FASTTExpression` | `condition` | `FASTJavaIfStatement` | I represent a condition for my owner|
2421
| `infixOperationLeftOperandOwner` | `FASTTExpression` | `leftOperand` | `FASTJavaInfixOperation` | The left operand (if possible)|
2522
| `infixOperationRightOperandOwner` | `FASTTExpression` | `rightOperand` | `FASTJavaInfixOperation` | The right operand (if possible)|
2623
| `javaArrayAccessOwner` | `FASTTExpression` | `expression` | `FASTJavaArrayAccess` | The javaArrayAccess owner (if possible)|
@@ -39,13 +36,13 @@ liste[i]
3936
| `javaUnaryExpressionOwner` | `FASTTExpression` | `expression` | `FASTJavaUnaryExpression` | The javaUnaryExpression owner (if possible)|
4037
| `javaVariableAssignmentOwner` | `FASTJavaTAssignable` | `variable` | `FASTJavaTWithAssignable` | The owner of the assignment|
4138
| `javaVariableDeclaratorExpressionOwner` | `FASTTExpression` | `expression` | `FASTJavaVariableDeclarator` | The javaVariableDeclarator owner (if possible)|
39+
| `parentConditionalStatement` | `FASTTExpression` | `condition` | `FASTTConditionalStatement` | Optional condition statement where this expression is used|
4240
| `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression|
4341
| `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side|
4442
| `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side|
4543
| `receiverOwner` | `FASTJavaTReceiver` | `receiver` | `FASTJavaTWithReceiver` | The owner of the receiver|
4644
| `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)|
4745
| `switchConditionOwner` | `FASTTExpression` | `condition` | `FASTJavaSwitchStatement` | I represent a condition for my owner|
48-
| `whileConditionOwner` | `FASTTExpression` | `condition` | `FASTJavaWhileStatement` | I represent a condition for my owner|
4946
5047
### Children
5148
| Relation | Origin | Opposite | Type | Comment |

src/FAST-Java-Model/FASTJavaArrayAnnotationElement.class.st

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@ I represent an array as argument of an annotationExpression
1414
| `conditionalConditionOwner` | `FASTTExpression` | `condition` | `FASTJavaConditionalExpression` | I represent a condition for my owner|
1515
| `conditionalElsePartOwner` | `FASTTExpression` | `elsePart` | `FASTJavaConditionalExpression` | The if owner (if possible)|
1616
| `conditionalThenPartOwner` | `FASTTExpression` | `thenPart` | `FASTJavaConditionalExpression` | The if owner (if possible)|
17-
| `doConditionOwner` | `FASTTExpression` | `condition` | `FASTJavaDoWhileStatement` | I represent a condition for my owner|
1817
| `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case|
19-
| `forConditionOwner` | `FASTTExpression` | `condition` | `FASTJavaForStatement` | I represent a condition for my owner|
20-
| `ifConditionOwner` | `FASTTExpression` | `condition` | `FASTJavaIfStatement` | I represent a condition for my owner|
2118
| `infixOperationLeftOperandOwner` | `FASTTExpression` | `leftOperand` | `FASTJavaInfixOperation` | The left operand (if possible)|
2219
| `infixOperationRightOperandOwner` | `FASTTExpression` | `rightOperand` | `FASTJavaInfixOperation` | The right operand (if possible)|
2320
| `javaArrayAccessOwner` | `FASTTExpression` | `expression` | `FASTJavaArrayAccess` | The javaArrayAccess owner (if possible)|
@@ -36,12 +33,12 @@ I represent an array as argument of an annotationExpression
3633
| `javaUnaryExpressionOwner` | `FASTTExpression` | `expression` | `FASTJavaUnaryExpression` | The javaUnaryExpression owner (if possible)|
3734
| `javaVariableDeclaratorExpressionOwner` | `FASTTExpression` | `expression` | `FASTJavaVariableDeclarator` | The javaVariableDeclarator owner (if possible)|
3835
| `parentAnnotation` | `FASTJavaTAnnotationElement` | `elements` | `FASTJavaAnnotation` | An ""argument"" of an annotation, eg. ""unchecked"" in the following annotation: @SuppressWarnings(value=""unchecked"")|
36+
| `parentConditionalStatement` | `FASTTExpression` | `condition` | `FASTTConditionalStatement` | Optional condition statement where this expression is used|
3937
| `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression|
4038
| `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side|
4139
| `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side|
4240
| `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)|
4341
| `switchConditionOwner` | `FASTTExpression` | `condition` | `FASTJavaSwitchStatement` | I represent a condition for my owner|
44-
| `whileConditionOwner` | `FASTTExpression` | `condition` | `FASTJavaWhileStatement` | I represent a condition for my owner|
4542
4643
### Children
4744
| Relation | Origin | Opposite | Type | Comment |

src/FAST-Java-Model/FASTJavaArrayInitializer.class.st

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,7 @@ My initializers are
2323
| `conditionalConditionOwner` | `FASTTExpression` | `condition` | `FASTJavaConditionalExpression` | I represent a condition for my owner|
2424
| `conditionalElsePartOwner` | `FASTTExpression` | `elsePart` | `FASTJavaConditionalExpression` | The if owner (if possible)|
2525
| `conditionalThenPartOwner` | `FASTTExpression` | `thenPart` | `FASTJavaConditionalExpression` | The if owner (if possible)|
26-
| `doConditionOwner` | `FASTTExpression` | `condition` | `FASTJavaDoWhileStatement` | I represent a condition for my owner|
2726
| `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case|
28-
| `forConditionOwner` | `FASTTExpression` | `condition` | `FASTJavaForStatement` | I represent a condition for my owner|
29-
| `ifConditionOwner` | `FASTTExpression` | `condition` | `FASTJavaIfStatement` | I represent a condition for my owner|
3027
| `infixOperationLeftOperandOwner` | `FASTTExpression` | `leftOperand` | `FASTJavaInfixOperation` | The left operand (if possible)|
3128
| `infixOperationRightOperandOwner` | `FASTTExpression` | `rightOperand` | `FASTJavaInfixOperation` | The right operand (if possible)|
3229
| `javaArrayAccessOwner` | `FASTTExpression` | `expression` | `FASTJavaArrayAccess` | The javaArrayAccess owner (if possible)|
@@ -45,12 +42,12 @@ My initializers are
4542
| `javaUnaryExpressionOwner` | `FASTTExpression` | `expression` | `FASTJavaUnaryExpression` | The javaUnaryExpression owner (if possible)|
4643
| `javaVariableDeclaratorExpressionOwner` | `FASTTExpression` | `expression` | `FASTJavaVariableDeclarator` | The javaVariableDeclarator owner (if possible)|
4744
| `parentAnnotation` | `FASTJavaTAnnotationElement` | `elements` | `FASTJavaAnnotation` | An ""argument"" of an annotation, eg. ""unchecked"" in the following annotation: @SuppressWarnings(value=""unchecked"")|
45+
| `parentConditionalStatement` | `FASTTExpression` | `condition` | `FASTTConditionalStatement` | Optional condition statement where this expression is used|
4846
| `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression|
4947
| `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side|
5048
| `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side|
5149
| `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)|
5250
| `switchConditionOwner` | `FASTTExpression` | `condition` | `FASTJavaSwitchStatement` | I represent a condition for my owner|
53-
| `whileConditionOwner` | `FASTTExpression` | `condition` | `FASTJavaWhileStatement` | I represent a condition for my owner|
5451
5552
### Children
5653
| Relation | Origin | Opposite | Type | Comment |

src/FAST-Java-Model/FASTJavaAssertStatement.class.st

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,14 @@ void method (){
1414
### Parents
1515
| Relation | Origin | Opposite | Type | Comment |
1616
|---|
17-
| `doBodyOwner` | `FASTTStatement` | `body` | `FASTJavaDoWhileStatement` | I am the body of the do|
18-
| `forBodyOwner` | `FASTTStatement` | `body` | `FASTJavaForStatement` | I am the body of the for|
1917
| `forIncrementorOwner` | `FASTTStatement` | `incrementor` | `FASTJavaForStatement` | I am the incrementor of the for|
2018
| `forIninitializerOwner` | `FASTTStatement` | `initializer` | `FASTJavaForStatement` | I am the initializer of the for|
2119
| `ifElsePartOwner` | `FASTTStatement` | `elsePart` | `FASTJavaIfStatement` | The if owner (if possible)|
2220
| `ifThenPartOwner` | `FASTTStatement` | `thenPart` | `FASTJavaIfStatement` | The if owner (if possible)|
23-
| `javaForEachStatementOwner` | `FASTTStatement` | `body` | `FASTJavaForEachStatement` | The javaForEachStatement owner (if possible)|
2421
| `javaLambdaExpressionOwner` | `FASTTEntity` | `expression` | `FASTJavaLambdaExpression` | The expression owner (if possible)|
2522
| `labelStatementOwner` | `FASTTStatement` | `labeledStatement` | `FASTJavaLabeledStatement` | Label Statement entity containing this statement|
23+
| `parentLoopStatement` | `FASTTStatement` | `body` | `FASTTLoopStatement` | Optional loop of which this statement is the body|
2624
| `statementContainer` | `FASTTStatement` | `statements` | `FASTTStatementBlock` | Block containing this statement.|
27-
| `whileBodyOwner` | `FASTTStatement` | `body` | `FASTJavaWhileStatement` | I am the body of the do|
2825
2926
### Children
3027
| Relation | Origin | Opposite | Type | Comment |

0 commit comments

Comments
 (0)