ConstantBlock.java 文件源码

java
阅读 36 收藏 0 点赞 0 评论 0

项目:viskell 作者:
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();
    });
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号