Skip to content

Commit 4e5d5af

Browse files
committed
ST6RI-981 Added InvocationExpressionParserPostProcessor.
- Following abstract syntax class hierarchy, extends InstantiationExpressionParserPostProcessor and is extended by FeatureChainExpressionParserPostProcessor. - Also reverted ExpressionParserPostProcessor to previous version.
1 parent 2255d81 commit 4e5d5af

9 files changed

Lines changed: 42 additions & 17 deletions

File tree

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/*******************************************************************************
22
* SysML 2 Pilot Implementation
33
* Copyright (c) 2026 Model Driven Solutions, Inc.
4-
* Copyright (c) 2026 Obeo
54
*
65
* This program and the accompanying materials are made available under the
76
* terms of the Eclipse Public License 2.0 which is available at
@@ -12,11 +11,7 @@
1211

1312
package org.omg.kerml.xtext.postprocessing;
1413

15-
import org.omg.sysml.lang.sysml.ConstructorExpression;
1614
import org.omg.sysml.lang.sysml.Expression;
17-
import org.omg.sysml.lang.sysml.FeatureReferenceExpression;
18-
import org.omg.sysml.lang.sysml.InvocationExpression;
19-
import org.omg.sysml.util.TypeUtil;
2015

2116
public class ExpressionParserPostProcessor extends StepParserPostProcessor {
2217

@@ -29,14 +24,4 @@ public Expression getTarget() {
2924
return (Expression)super.getTarget();
3025
}
3126

32-
@Override
33-
public void postProcess() {
34-
super.postProcess();
35-
Expression target = getTarget();
36-
if (target instanceof FeatureReferenceExpression || target instanceof ConstructorExpression
37-
|| target instanceof InvocationExpression) {
38-
TypeUtil.addResultParameterTo(target);
39-
}
40-
}
41-
4227
}

‎org.omg.kerml.xtext/src/org/omg/kerml/xtext/postprocessing/FeatureChainExpressionParserPostProcessor.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import org.omg.sysml.util.ExpressionUtil;
1717

1818
/** Prepares the owned source-target feature of a feature-chain expression. */
19-
public class FeatureChainExpressionParserPostProcessor extends ExpressionParserPostProcessor {
19+
public class FeatureChainExpressionParserPostProcessor extends InvocationExpressionParserPostProcessor {
2020

2121
public FeatureChainExpressionParserPostProcessor(FeatureChainExpression element) {
2222
super(element);
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/*******************************************************************************
2+
* SysML 2 Pilot Implementation
3+
* Copyright (c) 2026 Model Driven Solutions, Inc.
4+
*
5+
* This program is free software: you can redistribute it and/or modify
6+
* it under the terms of the GNU Lesser General Public License as published by
7+
* the Free Software Foundation, either version 3 of the License, or
8+
* (at your option) any later version.
9+
*
10+
* This program is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU Lesser General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU Lesser General Public License
16+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
17+
*
18+
* @license LGPL-3.0-or-later <http://spdx.org/licenses/LGPL-3.0-or-later>
19+
*
20+
*******************************************************************************/
21+
22+
package org.omg.kerml.xtext.postprocessing;
23+
24+
import org.omg.sysml.lang.sysml.InvocationExpression;
25+
26+
public class InvocationExpressionParserPostProcessor extends InstantiationExpressionParserPostProcessor {
27+
28+
public InvocationExpressionParserPostProcessor(InvocationExpression element) {
29+
super(element);
30+
}
31+
32+
@Override
33+
public InvocationExpression getTarget() {
34+
return (InvocationExpression)super.getTarget();
35+
}
36+
}

‎org.omg.kerml.xtext/src/org/omg/kerml/xtext/postprocessing/KerMLParserPostProcessorFactory.java‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,11 @@ public ElementParserPostProcessor caseIntersecting(Intersecting element) {
128128
return new IntersectingParserPostProcessor(element);
129129
}
130130

131+
@Override
132+
public ElementParserPostProcessor caseInvocationExpression(InvocationExpression element) {
133+
return new InvocationExpressionParserPostProcessor(element);
134+
}
135+
131136
@Override
132137
public ElementParserPostProcessor caseLiteralExpression(LiteralExpression element) {
133138
return new LiteralExpressionParserPostProcessor(element);
Binary file not shown.
Binary file not shown.

‎org.omg.sysml.logic/src/main/java/org/omg/sysml/adapter/UsageAdapter.java‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
import org.omg.sysml.lang.sysml.PartUsage;
3232
import org.omg.sysml.lang.sysml.StateSubactionKind;
3333
import org.omg.sysml.lang.sysml.StateSubactionMembership;
34-
import org.omg.sysml.lang.sysml.Subsetting;
3534
import org.omg.sysml.lang.sysml.SysMLPackage;
3635
import org.omg.sysml.lang.sysml.Type;
3736
import org.omg.sysml.lang.sysml.Usage;
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)