Search in sources :

Example 1 with PaletteDefinitionBuilder

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();
}
Also used : PaletteDefinitionBuilder(org.kie.workbench.common.stunner.core.client.components.palette.PaletteDefinitionBuilder) Annotation(java.lang.annotation.Annotation)

Aggregations

Annotation (java.lang.annotation.Annotation)1 PaletteDefinitionBuilder (org.kie.workbench.common.stunner.core.client.components.palette.PaletteDefinitionBuilder)1