Browse Source

Merge pull request #10733 in DESIGN/design from bugfix/11.0 to feature/x

* commit '745c82566389e1e57b11d31fcc4559e28520bb3a':
  REPORT-84428 设置像&模板内容频繁切换会出现空白或全选的异常情况
  fix:格式化
  REPORT-84617 模板认证卡慢更新迭代
  fix: REPORT-83197【设计器】启动页性能优化 处理一部分问题
feature/x
superman 2 years ago
parent
commit
f3970fa41c
  1. 2
      designer-base/src/main/java/com/fr/design/DesignerEnvManager.java
  2. 10
      designer-base/src/main/java/com/fr/design/env/LocalDesignerWorkspaceInfo.java
  3. 4
      designer-base/src/main/java/com/fr/design/gui/itree/filetree/TemplateFileTree.java
  4. 33
      designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceWestPanel.java
  5. 3
      designer-realize/src/main/java/com/fr/start/MainDesigner.java

2
designer-base/src/main/java/com/fr/design/DesignerEnvManager.java

@ -200,7 +200,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter, AsyncXmlReada
/** /**
* alphafine * alphafine
*/ */
private XmlElement<AlphaFineConfigManager> alphaFineConfigManager; private XmlElement<AlphaFineConfigManager> alphaFineConfigManager = SimpleXmlElement.of(AlphaFineConfigManager.getInstance());
/** /**
* 阅后即焚的配置项 * 阅后即焚的配置项

10
designer-base/src/main/java/com/fr/design/env/LocalDesignerWorkspaceInfo.java vendored

@ -100,17 +100,17 @@ public class LocalDesignerWorkspaceInfo implements DesignerWorkspaceInfo {
@Override @Override
public boolean checkValid(){ public boolean checkValid(){
// 如果当前是 debug 模式,就不检测这个逻辑
if (CommonUtils.isDebug()) {
return true;
}
File file = new File(this.path); File file = new File(this.path);
//判断不是文件夹/路径不在WEB-INF下/代码启动三种情况 //判断不是文件夹/路径不在WEB-INF下/代码启动三种情况
if(!file.isDirectory() || !ComparatorUtils.equals(file.getName(), "WEB-INF") || this.path.startsWith(".")) { if(!file.isDirectory() || !ComparatorUtils.equals(file.getName(), "WEB-INF") || this.path.startsWith(".")) {
return false; return false;
} }
// 如果当前是 debug 模式,就不检测是否 mainVersion 不一致
if (CommonUtils.isDebug()) {
return true;
}
File engineLib = new File(StableUtils.pathJoin(this.path, ProjectConstants.LIB_NAME, REPORT_ENGINE_JAR)); File engineLib = new File(StableUtils.pathJoin(this.path, ProjectConstants.LIB_NAME, REPORT_ENGINE_JAR));
// 非安装版本允许自由切换 // 非安装版本允许自由切换
boolean notExistLib = !CoreConstants.DOT.equals(StableUtils.getInstallHome()) boolean notExistLib = !CoreConstants.DOT.equals(StableUtils.getInstallHome())

4
designer-base/src/main/java/com/fr/design/gui/itree/filetree/TemplateFileTree.java

@ -144,8 +144,8 @@ public class TemplateFileTree extends EnvFileTree {
Set<FileExtension> supportTypes = createFileExtensionFilter(); Set<FileExtension> supportTypes = createFileExtensionFilter();
return FRContext.getFileNodes().list( return FRContext.getFileNodes().list(
path, path,
supportTypes.toArray(new FileExtension[supportTypes.size()]) supportTypes.toArray(new FileExtension[supportTypes.size()]), false, true
); );
} }
private Set<FileExtension> createFileExtensionFilter() { private Set<FileExtension> createFileExtensionFilter() {

33
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.Icon;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.SwingConstants; import javax.swing.SwingConstants;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.Color; import java.awt.Color;
import java.awt.Cursor; import java.awt.Cursor;
import java.awt.GridLayout; import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
import java.util.List; import java.util.List;
@ -49,31 +49,28 @@ public class ITReplaceWestPanel {
contentButton = new UIToggleButton(Toolkit.i18nText("Fine-Design_Basic_Templates_Content")); contentButton = new UIToggleButton(Toolkit.i18nText("Fine-Design_Basic_Templates_Content"));
settingButton = new UIToggleButton(Toolkit.i18nText("Fine-Design_Replace_Setting")); settingButton = new UIToggleButton(Toolkit.i18nText("Fine-Design_Replace_Setting"));
contentButton.setText(CONTENT_TEXT); contentButton.setText(CONTENT_TEXT);
contentButton.addActionListener(new ActionListener() { contentButton.addChangeListener(new ChangeListener() {
@Override @Override
public void actionPerformed(ActionEvent e) { public void stateChanged(ChangeEvent e) {
if (!contentButton.isSelected()) { if (contentButton.isSelected()) {
showSelectPanel(ITReplaceNorthPanel.CARD_CONTENT, ITReplaceMainDialog.getSearchContentResultList()); showSelectPanel(ITReplaceNorthPanel.CARD_CONTENT, ITReplaceMainDialog.getSearchContentResultList());
settingButton.setSelected(!contentButton.isSelected());
changeColor4SelectContent();
} else { } else {
showSelectPanel(ITReplaceNorthPanel.CARD_SETTING, ITReplaceMainDialog.getSearchSettingResultList()); contentButton.setSelected(true);
} }
changeColor4SelectContent();
settingButton.setSelected(contentButton.isSelected());
} }
}); });
settingButton.addChangeListener(new ChangeListener() {
settingButton.addActionListener(new ActionListener() {
@Override @Override
public void actionPerformed(ActionEvent e) { public void stateChanged(ChangeEvent e) {
if (!settingButton.isSelected()) { if (settingButton.isSelected()) {
showSelectPanel(ITReplaceNorthPanel.CARD_SETTING, ITReplaceMainDialog.getSearchSettingResultList()); showSelectPanel(ITReplaceNorthPanel.CARD_SETTING, ITReplaceMainDialog.getSearchSettingResultList());
contentButton.setSelected(!settingButton.isSelected());
changeColor4SelectContent();
} else { } else {
showSelectPanel(ITReplaceNorthPanel.CARD_CONTENT, ITReplaceMainDialog.getSearchContentResultList()); settingButton.setSelected(true);
} }
changeColor4SelectContent();
contentButton.setSelected(settingButton.isSelected());
} }
}); });
leftPanel.setBackground(Color.WHITE); leftPanel.setBackground(Color.WHITE);
@ -118,7 +115,7 @@ public class ITReplaceWestPanel {
* 切换面板时改变颜色 * 切换面板时改变颜色
*/ */
public void changeColor4SelectContent() { public void changeColor4SelectContent() {
if (!contentButton.isSelected()) { if (contentButton.isSelected()) {
contentButton.setText(CONTENT_TEXT); contentButton.setText(CONTENT_TEXT);
settingButton.setText(Toolkit.i18nText("Fine-Design_Replace_Setting")); settingButton.setText(Toolkit.i18nText("Fine-Design_Replace_Setting"));
} else { } else {

3
designer-realize/src/main/java/com/fr/start/MainDesigner.java

@ -193,7 +193,8 @@ public class MainDesigner extends BaseDesigner {
private static void showSplash() { private static void showSplash() {
// 快快显示启动画面 // 快快显示启动画面
UIUtil.invokeLaterIfNeeded(new Runnable() { // vito: 这里必须用 wait, 不然会导致莫名其妙的问题
UIUtil.invokeAndWaitIfNeeded(new Runnable() {
@Override @Override
public void run() { public void run() {
SplashContext.getInstance().registerSplash(createSplash()); SplashContext.getInstance().registerSplash(createSplash());

Loading…
Cancel
Save