mirror of
https://gitlab.kit.edu/uskyk/typicalc.git
synced 2024-11-08 18:30:42 +00:00
fix that examples are now visualized on click
This commit is contained in:
parent
f1df0fee45
commit
e658060fd1
@ -108,10 +108,14 @@ public class InputBar extends HorizontalLayout implements LocaleChangeObserver {
|
||||
typeAssumptionsArea = new TypeAssumptionsArea(typeAssumptions);
|
||||
}
|
||||
|
||||
protected void setTermAndClickTypeInfer(String term) {
|
||||
setTerm(term);
|
||||
onTypeInferButtonClick();
|
||||
}
|
||||
|
||||
private void onTypeInferButtonClick() {
|
||||
String currentInput = inputField.getOptionalValue().orElse(StringUtils.EMPTY);
|
||||
inputField.blur();
|
||||
|
||||
callback.accept(Pair.of(currentInput, typeAssumptionsArea.getTypeAssumptions()));
|
||||
}
|
||||
|
||||
@ -120,7 +124,7 @@ public class InputBar extends HorizontalLayout implements LocaleChangeObserver {
|
||||
}
|
||||
|
||||
private void onExampleButtonClick() {
|
||||
Dialog exampleDialog = new ExampleDialog(this::setTerm);
|
||||
Dialog exampleDialog = new ExampleDialog(this::setTermAndClickTypeInfer);
|
||||
exampleDialog.open();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user