From 6dbe6fa6ab99f93e9d109a6eba34944b9c4c82bd Mon Sep 17 00:00:00 2001 From: pengda Date: Mon, 21 Feb 2022 15:40:47 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-58833=20js=E7=BC=96=E8=BE=91=E5=99=A8?= =?UTF-8?q?=E5=9F=8B=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../javascript/JSContentWithDescriptionPane.java | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/javascript/JSContentWithDescriptionPane.java b/designer-base/src/main/java/com/fr/design/javascript/JSContentWithDescriptionPane.java index 469598a3f6..8e8ef45b9f 100644 --- a/designer-base/src/main/java/com/fr/design/javascript/JSContentWithDescriptionPane.java +++ b/designer-base/src/main/java/com/fr/design/javascript/JSContentWithDescriptionPane.java @@ -441,19 +441,21 @@ public class JSContentWithDescriptionPane extends JSContentPane implements KeyLi Object value = helpDOCList.getSelectedValue(); if (value instanceof HelpDocument) { String url = ((HelpDocument) value).getDocumentUrl(); - try { - Desktop.getDesktop().browse(new URI(url)); - } catch (IOException ex) { - FineLoggerFactory.getLogger().error(ex.getMessage(), ex); - } catch (URISyntaxException ex) { - FineLoggerFactory.getLogger().error(ex.getMessage(), ex); - } + browse(url); } } } }); } + private void browse(String url){ + try { + Desktop.getDesktop().browse(new URI(url)); + } catch (IOException | URISyntaxException ex) { + FineLoggerFactory.getLogger().error(ex.getMessage(), ex); + } + } + private void initHelpDOCListRender() { helpDOCList.setCellRenderer(new DefaultListCellRenderer() { @Override