From 73039732f405d19bf6345f681e403d8c61facde4 Mon Sep 17 00:00:00 2001 From: Maksim Date: Wed, 18 Mar 2020 19:07:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E6=B5=8B=E8=AF=95=E8=BF=9E?= =?UTF-8?q?=E6=8E=A5=E6=97=B6=E6=97=A7=E7=9A=84=E7=89=88=E6=9C=AC=E6=8F=90?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/EnvChangeEntrance.java | 4 ++++ .../main/java/com/fr/env/CheckServiceDialog.java | 6 ++++-- .../java/com/fr/env/TestConnectionResult.java | 15 +++------------ 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java b/designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java index b9d59f27b..c2a9b7c2d 100644 --- a/designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java +++ b/designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java @@ -250,6 +250,10 @@ public class EnvChangeEntrance { FineLoggerFactory.getLogger().info("workspace service {} get annotation failed", clazz); continue; } + //一些不想暴露给用户的服务,可以在注解中不添加description,检测但不做提示,如固件回传 + if(StringUtils.isEmpty(workspaceAPI.description())){ + continue; + } String descriptionOfCN = InterProviderFactory.getProvider().getLocText(workspaceAPI.description()); textBuilder.append(descriptionOfCN).append("\n"); } diff --git a/designer-base/src/main/java/com/fr/env/CheckServiceDialog.java b/designer-base/src/main/java/com/fr/env/CheckServiceDialog.java index 0389d7d58..f9303f08b 100644 --- a/designer-base/src/main/java/com/fr/env/CheckServiceDialog.java +++ b/designer-base/src/main/java/com/fr/env/CheckServiceDialog.java @@ -20,6 +20,7 @@ import javax.swing.JPanel; import javax.swing.JTextArea; import javax.swing.JTextPane; import java.awt.BorderLayout; +import java.awt.Color; import java.awt.Dimension; import java.awt.Frame; import java.awt.event.ActionEvent; @@ -49,7 +50,7 @@ public class CheckServiceDialog extends JDialog implements ActionListener { JLabel imageLabel = new JLabel(); imageLabel.setIcon(icon); imagePanel.add(imageLabel); - imagePanel.setPreferredSize(new Dimension(110,80)); + imagePanel.setPreferredSize(new Dimension(110,100)); JPanel verticalPanel = FRGUIPaneFactory.createVerticalFlowLayout_S_Pane(true); FRFont font = FRFont.getInstance(); @@ -68,7 +69,7 @@ public class CheckServiceDialog extends JDialog implements ActionListener { JTextPane tipsPane = new JTextPane(); tipsPane.setEditable(false); tipsPane.setBackground(verticalPanel.getBackground()); - tipsPane.setPreferredSize(new Dimension(500,30)); + tipsPane.setPreferredSize(new Dimension(500,40)); tipsPane.setText(Toolkit.i18nText("Fine-Design_Basic_Remote_Design_Branch_Need_Update")); verticalPanel.add(label); @@ -77,6 +78,7 @@ public class CheckServiceDialog extends JDialog implements ActionListener { topPanel.add(imagePanel,BorderLayout.WEST); topPanel.add(verticalPanel,BorderLayout.CENTER); + topPanel.setBorder(BorderFactory.createEmptyBorder(10,10,0,10)); //中间的文本域面板 centerPanel = FRGUIPaneFactory.createBorderLayout_L_Pane(); diff --git a/designer-base/src/main/java/com/fr/env/TestConnectionResult.java b/designer-base/src/main/java/com/fr/env/TestConnectionResult.java index 5362dbbd8..4524254f4 100644 --- a/designer-base/src/main/java/com/fr/env/TestConnectionResult.java +++ b/designer-base/src/main/java/com/fr/env/TestConnectionResult.java @@ -34,7 +34,7 @@ public enum TestConnectionResult { }, /** - * 不完全成功,版本不匹配,但测试连接成功。 + * 不完全成功,版本不匹配,但测试连接成功。该状态先保留 */ PARTLY_SUCCESS { @Override @@ -89,16 +89,7 @@ public enum TestConnectionResult { if (!value) { return FULLY_FAILED; } - try { - String serverVersion = new FunctionalHttpRequest(info).getServerVersion(); - if (AssistUtils.equals(serverVersion, WorkContext.getVersion())) { - return FULLY_SUCCESS; - } - return PARTLY_SUCCESS; - } catch (Exception e) { - // 发生异常,说明没连接上。返回完全失败。 - FineLoggerFactory.getLogger().error(e.getMessage()); - return FULLY_FAILED; - } + //去掉测试连接时所做的检测 + return FULLY_SUCCESS; } }