Skip to content

Commit 657bce5

Browse files
committed
KERML_-117 Updated IndexExpressionImpl to return index operator.
1 parent 9272fda commit 657bce5

2 files changed

Lines changed: 35 additions & 3 deletions

File tree

org.omg.kerml.xtext/src/org/omg/kerml/xtext/validation/KerMLValidator.xtend

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -987,6 +987,11 @@ class KerMLValidator extends AbstractKerMLValidator {
987987
}
988988
}
989989

990+
// @Check
991+
// def checkIndexExpression(IndexExpression e) {
992+
// // validateIndexExpressionOperator is automatically satisfied
993+
// }
994+
990995
@Check
991996
def checkInvocationExpression(InvocationExpression e) {
992997
val type = ExpressionUtil.getExpressionTypeOf(e)
@@ -1037,7 +1042,6 @@ class KerMLValidator extends AbstractKerMLValidator {
10371042
// // validateSelectExpressionOperator is automatically satisfied
10381043
// }
10391044

1040-
10411045
@Check
10421046
def checkItemFlow(ItemFlow flow) {
10431047
// validateItemFlowItemFeature

org.omg.sysml/syntax-gen/org/omg/sysml/lang/sysml/impl/IndexExpressionImpl.java

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
1-
/**
2-
*/
1+
/*******************************************************************************
2+
* SysML 2 Pilot Implementation
3+
* Copyright (c) 2025 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+
*******************************************************************************/
320
package org.omg.sysml.lang.sysml.impl;
421

522
import org.eclipse.emf.ecore.EClass;
@@ -15,6 +32,9 @@
1532
* @generated
1633
*/
1734
public class IndexExpressionImpl extends OperatorExpressionImpl implements IndexExpression {
35+
36+
private static final String INDEX_FUNCTION = "#";
37+
1838
/**
1939
* <!-- begin-user-doc -->
2040
* <!-- end-user-doc -->
@@ -34,4 +54,12 @@ protected EClass eStaticClass() {
3454
return SysMLPackage.Literals.INDEX_EXPRESSION;
3555
}
3656

57+
/**
58+
* @generated NOT
59+
*/
60+
@Override
61+
public String getOperator() {
62+
return INDEX_FUNCTION;
63+
}
64+
3765
} //IndexExpressionImpl

0 commit comments

Comments
 (0)