Skip to content

Commit 140d243

Browse files
committed
ST6RI-919 Updated Feature_crossFeature_SettingDelegate to incl. implied.
- The utility method FeatureUtil.getCrossFeatureOf already did the correct computation and only needed to be called from the delegate.
1 parent 31d1280 commit 140d243

1 file changed

Lines changed: 3 additions & 15 deletions

File tree

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*******************************************************************************
22
* SysML 2 Pilot Implementation
3-
* Copyright (c) 2024 Model Driven Solutions, Inc.
3+
* Copyright (c) 2024, 2026 Model Driven Solutions, Inc.
44
*
55
* This program is free software: you can redistribute it and/or modify
66
* it under the terms of the GNU Lesser General Public License as published by
@@ -21,13 +21,11 @@
2121

2222
package org.omg.sysml.delegate.setting;
2323

24-
import java.util.List;
25-
2624
import org.eclipse.emf.ecore.EObject;
2725
import org.eclipse.emf.ecore.EStructuralFeature;
2826
import org.eclipse.emf.ecore.InternalEObject;
29-
import org.omg.sysml.lang.sysml.CrossSubsetting;
3027
import org.omg.sysml.lang.sysml.Feature;
28+
import org.omg.sysml.util.FeatureUtil;
3129

3230
public class Feature_crossFeature_SettingDelegate extends BasicDerivedObjectSettingDelegate {
3331

@@ -37,17 +35,7 @@ public Feature_crossFeature_SettingDelegate(EStructuralFeature eStructuralFeatur
3735

3836
@Override
3937
protected EObject basicGet(InternalEObject owner) {
40-
CrossSubsetting subsetting = ((Feature)owner).getOwnedCrossSubsetting();
41-
if (subsetting != null) {
42-
Feature crossedFeature = subsetting.getCrossedFeature();
43-
if (crossedFeature != null) {
44-
List<Feature> chainingFeatures = crossedFeature.getChainingFeature();
45-
if (chainingFeatures.size() >=2) {
46-
return chainingFeatures.get(1);
47-
}
48-
}
49-
}
50-
return null;
38+
return FeatureUtil.getCrossFeatureOf((Feature)owner);
5139
}
5240

5341
}

0 commit comments

Comments
 (0)