File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
src/main/java/com/sjhy/plugin/tool Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 55import com .intellij .util .xmlb .annotations .Transient ;
66import com .sjhy .plugin .entity .*;
77import lombok .Data ;
8+ import org .apache .commons .lang3 .StringUtils ;
89import org .jetbrains .annotations .NotNull ;
910import org .jetbrains .annotations .Nullable ;
1011
@@ -247,8 +248,15 @@ public ConfigInfo getState() {
247248 public void loadState (@ NotNull ConfigInfo configInfo ) {
248249 // 备份初始配置
249250 Map <String , TemplateGroup > templateGroupMap = this .getTemplateGroupMap ();
251+ String version = this .getVersion ();
250252 // 覆盖初始配置
251253 XmlSerializerUtil .copyBean (configInfo , this );
254+
255+ // 已经合并不再重复合并
256+ if (configInfo .getVersion ()!=null && configInfo .getVersion ().equals (version )) {
257+ return ;
258+ }
259+
252260 // 合并配置
253261 templateGroupMap .forEach ((name , templateGroup ) -> {
254262 if (this .getTemplateGroupMap ().containsKey (name )) {
You can’t perform that action at this time.
0 commit comments