From 36103ebcf71e7a616acf74e4ca758073d24789ed Mon Sep 17 00:00:00 2001 From: hades Date: Sun, 27 Sep 2020 14:28:59 +0800 Subject: [PATCH 1/3] =?UTF-8?q?REPORT-38681=20=E4=BF=AE=E5=A4=8D=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E9=9B=86-sql=E9=9D=A2=E6=9D=BF=E5=85=89=E6=A0=87?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E4=B8=8D=E6=AD=A3=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/gui/syntax/ui/rtextarea/ConfigurableCaret.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/syntax/ui/rtextarea/ConfigurableCaret.java b/designer-base/src/main/java/com/fr/design/gui/syntax/ui/rtextarea/ConfigurableCaret.java index 47c4d35015..5d1ecd1169 100644 --- a/designer-base/src/main/java/com/fr/design/gui/syntax/ui/rtextarea/ConfigurableCaret.java +++ b/designer-base/src/main/java/com/fr/design/gui/syntax/ui/rtextarea/ConfigurableCaret.java @@ -12,6 +12,7 @@ import java.awt.*; import java.awt.event.*; import java.awt.datatransfer.*; import java.awt.event.ActionEvent; +import java.awt.geom.Line2D; import java.io.*; import javax.swing.*; import javax.swing.plaf.*; @@ -454,9 +455,9 @@ public class ConfigurableCaret extends DefaultCaret { // A thicker vertical line. case THICK_VERTICAL_LINE_STYLE: - g.drawLine(r.x,r.y, r.x,r.y+r.height); - r.x++; - g.drawLine(r.x,r.y, r.x,r.y+r.height); + Graphics2D g2 = (Graphics2D) g; + g2.setStroke(new BasicStroke(2)); + g2.draw(new Line2D.Float(r.x, r.y, r.x, r.y + r.height)); break; } // End of switch (style). From 6dbedac77384b31220443080074bf8f9935af503 Mon Sep 17 00:00:00 2001 From: hades Date: Sun, 27 Sep 2020 14:54:01 +0800 Subject: [PATCH 2/3] =?UTF-8?q?REPORT-38681=20=E5=90=91=E5=8F=B3=E5=86=8D?= =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E4=B8=80=E4=B8=AA=E4=BD=8D=E7=BD=AE=20?= =?UTF-8?q?=E9=81=BF=E5=85=8D=E5=85=89=E6=A0=87=E5=A4=AA=E6=8E=A5=E8=BF=91?= =?UTF-8?q?=E6=96=87=E5=AD=97=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/gui/syntax/ui/rtextarea/ConfigurableCaret.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/syntax/ui/rtextarea/ConfigurableCaret.java b/designer-base/src/main/java/com/fr/design/gui/syntax/ui/rtextarea/ConfigurableCaret.java index 5d1ecd1169..233fcd598c 100644 --- a/designer-base/src/main/java/com/fr/design/gui/syntax/ui/rtextarea/ConfigurableCaret.java +++ b/designer-base/src/main/java/com/fr/design/gui/syntax/ui/rtextarea/ConfigurableCaret.java @@ -457,7 +457,8 @@ public class ConfigurableCaret extends DefaultCaret { case THICK_VERTICAL_LINE_STYLE: Graphics2D g2 = (Graphics2D) g; g2.setStroke(new BasicStroke(2)); - g2.draw(new Line2D.Float(r.x, r.y, r.x, r.y + r.height)); + // 向右再移动一个位置 避免光标太接近文字内容 + g2.draw(new Line2D.Float(r.x + 1, r.y, r.x + 1, r.y + r.height)); break; } // End of switch (style). From 76d04b898fa90242ae30e38560066a1b04f7e3cf Mon Sep 17 00:00:00 2001 From: hades Date: Sun, 27 Sep 2020 15:48:30 +0800 Subject: [PATCH 3/3] =?UTF-8?q?REPORT-38653=20=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E5=9C=A8=E7=BA=BF=E6=9B=B4=E6=96=B0=E5=8D=87=E7=BA=A7=E9=80=82?= =?UTF-8?q?=E9=85=8Djdk11?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/actions/file/PreferencePane.java | 4 +- .../java/com/fr/design/jdk/JdkVersion.java | 38 +++++++++++++++++++ .../com/fr/design/os/impl/PMDialogAction.java | 4 +- 3 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 designer-base/src/main/java/com/fr/design/jdk/JdkVersion.java diff --git a/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java b/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java index 0ccb5d3e7b..5afe58ad30 100644 --- a/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java +++ b/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java @@ -20,6 +20,7 @@ import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.iprogressbar.UIProgressBarUI; import com.fr.design.gui.ispinner.UISpinner; import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.jdk.JdkVersion; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; @@ -39,6 +40,7 @@ import com.fr.general.log.Log4jConfig; import com.fr.locale.InterProviderFactory; import com.fr.log.FineLoggerFactory; import com.fr.stable.Constants; +import com.fr.stable.StableUtils; import com.fr.stable.os.OperatingSystem; import com.fr.third.apache.log4j.Level; import com.fr.transaction.Configurations; @@ -216,7 +218,7 @@ public class PreferencePane extends BasicPane { oracleSpace = new UICheckBox(i18nText("Fine-Design_Basic_Show_All_Oracle_Tables")); oraclePane.add(oracleSpace); - if (!OperatingSystem.isLinux()) { + if (!OperatingSystem.isLinux() && JdkVersion.LE_8.support()) { JPanel upmSelectorPane = FRGUIPaneFactory.createTitledBorderPane(i18nText("Fine-Design_Basic_Update_Plugin_Manager")); useOptimizedUPMCheckbox = new UICheckBox(i18nText("Fine-Design_Basic_Use_New_Update_Plugin_Manager")); upmSelectorPane.add(useOptimizedUPMCheckbox); diff --git a/designer-base/src/main/java/com/fr/design/jdk/JdkVersion.java b/designer-base/src/main/java/com/fr/design/jdk/JdkVersion.java new file mode 100644 index 0000000000..be0c3da013 --- /dev/null +++ b/designer-base/src/main/java/com/fr/design/jdk/JdkVersion.java @@ -0,0 +1,38 @@ +package com.fr.design.jdk; + +import com.fr.stable.StableUtils; + +/** + * 设计器运行jdk版本 + * + * @author hades + * @version 10.0 + * Created by hades on 2020/9/27 + */ +public enum JdkVersion { + + /** + * 小于或等于jdk 8 + */ + LE_8 { + + @Override + public boolean support() { + return StableUtils.getMajorJavaVersion() <= 8; + } + }, + + /** + * 大于或等于jdk 9 + */ + GE_9 { + + @Override + public boolean support() { + return StableUtils.getMajorJavaVersion() >= 9; + } + }; + + + abstract public boolean support(); +} diff --git a/designer-base/src/main/java/com/fr/design/os/impl/PMDialogAction.java b/designer-base/src/main/java/com/fr/design/os/impl/PMDialogAction.java index 541e39601b..7e74e7651a 100644 --- a/designer-base/src/main/java/com/fr/design/os/impl/PMDialogAction.java +++ b/designer-base/src/main/java/com/fr/design/os/impl/PMDialogAction.java @@ -2,8 +2,10 @@ package com.fr.design.os.impl; import com.fr.config.ServerPreferenceConfig; import com.fr.design.extra.WebViewDlgHelper; +import com.fr.design.jdk.JdkVersion; import com.fr.design.upm.UpmFinder; import com.fr.design.utils.DesignUtils; +import com.fr.stable.StableUtils; import com.fr.stable.os.Arch; import com.fr.stable.os.OperatingSystem; import com.fr.stable.os.support.OSBasedAction; @@ -21,7 +23,7 @@ public class PMDialogAction implements OSBasedAction { DesignUtils.visitEnvServerByParameters( PLUGIN_MANAGER_ROUTE,null,null); return; } - if (ServerPreferenceConfig.getInstance().isUseOptimizedUPM()) { + if (ServerPreferenceConfig.getInstance().isUseOptimizedUPM() && JdkVersion.LE_8.support()) { UpmFinder.showUPMDialog(); } else { WebViewDlgHelper.createPluginDialog();