You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- generate the MVP Contract interface class based on the specified parent interface.
13
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.
Based on [` this a set of Java interfaces `][my_interface_java] example configuration:
46
+
47
+
Based on [`this a set of Java interfaces`][my_interface_java] example configuration:
48
+
47
49

50
+
48
51
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>**
52
+
49
53

54
+
50
55
Manually add the following generic qualifier <V,M>:
56
+
51
57

58
+
52
59
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.
60
+
53
61
2. Generate:
54
62
55
63

64
+
56
65
- 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.
66
+
57
67
- enter the code generated by the name, such as do the Login function, enter the Login and generate results is ILoginContract, LoginActivity, LoginPresenter, LoginModel
68
+
58
69
- choose the code implementation, Java or Kotlin
70
+
59
71
- 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.
72
+
60
73
- click Ok, wait a moment, and the code is generated. The generated package structure is as follows:
74
+
61
75

62
76
63
-
##About the parent interface
77
+
##About the parent interface
64
78
65
79
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.
66
80
67
-
##Problem
81
+
##Problem
68
82
69
83
- 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.
70
84
-we haven't studied the layout file corresponding to the View, and it would be more convenient if we could also generate the default.
0 commit comments