From 36cc1394381b2a7332688930bd4098cd38d1a5af Mon Sep 17 00:00:00 2001 From: Harrison Date: Tue, 22 Nov 2022 17:00:40 +0800 Subject: [PATCH 1/4] =?UTF-8?q?fix:=20REPORT-83197=E3=80=90=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E5=99=A8=E3=80=91=E5=90=AF=E5=8A=A8=E9=A1=B5=E6=80=A7?= =?UTF-8?q?=E8=83=BD=E4=BC=98=E5=8C=96=20=E5=A4=84=E7=90=86=E4=B8=80?= =?UTF-8?q?=E9=83=A8=E5=88=86=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/DesignerEnvManager.java | 2 +- .../com/fr/design/env/LocalDesignerWorkspaceInfo.java | 10 +++++----- .../src/main/java/com/fr/start/MainDesigner.java | 3 ++- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java b/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java index 43e59f2263..6b681699be 100644 --- a/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java +++ b/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java @@ -200,7 +200,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter, AsyncXmlReada /** * alphafine */ - private XmlElement alphaFineConfigManager; + private XmlElement alphaFineConfigManager = SimpleXmlElement.of(AlphaFineConfigManager.getInstance()); /** * 阅后即焚的配置项 diff --git a/designer-base/src/main/java/com/fr/design/env/LocalDesignerWorkspaceInfo.java b/designer-base/src/main/java/com/fr/design/env/LocalDesignerWorkspaceInfo.java index bd1c48ce72..d3fb4268da 100644 --- a/designer-base/src/main/java/com/fr/design/env/LocalDesignerWorkspaceInfo.java +++ b/designer-base/src/main/java/com/fr/design/env/LocalDesignerWorkspaceInfo.java @@ -100,16 +100,16 @@ public class LocalDesignerWorkspaceInfo implements DesignerWorkspaceInfo { @Override public boolean checkValid(){ - // 如果当前是 debug 模式,就不检测这个逻辑 - if (CommonUtils.isDebug()) { - return true; - } - File file = new File(this.path); //判断不是文件夹/路径不在WEB-INF下/代码启动三种情况 if(!file.isDirectory() || !ComparatorUtils.equals(file.getName(), "WEB-INF") || this.path.startsWith(".")) { return false; } + + // 如果当前是 debug 模式,就不检测是否 mainVersion 不一致 + if (CommonUtils.isDebug()) { + return true; + } File engineLib = new File(StableUtils.pathJoin(this.path, ProjectConstants.LIB_NAME, REPORT_ENGINE_JAR)); // 非安装版本允许自由切换 diff --git a/designer-realize/src/main/java/com/fr/start/MainDesigner.java b/designer-realize/src/main/java/com/fr/start/MainDesigner.java index 926bbbcc66..bd4ed7116e 100644 --- a/designer-realize/src/main/java/com/fr/start/MainDesigner.java +++ b/designer-realize/src/main/java/com/fr/start/MainDesigner.java @@ -193,7 +193,8 @@ public class MainDesigner extends BaseDesigner { private static void showSplash() { // 快快显示启动画面 - UIUtil.invokeLaterIfNeeded(new Runnable() { + // vito: 这里必须用 wait, 不然会导致莫名其妙的问题 + UIUtil.invokeAndWaitIfNeeded(new Runnable() { @Override public void run() { SplashContext.getInstance().registerSplash(createSplash()); From 92052935d258db9d85cf0fc1e3b3da2d00917301 Mon Sep 17 00:00:00 2001 From: kerry Date: Tue, 22 Nov 2022 18:12:16 +0800 Subject: [PATCH 2/4] =?UTF-8?q?REPORT-84617=20=E6=A8=A1=E6=9D=BF=E8=AE=A4?= =?UTF-8?q?=E8=AF=81=E5=8D=A1=E6=85=A2=E6=9B=B4=E6=96=B0=E8=BF=AD=E4=BB=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/gui/itree/filetree/TemplateFileTree.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/itree/filetree/TemplateFileTree.java b/designer-base/src/main/java/com/fr/design/gui/itree/filetree/TemplateFileTree.java index f273fa2092..9e17611ce2 100644 --- a/designer-base/src/main/java/com/fr/design/gui/itree/filetree/TemplateFileTree.java +++ b/designer-base/src/main/java/com/fr/design/gui/itree/filetree/TemplateFileTree.java @@ -144,7 +144,7 @@ public class TemplateFileTree extends EnvFileTree { Set supportTypes = createFileExtensionFilter(); return FRContext.getFileNodes().list( path, - supportTypes.toArray(new FileExtension[supportTypes.size()]) + supportTypes.toArray(new FileExtension[supportTypes.size()]),false,true ); } From 4b7169ebce70be8423069255f68418bcabcfdeea Mon Sep 17 00:00:00 2001 From: kerry Date: Tue, 22 Nov 2022 18:35:03 +0800 Subject: [PATCH 3/4] =?UTF-8?q?fix=EF=BC=9A=E6=A0=BC=E5=BC=8F=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/gui/itree/filetree/TemplateFileTree.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/itree/filetree/TemplateFileTree.java b/designer-base/src/main/java/com/fr/design/gui/itree/filetree/TemplateFileTree.java index 9e17611ce2..b87a70b5b6 100644 --- a/designer-base/src/main/java/com/fr/design/gui/itree/filetree/TemplateFileTree.java +++ b/designer-base/src/main/java/com/fr/design/gui/itree/filetree/TemplateFileTree.java @@ -144,8 +144,8 @@ public class TemplateFileTree extends EnvFileTree { Set supportTypes = createFileExtensionFilter(); return FRContext.getFileNodes().list( path, - supportTypes.toArray(new FileExtension[supportTypes.size()]),false,true - ); + supportTypes.toArray(new FileExtension[supportTypes.size()]), false, true + ); } private Set createFileExtensionFilter() { From c633c8f8aa295f72ad7249fdfdcad0def3bcfe7a Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Wed, 23 Nov 2022 09:58:59 +0800 Subject: [PATCH 4/4] =?UTF-8?q?REPORT-84428=20=E8=AE=BE=E7=BD=AE=E5=83=8F&?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E5=86=85=E5=AE=B9=E9=A2=91=E7=B9=81=E5=88=87?= =?UTF-8?q?=E6=8D=A2=E4=BC=9A=E5=87=BA=E7=8E=B0=E7=A9=BA=E7=99=BD=E6=88=96?= =?UTF-8?q?=E5=85=A8=E9=80=89=E7=9A=84=E5=BC=82=E5=B8=B8=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../replace/ui/ITReplaceWestPanel.java | 33 +++++++++---------- 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceWestPanel.java b/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceWestPanel.java index 1c9ed16523..a01fa3909e 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceWestPanel.java +++ b/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceWestPanel.java @@ -14,11 +14,11 @@ import javax.swing.BorderFactory; import javax.swing.Icon; import javax.swing.JPanel; import javax.swing.SwingConstants; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; import java.awt.Color; import java.awt.Cursor; import java.awt.GridLayout; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; import java.awt.event.MouseEvent; import java.util.List; @@ -49,31 +49,28 @@ public class ITReplaceWestPanel { contentButton = new UIToggleButton(Toolkit.i18nText("Fine-Design_Basic_Templates_Content")); settingButton = new UIToggleButton(Toolkit.i18nText("Fine-Design_Replace_Setting")); contentButton.setText(CONTENT_TEXT); - contentButton.addActionListener(new ActionListener() { + contentButton.addChangeListener(new ChangeListener() { @Override - public void actionPerformed(ActionEvent e) { - if (!contentButton.isSelected()) { + public void stateChanged(ChangeEvent e) { + if (contentButton.isSelected()) { showSelectPanel(ITReplaceNorthPanel.CARD_CONTENT, ITReplaceMainDialog.getSearchContentResultList()); + settingButton.setSelected(!contentButton.isSelected()); + changeColor4SelectContent(); } else { - showSelectPanel(ITReplaceNorthPanel.CARD_SETTING, ITReplaceMainDialog.getSearchSettingResultList()); + contentButton.setSelected(true); } - changeColor4SelectContent(); - settingButton.setSelected(contentButton.isSelected()); - } }); - - settingButton.addActionListener(new ActionListener() { + settingButton.addChangeListener(new ChangeListener() { @Override - public void actionPerformed(ActionEvent e) { - if (!settingButton.isSelected()) { + public void stateChanged(ChangeEvent e) { + if (settingButton.isSelected()) { showSelectPanel(ITReplaceNorthPanel.CARD_SETTING, ITReplaceMainDialog.getSearchSettingResultList()); + contentButton.setSelected(!settingButton.isSelected()); + changeColor4SelectContent(); } else { - showSelectPanel(ITReplaceNorthPanel.CARD_CONTENT, ITReplaceMainDialog.getSearchContentResultList()); + settingButton.setSelected(true); } - changeColor4SelectContent(); - contentButton.setSelected(settingButton.isSelected()); - } }); leftPanel.setBackground(Color.WHITE); @@ -118,7 +115,7 @@ public class ITReplaceWestPanel { * 切换面板时改变颜色 */ public void changeColor4SelectContent() { - if (!contentButton.isSelected()) { + if (contentButton.isSelected()) { contentButton.setText(CONTENT_TEXT); settingButton.setText(Toolkit.i18nText("Fine-Design_Replace_Setting")); } else {