Skip to content

Commit b26069c

Browse files
committed
ST6RI-856 Revised impl of variation defs and usages being abstract.
- Moved it from additional overrides in DefinitionImpl and UsageImpl to postProcess in DefinitionAdapter and UsageAdapter.
1 parent 27192a1 commit b26069c

4 files changed

Lines changed: 20 additions & 16 deletions

File tree

org.omg.sysml/src/org/omg/sysml/adapter/DefinitionAdapter.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*******************************************************************************
22
* SysML 2 Pilot Implementation
3-
* Copyright (c) 2021, 2024 Model Driven Solutions, Inc.
3+
* Copyright (c) 2021, 2024, 2025 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
@@ -34,4 +34,13 @@ public Definition getTarget() {
3434
return (Definition)super.getTarget();
3535
}
3636

37+
@Override
38+
public void postProcess() {
39+
super.postProcess();
40+
Definition target = getTarget();
41+
if (target.isVariation()) {
42+
target.setIsAbstract(true);
43+
}
44+
}
45+
3746
}

org.omg.sysml/src/org/omg/sysml/adapter/UsageAdapter.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*******************************************************************************
22
* SysML 2 Pilot Implementation
3-
* Copyright (c) 2021-2024 Model Driven Solutions, Inc.
3+
* Copyright (c) 2021-2025 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
@@ -53,6 +53,15 @@ public Usage getTarget() {
5353

5454
// Post-processing
5555

56+
@Override
57+
public void postProcess () {
58+
super.postProcess();
59+
Usage target = getTarget();
60+
if (target.isVariation()) {
61+
target.setIsAbstract(true);
62+
}
63+
}
64+
5665
@Override
5766
protected void setIsVariableIfConstant() {
5867
}

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

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -784,15 +784,6 @@ public EList<VariantMembership> getVariantMembership() {
784784
return (EList<VariantMembership>)VARIANT_MEMBERSHIP__ESETTING_DELEGATE.dynamicGet(this, null, 0, true, false);
785785
}
786786

787-
// Additional Overrides
788-
789-
@Override
790-
public boolean isAbstract() {
791-
return isVariation() || super.isAbstract();
792-
}
793-
794-
//
795-
796787
/**
797788
* <!-- begin-user-doc -->
798789
* <!-- end-user-doc -->

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1046,11 +1046,6 @@ public boolean isSetIsVariable() {
10461046

10471047
// Additional overrides
10481048

1049-
@Override
1050-
public boolean isAbstract() {
1051-
return isVariation() || super.isAbstract();
1052-
}
1053-
10541049
@Override
10551050
public boolean isComposite() {
10561051
return UsageUtil.isComposite(this, isComposite);

0 commit comments

Comments
 (0)