Fix pipeline

This commit is contained in:
Moritz Dieing 2021-02-17 17:36:17 +01:00
parent 43af68812e
commit eb33ce11bf

View File

@ -70,15 +70,7 @@ public class TypeAssumptionsArea extends Dialog implements LocaleChangeObserver
assumptionContainer = new VerticalLayout();
assumptionContainer.setId(ASS_CONTAINER_ID);
for (Map.Entry<String, String> param : types.entrySet()) {
TypeAssumptionField assumption = new TypeAssumptionField(value -> {
assumptionContainer.remove(value);
fields.remove(value);
}, param.getKey(), param.getValue());
assumptionContainer.add(assumption);
fields.add(assumption);
}
initializeWithAssumptions(types);
layout.add(heading, buttons, assumptionContainer);
add(layout);
setCloseOnOutsideClick(false);
@ -91,6 +83,17 @@ public class TypeAssumptionsArea extends Dialog implements LocaleChangeObserver
this(new HashMap<>());
}
private void initializeWithAssumptions(Map<String, String> types) {
for (Map.Entry<String, String> param : types.entrySet()) {
TypeAssumptionField assumption = new TypeAssumptionField(value -> {
assumptionContainer.remove(value);
fields.remove(value);
}, param.getKey(), param.getValue());
assumptionContainer.add(assumption);
fields.add(assumption);
}
}
private void onAddAssumptionClicked() {
TypeAssumptionField assumption = new TypeAssumptionField(value -> {
assumptionContainer.remove(value);