From 87cf5c5129d4e51fa3b38697d717b17fc639616f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=A6=E9=87=8C=E4=B8=8D=E7=9F=A5=E8=BA=AB=E6=98=AF?= =?UTF-8?q?=E5=AE=A2?= Date: Wed, 4 Jan 2023 08:07:49 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20smc=20fileDiff=20=E9=9B=86=E6=88=90=20u?= =?UTF-8?q?serData=E5=8A=9F=E8=83=BD=20(#193)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: unknowIfGuestInDream --- smc/src/main/java/com/tlcsdm/smc/tools/FileDiff.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/smc/src/main/java/com/tlcsdm/smc/tools/FileDiff.java b/smc/src/main/java/com/tlcsdm/smc/tools/FileDiff.java index 723e27f7c..ad7c96dd0 100644 --- a/smc/src/main/java/com/tlcsdm/smc/tools/FileDiff.java +++ b/smc/src/main/java/com/tlcsdm/smc/tools/FileDiff.java @@ -51,6 +51,7 @@ public class FileDiff extends SmcSample { webView.getEngine().loadContent(template); notificationBuilder.text(I18nUtils.get("smc.tool.fileDiff.button.generate.success")); notificationBuilder.showInformation(); + bindUserData(); }); private final Action download = new Action(I18nUtils.get("smc.tool.button.download"), actionEvent -> { @@ -64,6 +65,7 @@ public class FileDiff extends SmcSample { DiffHandleUtils.generateDiffHtml(diffString, outputField.getText() + "\\diff.html"); notificationBuilder.text(I18nUtils.get("smc.tool.fileDiff.button.download.success")); notificationBuilder.showInformation(); + bindUserData(); }); private final Collection actions = List.of(generate, download); @@ -144,6 +146,10 @@ public Node getPanel(Stage stage) { webView.setMaxSize(Double.MAX_VALUE, Double.MAX_VALUE); GridPane.setVgrow(webView, Priority.ALWAYS); + userData.put("original", originalField); + userData.put("compare", compareField); + userData.put("output", outputField); + grid.add(toolBar, 0, 0, 3, 1); grid.add(originalLabel, 0, 1); grid.add(originalButton, 1, 1);