use of org.kie.workbench.common.stunner.core.client.components.palette.PaletteDefinitionBuilder in project kie-wb-common by kiegroup.
the class DefaultPaletteFactory method getPaletteDefinitionBuilder.
private PaletteDefinitionBuilder<H, DefaultPaletteDefinition> getPaletteDefinitionBuilder(final H canvasHandler) {
final String definitionSetId = canvasHandler.getDiagram().getMetadata().getDefinitionSetId();
final Annotation qualifier = definitionUtils.getQualifier(definitionSetId);
final ManagedInstance<PaletteDefinitionBuilder<H, DefaultPaletteDefinition>> custom = paletteDefinitionBuilders.select(qualifier);
if (custom.isUnsatisfied()) {
return paletteDefinitionBuilders.select(DefinitionManager.DEFAULT_QUALIFIER).get();
}
return custom.get();
}
Aggregations