use of org.kie.workbench.common.stunner.core.profile.Profile in project kie-wb-common by kiegroup.
the class ProfileSelector method bind.
public ProfileSelector bind(final Supplier<AbstractSession> sessionSupplier) {
final AbstractSession session = sessionSupplier.get();
final Metadata metadata = session.getCanvasHandler().getDiagram().getMetadata();
final String definitionSetId = metadata.getDefinitionSetId();
final String profileId = metadata.getProfileId();
useDefinitionSet(definitionSetId);
useProfile(definitionSetId, profileId);
selector.setValueChangedCommand(() -> {
final Profile item = selector.getSelectedItem();
metadata.setProfileId(item.getProfileId());
requestSessionRefreshEvent.fire(new RequestSessionRefreshEvent(session.getSessionUUID()));
});
return this;
}
use of org.kie.workbench.common.stunner.core.profile.Profile in project kie-wb-common by kiegroup.
the class ProfileSelector method useProfile.
private void useProfile(final String defSetId, final String profileId) {
final Profile profile = profileManager.getProfile(defSetId, profileId);
setSelectedItem(profile);
}
Aggregations