Browse Source

Merge pull request #6806 in DESIGN/design from release/11.0 to feature/x

* commit 'a7615ca613c8b9d4534d8a4b82ab32f121d627e8':
  REPORT-62961 11内置组件没有安装
feature/x
superman 3 years ago
parent
commit
582d4325d5
  1. 11
      designer-base/src/main/java/com/fr/design/DesignerEnvManager.java
  2. 2
      designer-base/src/main/java/com/fr/design/mainframe/ComponentReuseNotifyUtil.java

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

@ -19,6 +19,7 @@ import com.fr.design.i18n.Toolkit;
import com.fr.design.locale.impl.ProductImproveMark;
import com.fr.design.login.DesignerLoginType;
import com.fr.design.login.config.DesignerLoginConfigManager;
import com.fr.design.mainframe.ComponentReuseNotifyUtil;
import com.fr.design.mainframe.reuse.ComponentReuseNotificationInfo;
import com.fr.design.mainframe.vcs.VcsConfigManager;
import com.fr.design.notification.SnapChatConfig;
@ -415,6 +416,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
private void compatibilityPrevVersion(File prevEnvFile) {
try {
XMLTools.readFileXML(designerEnvManager, prevEnvFile);
clearOldVersionDesignerEnvProperties();
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
@ -424,6 +426,11 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
designerEnvManager.saveXMLFile();
}
private void clearOldVersionDesignerEnvProperties() {
SnapChatConfig snapChatConfig = designerEnvManager.getSnapChatConfig();
snapChatConfig.resetRead(ComponentReuseNotifyUtil.COMPONENT_SNAP_CHAT_KEY);
}
public static void setEnvFile(File envFile) {
DesignerEnvManager.envFile = envFile;
}
@ -2332,4 +2339,8 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
DesignerExiter.getInstance().execute();
}
}
public SnapChatConfig getSnapChatConfig() {
return snapChatConfig;
}
}

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

@ -12,7 +12,7 @@ import com.fr.design.notification.SnapChatKey;
* Created by kerry on 5/8/21
*/
public class ComponentReuseNotifyUtil {
private static final String COMPONENT_SNAP_CHAT_KEY = "com.fr.component.share-components";
public static final String COMPONENT_SNAP_CHAT_KEY = "com.fr.component.share-components";
private ComponentReuseNotifyUtil() {

Loading…
Cancel
Save