File tree 2 files changed +10
-2
lines changed
src/com/seventh7/mybatis/setting 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 1
1
<idea-plugin version =" 2" url =" https://github.com/seventh7/intellij-mybatis-plugin" >
2
2
<id >com.seventh7.plugin.mybatis</id >
3
3
<name >MyBatis plugin</name >
4
- <version >2.2 </version >
4
+ <version >2.21 </version >
5
5
<vendor email =" insist.day@gmail.com" url =" https://github.com/seventh7" >Yanglin</vendor >
6
6
7
7
<description ><![CDATA[
10
10
]]> </description >
11
11
12
12
<change-notes ><![CDATA[
13
- <h4>2.2 </h4>
13
+ <h4>2.21 </h4>
14
14
<ul>
15
15
<li>Rebuild mapper model</li>
16
16
<li>Support more completion popup</li>
Original file line number Diff line number Diff line change @@ -53,10 +53,17 @@ public Element getState() {
53
53
element .setAttribute (UPDATE_GENERATOR .getId (), gson .toJson (UPDATE_GENERATOR .getPatterns ()));
54
54
element .setAttribute (SELECT_GENERATOR .getId (), gson .toJson (SELECT_GENERATOR .getPatterns ()));
55
55
element .setAttribute (STATEMENT_GENERATE_MODEL_SETTING_ID , String .valueOf (statementGenerateModel .getIdentifier ()));
56
+ setDefaultDataSourceIdIfNull ();
56
57
element .setAttribute (DEFAULT_SOURCE_SETTING_ID , defaultDataSourceId );
57
58
return element ;
58
59
}
59
60
61
+ private void setDefaultDataSourceIdIfNull () {
62
+ if (this .defaultDataSourceId == null ) {
63
+ this .defaultDataSourceId = "" ;
64
+ }
65
+ }
66
+
60
67
@ Override
61
68
public void loadState (Element state ) {
62
69
loadState (state , INSERT_GENERATOR );
@@ -66,6 +73,7 @@ public void loadState(Element state) {
66
73
final String model = state .getAttributeValue (STATEMENT_GENERATE_MODEL_SETTING_ID );
67
74
statementGenerateModel = GenerateModel .getInstance (model );
68
75
this .defaultDataSourceId = state .getAttributeValue (DEFAULT_SOURCE_SETTING_ID );
76
+ setDefaultDataSourceIdIfNull ();
69
77
}
70
78
71
79
public String getDefaultDataSourceId () {
You can’t perform that action at this time.
0 commit comments