Skip to content

Commit 744f714

Browse files
committed
add english document
1 parent 22172f9 commit 744f714

File tree

2 files changed

+83
-1
lines changed

2 files changed

+83
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ MvpAutoCodePlus
55

66
[![Downloads][downloads-img]][plugin]
77

8+
[Machine translation of English documents](./README_EN.md)
9+
810
### JetBrains IDEA/Android Studio MVP模版代码生成插件
911

1012
![screenshots](./images/mvp.gif)
@@ -96,4 +98,4 @@ MvpAutoCodePlus
9698
[plugin]: https://plugins.jetbrains.com/plugin/10907-mvpautocodeplus
9799
[my_interface]:https://github.com/longforus/MVPExample
98100
[my_interface_java]:https://github.com/longforus/MVPExample/tree/master/app/src/main/java/com/longforus/base/java
99-
[ad_link]:https://mp.weixin.qq.com/s?__biz=MzAxMTI4MTkwNQ==&mid=2650825783&idx=1&sn=0b0c2c58a729e1d9122ce9c09e31637f&chksm=80b7b0a9b7c039bfa92deb5c8fe51f5347ebdccf0be70078ffa047e7316baf5679a89fc788ac&mpshare=1&scene=23&srcid=0711IpaZwE1iGToWw6e7fix8#rd
101+
[ad_link]:https://mp.weixin.qq.com/s?__biz=MzAxMTI4MTkwNQ==&mid=2650825783&idx=1&sn=0b0c2c58a729e1d9122ce9c09e31637f&chksm=80b7b0a9b7c039bfa92deb5c8fe51f5347ebdccf0be70078ffa047e7316baf5679a89fc788ac&mpshare=1&scene=23&srcid=0711IpaZwE1iGToWw6e7fix8#rd

README_EN.md

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
MvpAutoCodePlus
2+
========================
3+
4+
[![Downloads][downloads-img]][plugin]
5+
6+
JetBrains IDEA/Android Studio MVP template code generation plug-in
7+
8+
![screenshots](./images/MVP.GIF)
9+
10+
##Character
11+
12+
- generate the MVP Contract interface class based on the specified parent interface.
13+
- optionally generate an MVP implementation class based on the generated MVP Contract and the specified parent class, and add an abstract method default implementation.
14+
- support Activity
15+
- support fragments
16+
- support the Presenter
17+
- support the Model
18+
- support Java and Kotlin languages
19+
##IDE support:
20+
21+
- Android Studio(supported from 3.1(173.3727-173.*))
22+
- IntelliJ IDEA
23+
- IntelliJ IDEA Community Edition
24+
25+
##The installation
26+
27+
--
28+
- **install using the IDE built-in plug-in system :**
29+
30+
- <kbd>File</kbd> > <kbd>Preferences(Settings)</kbd> > <kbd>Plugins</kbd> > <kbd>Browse repositories...</kbd> > <kbd>search and find "MvpAutoCodePlus"</kbd> > <kbd>Install Plugin</kbd>
31+
32+
![install](./images/install1.PNG)
33+
34+
- ** manual installation :**
35+
[`download the latest release of plug-in package `][latest release] - > <kbd>File</kbd> ><kbd>Preferences(Settings)</kbd> > <kbd>Plugins</kbd> > <kbd>Install plugin from disk...</kbd>
36+
37+
**Restart the IDE**.
38+
##Usage
39+
40+
1. Configure the parent interface:
41+
42+
- <kbd>File</kbd> > <kbd>Preferences(Settings)</kbd> > <kbd>Other Settings</kbd> > <kbd>MvpAutoCodePlus</kbd> >
43+
44+
![Settings](./images/Settings.PNG)
45+
Based on [` this a set of Java interfaces `] [my_interface_java] example configuration:
46+
![settings1](./images/settings1.PNG)
47+
Project in the Class has been V1.0beta2 support to choose, but if there are generic limit, generic or need to manually add, such as the choice of Class signature is: **. com.longforus.Base.Java.BasePresenterJv<V extends IView, M extends IModel>**
48+
![use3](./images/use3.PNG)
49+
Manually add the following generic qualifier <V,M>:
50+
![use4](./images/use4.PNG)
51+
Global and current project modes are also supported, and the interfaces configured in global mode can be used in all projects. The interfaces configured in the current project only work in the current project, facilitating seamless switching between multiple different projects.
52+
2. Generate:
53+
54+
![use1](./images/use1.png)
55+
- right click the target package to be generated,< KBD >New</ KBD > > < KBD >Generate Mvp Code</ KBD > (or select the package, press Alt+Insert). After generating the contract package, you can select the parent package of the contract package or contract.
56+
- enter the code generated by the name, such as do the Login function, enter the Login and generate results is ILoginContract, LoginActivity, LoginPresenter, LoginModel
57+
- choose the code implementation, Java or Kotlin
58+
- select the implementation method of View,Activity or Fragment. If there are multiple configurations, select one of them, and remove the previous check box for the items you don't want to generate. If there are no superclasses of P and M implementation classes, the generated implementation classes of P and M will only implement the corresponding interface.
59+
- click Ok, wait a moment, and the code is generated. The generated package structure is as follows:
60+
![use2](./images/use2.PNG)
61+
##About the parent interface
62+
63+
Only use my own currently use interface to development and testing, welcome to use their own interface for testing. If need [` I use interface `][my_interface], please download it in your own project.
64+
65+
##Problem
66+
67+
- if the parent interface and the parent class have a generic qualifier, you will need to manually enter the generic after selecting it, but it will be saved only once set and will not change frequently in the project.
68+
-we haven't studied the layout file corresponding to the View, and it would be more convenient if we could also generate the default.
69+
70+
- other unknown problems, this plug-in is the first time for the author to develop the plug-in, which is completely from 0. The official documents are not very detailed, and the English level is even worse.
71+
72+
[complete update history](./changelog.md)
73+
74+
if do not meet the requirements of your plugin. Can issue, also can fork to modify. Thank you for your attention.
75+
76+
[latest-release]: https://plugins.jetbrains.com/plugin/10907-mvpautocodeplus
77+
[downloads-img]: https://img.shields.io/jetbrains/plugin/d/8579.svg?style=flat-square
78+
[plugin]: https://plugins.jetbrains.com/plugin/10907-mvpautocodeplus
79+
[my_interface]:https://github.com/longforus/MVPExample
80+
[my_interface_java]:https://github.com/longforus/MVPExample/tree/master/app/src/main/java/com/longforus/base/java

0 commit comments

Comments
 (0)