I want to get the subsetting feature, but it is displayed as anonymous element.
I have file 1 with:
package package1 {
private import testPackage::*;
attribute attribute2 :> part1.attribute1;
}
and another file with:
package testPackage {
part part1 {
attribute attribute1;
}
}
From file1 I extract attribute2 as element and try to get part1.attribute1 from it. As a result I get Structure::attribute2::(anonymous Subsetting)::(anonymous Feature). How can I get the subsetting feature or change it to a known element?
The subsetted chaining Feature is an owned element of the Subsetting without a name. In this case str(element) is an implementation that prints something instead of nothing compared to qualified_name. Chained segments can be retrieved by calling chaining_features.collect() on the subsetted Feature, otherwise it can be replaced with attribute2.heritage.replace_at(0, syside.Subsetting, <other feature>) or attribute2.heritage.replace_chain_at(0, syside.Subsetting, (<feature 1>, <feature 2>, …)).