public void editValue(Optional<String> startValue) {
TextInputDialog dialog = new TextInputDialog(startValue.orElse(this.getValue()));
dialog.setTitle("Edit constant block");
dialog.setHeaderText("Type a Haskell expression");
Optional<String> result = dialog.showAndWait();
result.ifPresent(value -> {
this.setValue(value);
GhciSession ghci = this.getToplevel().getGhciSession();
try {
Type type = ghci.pullType(value, this.getToplevel().getEnvInstance());
this.output.setExactRequiredType(type);
this.hasValidValue = true;
this.outputSpace.setVisible(true);
} catch (HaskellException e) {
this.hasValidValue = false;
this.outputSpace.setVisible(false);
}
this.initiateConnectionChanges();
});
}
ConstantBlock.java 文件源码
java
阅读 36
收藏 0
点赞 0
评论 0
项目:viskell
作者:
评论列表
文章目录