Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*******************************************************************************
* SysML 2 Pilot Implementation
* Copyright (c) 2026 Model Driven Solutions, Inc.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/

package org.omg.kerml.xtext.postprocessing;

import org.omg.sysml.lang.sysml.FeatureReferenceExpression;
import org.omg.sysml.util.TypeUtil;

public class FeatureReferenceExpressionParserPostProcessor extends ExpressionParserPostProcessor {

public FeatureReferenceExpressionParserPostProcessor(FeatureReferenceExpression element) {
super(element);
}

@Override
public FeatureReferenceExpression getTarget() {
return (FeatureReferenceExpression)super.getTarget();
}

@Override
public void postProcess() {
super.postProcess();
TypeUtil.addResultParameterTo(getTarget());
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*******************************************************************************
* SysML 2 Pilot Implementation
* Copyright (c) 2026 Model Driven Solutions, Inc.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/

package org.omg.kerml.xtext.postprocessing;

import org.omg.sysml.lang.sysml.InstantiationExpression;
import org.omg.sysml.util.TypeUtil;

public class InstantiationExpressionParserPostProcessor extends ExpressionParserPostProcessor {

public InstantiationExpressionParserPostProcessor(InstantiationExpression element) {
super(element);
}

@Override
public InstantiationExpression getTarget() {
return (InstantiationExpression)super.getTarget();
}

@Override
public void postProcess() {
super.postProcess();
TypeUtil.addResultParameterTo(getTarget());
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,21 @@ public ElementParserPostProcessor caseFeatureInverting(FeatureInverting element)
return new FeatureInvertingParserPostProcessor(element);
}

@Override
public ElementParserPostProcessor caseFeatureReferenceExpression(FeatureReferenceExpression element) {
return new FeatureReferenceExpressionParserPostProcessor(element);
}

@Override
public ElementParserPostProcessor caseFeatureTyping(FeatureTyping element) {
return new FeatureTypingParserPostProcessor(element);
}

@Override
public ElementParserPostProcessor caseInstantiationExpression(InstantiationExpression element) {
return new InstantiationExpressionParserPostProcessor(element);
}

@Override
public ElementParserPostProcessor caseImport(Import element) {
return new ImportParserPostProcessor(element);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ public EList<Element> evaluateInvocation(InvocationExpression expression, Elemen

protected InvocationExpression instantiateInvocation(InvocationExpression expression, Element target) {
InvocationExpression instantiation = SysMLFactory.eINSTANCE.createInvocationExpression();
TypeUtil.addResultParameterTo(instantiation);

// Copy instantiatedType from original expression.
Type instantiatedType = expression.getInstantiatedType();
Expand Down
Loading
Loading