Skip to content

Commit edd4e03

Browse files
committed
change file template format
1 parent 1424c7c commit edd4e03

File tree

3 files changed

+23
-15
lines changed

3 files changed

+23
-15
lines changed

build.gradle

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,14 @@ intellij {
5757
// plugins 'org.jetbrains.kotlin:1.2.61-release-IJ2017.3-1' //here
5858
}
5959

60+
61+
patchPluginXml {
62+
changeNotes """
63+
<h3>Add IModel interface and implementation class optional generation</h3>
64+
<br/>
65+
<a href="https://github.com/longforus/MvpAutoCodePlus/blob/master/CHANGELOG.md"><b>Full Changelog History</b></a>"""
66+
}
67+
6068
publishPlugin {
6169
username publishUserName
6270
password publishPassword

src/main/kotlin/com/longforus/mvpautocodeplus/TemplateCons.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,37 +2,37 @@
22

33
/**
44
* Created by XQ Yang on 2018/6/28 11:02.
5-
* Description : 模版常量
5+
* @describe 模版常量
66
*/
77

88
public interface TemplateCons {
99

1010
String CONTRACT_TP_CONTENT_JAVA =
11-
"#if (${PACKAGE_NAME} != \"\")package ${PACKAGE_NAME};#end\n" + "\n" + "import ${V};\n" + "import ${P};\n" + "import ${M};\n" + "/**\n" + " * Description : \n" +
11+
"#if (${PACKAGE_NAME} != \"\")package ${PACKAGE_NAME};#end\n" + "\n" + "import ${V};\n" + "import ${P};\n" + "import ${M};\n" + "/**\n" + " * @describe \n" +
1212
" * @author ${USER}\n" + " * @date ${DATE} ${TIME}\n" + " * \t\t\t\t\t\t\t\t - generate by MvpAutoCodePlus plugin.\n" + " */\n" + "\n" +
13-
"public interface I${NAME}Contract {\n" + "interface View extends IView${VG}{}\n" + "interface Presenter extends IPresenter${PG}{}\n" +
14-
"interface Model extends IModel${MG}{}\n" + "}\n";
13+
"public interface I${NAME}Contract {\n" + " interface View extends IView${VG}{}\n" + " interface Presenter extends IPresenter${PG}{}\n" +
14+
" interface Model extends IModel${MG}{}\n" + "}\n";
1515
String CONTRACT_TP_CONTENT_NO_MODEL_JAVA =
16-
"#if (${PACKAGE_NAME} != \"\")package ${PACKAGE_NAME};#end\n" + "\n" + "import ${V};\n" + "import ${P};\n" + "/**\n" + " * Description : \n" + " * @author ${USER}\n" +
16+
"#if (${PACKAGE_NAME} != \"\")package ${PACKAGE_NAME};#end\n" + "\n" + "import ${V};\n" + "import ${P};\n" + "/**\n" + " * @describe \n" + " * @author ${USER}\n" +
1717
" * @date ${DATE} ${TIME}\n" + " * \t\t\t\t\t\t\t\t - generate by MvpAutoCodePlus plugin.\n" + " */\n" + "\n" + "public interface I${NAME}Contract {\n" +
18-
"interface View extends IView${VG}{}\n" + "interface Presenter extends IPresenter${PG}{}\n" + "}\n";
18+
" interface View extends IView${VG}{}\n" + " interface Presenter extends IPresenter${PG}{}\n" + "}\n";
1919

2020
String CONTRACT_TP_CONTENT_KOTLIN =
21-
"#if (${PACKAGE_NAME} != \"\")package ${PACKAGE_NAME}#end\n" + "\n" + "import ${V}\n" + "import ${P}\n" + "import ${M}\n" + "/**\n" + " * Description : \n" +
21+
"#if (${PACKAGE_NAME} != \"\")package ${PACKAGE_NAME}#end\n" + "\n" + "import ${V}\n" + "import ${P}\n" + "import ${M}\n" + "/**\n" + " * @describe \n" +
2222
" * @author ${USER}\n" + " * @date ${DATE} ${TIME}\n" + " * \t\t\t\t\t\t\t\t - generate by MvpAutoCodePlus plugin.\n" + " */\n" + "\n" + "interface ${NAME} {\n" +
2323
" interface View : IView${VG}{}\n" + " interface Presenter : IPresenter${PG}{}\n" + " interface Model : IModel${MG}{}\n" + "}\n";
2424
String CONTRACT_TP_CONTENT_NO_MODEL_KOTLIN =
25-
"#if (${PACKAGE_NAME} != \"\")package ${PACKAGE_NAME}#end\n" + "\n" + "import ${V}\n" + "import ${P}\n" + "/**\n" + " * Description : \n" + " * @author ${USER}\n" +
25+
"#if (${PACKAGE_NAME} != \"\")package ${PACKAGE_NAME}#end\n" + "\n" + "import ${V}\n" + "import ${P}\n" + "/**\n" + " * @describe \n" + " * @author ${USER}\n" +
2626
" * @date ${DATE} ${TIME}\n" + " * \t\t\t\t\t\t\t\t - generate by MvpAutoCodePlus plugin.\n" + " */\n" + "\n" + "interface ${NAME} {\n" +
2727
" interface View : IView${VG}{}\n" + " interface Presenter : IPresenter${PG}{}\n" + "}\n";
2828

2929
String COMMON_IMPL_TP_CONTENT_JAVA =
3030
"#if (${PACKAGE_NAME} != \"\")package ${PACKAGE_NAME};#end\n" + "\n" + "import ${CONTRACT};\n" + "#if (${IMPL} != \"\")import ${IMPL};#end\n" + "\n" + "\n" + "/**\n" +
31-
" * Description : \n" + " * @author ${USER}\n" + " * @date ${DATE} ${TIME}\n" + " * \t\t\t\t\t\t\t\t - generate by MvpAutoCodePlus plugin.\n" + " */\n" + "\n" +
31+
" * @describe \n" + " * @author ${USER}\n" + " * @date ${DATE} ${TIME}\n" + " * \t\t\t\t\t\t\t\t - generate by MvpAutoCodePlus plugin.\n" + " */\n" + "\n" +
3232
"public class ${NAME}${IMPL_TYPE} #if(${IMPL}!=\"\") extends ${IMPL}${VG}#end implements I${NAME}Contract.${TYPE} {\n" + "\n" + "}\n" + "\n";
3333

3434
String COMMON_IMPL_TP_CONTENT_KOTLIN =
3535
"#if (${PACKAGE_NAME} != \"\")package ${PACKAGE_NAME}#end\n" + "\n" + "import ${CONTRACT}\n" + "#if (${IMPL} != \"\")import ${IMPL}#end\n" + "\n" + "/**\n" +
36-
" * Description : \n" + " * @author ${USER}\n" + " * @date ${DATE} ${TIME}\n" + " * \t\t\t\t\t\t\t\t - generate by MvpAutoCodePlus plugin.\n" + " */\n" + "\n" +
36+
" * @describe \n" + " * @author ${USER}\n" + " * @date ${DATE} ${TIME}\n" + " * \t\t\t\t\t\t\t\t - generate by MvpAutoCodePlus plugin.\n" + " */\n" + "\n" +
3737
"class ${NAME}${IMPL_TYPE} :#if (${IMPL_NP} != \"\") ${IMPL_NP}${VG}(),#end ${CONTRACT_NP}.${TYPE} {\n" + "\n" + "}\n" + "\n";
3838
}

src/main/resources/META-INF/plugin.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@
3131
]]></description>
3232

3333

34-
<change-notes><![CDATA[
35-
<h3>Add IModel interface and implementation class optional generation</h3>
36-
<br/>
37-
<a href="https://github.com/longforus/MvpAutoCodePlus/blob/master/CHANGELOG.md"><b>Full Changelog History</b></a>
38-
]]></change-notes>
34+
<!--<change-notes><![CDATA[-->
35+
<!--<h3>Add IModel interface and implementation class optional generation</h3>-->
36+
<!--<br/>-->
37+
<!--<a href="https://github.com/longforus/MvpAutoCodePlus/blob/master/CHANGELOG.md"><b>Full Changelog History</b></a>-->
38+
<!--]]></change-notes>-->
3939

4040
<!-- please see http://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/build_number_ranges.html for description -->
4141
<idea-version since-build="171"/>

0 commit comments

Comments
 (0)