use of org.kie.workbench.common.stunner.core.definition.morph.PropertyMorphDefinition in project kie-wb-common by kiegroup.
the class AbstractMorphAdapter method getMorphProperties.
protected Iterable<MorphProperty> getMorphProperties(final String definitionId, final String baseId) {
if (null != definitionId) {
final List<MorphProperty> result = new LinkedList<>();
for (MorphDefinition morphDefinition : morphDefinitions) {
final boolean acceptsDefinition = morphDefinition.accepts(definitionId) || (null != baseId && morphDefinition.accepts(baseId));
if (acceptsDefinition && (morphDefinition instanceof PropertyMorphDefinition)) {
final PropertyMorphDefinition propertyMorphDefinition = (PropertyMorphDefinition) morphDefinition;
final Iterable<MorphProperty> morphProperties = propertyMorphDefinition.getMorphProperties(definitionId);
addAll(result, morphProperties);
final Iterable<MorphProperty> baseMorphProperties = null != baseId ? propertyMorphDefinition.getMorphProperties(definitionId) : null;
if (null != baseMorphProperties) {
addAll(result, baseMorphProperties);
}
}
}
return result;
}
return null;
}
Aggregations