All Projects → longforus → Mvpautocodeplus

longforus / Mvpautocodeplus

Licence: apache-2.0
🔌An IDEA/Android Studio plug-in that automatically generates an MVP template code

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to Mvpautocodeplus

RedsoftYapiUpload
一个快速生成接口文档的IntelliJ IDEA的Yapi上传小插件,如果给你带来了方便,请给个Star 谢谢
Stars: ✭ 51 (-71.02%)
Mutual labels:  idea, idea-plugin
GradleDependencyHelper
An Android Studio Plugin for searching maven dependencies faster.
Stars: ✭ 13 (-92.61%)
Mutual labels:  idea, androidstudio
uuid-generator-plugin
An IntelliJ Idea plugin to generate UUID (Universally Unique Identifier), ULID (Universally Unique Lexicographically Sortable Identifier) and CUID (Collision Resistant Unique Identifier)
Stars: ✭ 30 (-82.95%)
Mutual labels:  idea, idea-plugin
Arthas Idea Plugin
arthas idea plugin 更简单的使用arthas的IDEA 插件
Stars: ✭ 211 (+19.89%)
Mutual labels:  idea, idea-plugin
Deep Clean
When Gradle or the IDE let you down, just --nuke all them caches
Stars: ✭ 689 (+291.48%)
Mutual labels:  idea, androidstudio
intelliroutes
Support for Play Routes in IntelliJ IDEA
Stars: ✭ 21 (-88.07%)
Mutual labels:  idea, idea-plugin
intellij-treeInfotip
IDEA项目结构树中的节点添加显示自定义备注文本IDEA DirectoryNode adds custom text for display
Stars: ✭ 48 (-72.73%)
Mutual labels:  idea, idea-plugin
Toolsetideaplugin
程序员常用的工具集Idea插件,帮助开发人员提升效率
Stars: ✭ 248 (+40.91%)
Mutual labels:  idea, idea-plugin
Intellij Mybaitslog
用于在IDEA将Mybatis的SQL日志还原为可执行的SQL,Used to restore Mybatis SQL logs to executable SQL in IDEA,
Stars: ✭ 501 (+184.66%)
Mutual labels:  idea, idea-plugin
Yapiideauploadplugin
yapi idea 上传插件,快速生成文档
Stars: ✭ 288 (+63.64%)
Mutual labels:  idea, idea-plugin
Intellij Haxe
Haxe plugin for IntelliJ Platform based IDEs (IDEA, Android-Studio)
Stars: ✭ 188 (+6.82%)
Mutual labels:  idea, idea-plugin
Idea Conventional Commit
Context and template-based completion for conventional/semantic commits.
Stars: ✭ 115 (-34.66%)
Mutual labels:  idea, idea-plugin
NutzCodeInsight
Intellij idea plugin for Nutz Web Framwork
Stars: ✭ 35 (-80.11%)
Mutual labels:  idea, idea-plugin
aw-watcher-jetbrains
This extension allows the open source tracking tool ActivityWatch to keep track of the projects and coding languages you use in jetbrains IDEs.
Stars: ✭ 36 (-79.55%)
Mutual labels:  idea, idea-plugin
Fastdex
🚀 加快 apk 的编译速度 🚀
Stars: ✭ 1,457 (+727.84%)
Mutual labels:  androidstudio, idea-plugin
Awesome Idea
IntelliJ IDEA资源一网打尽
Stars: ✭ 124 (-29.55%)
Mutual labels:  idea, idea-plugin
Arduino Bluetooth Basic
Control a LED using your smartphone via Bluetooth (Does not support BLE)
Stars: ✭ 146 (-17.05%)
Mutual labels:  androidstudio
Sunmaobin.github.io
blog
Stars: ✭ 159 (-9.66%)
Mutual labels:  idea
Notelin
Note-taking app for Android written in Kotlin
Stars: ✭ 146 (-17.05%)
Mutual labels:  mvp
Devmvp
一键生成MVP架构基础代码-Android Studio模板
Stars: ✭ 145 (-17.61%)
Mutual labels:  mvp

MvpAutoCodePlus

Downloads

Machine translation of English documents

JetBrains IDEA/Android Studio MVP模版代码生成插件

screenshots

特征

  • 根据指定的父接口生成MVP Contract接口类.
  • 可选的根据生成的MVP Contract和指定的父类生成MVP实现类,并添加抽象方法默认实现.
    • 支持Activity
    • 支持Fragment
    • 支持Presenter
    • 支持Model
  • 支持Java和Kotlin语言

支持的 IDE:

  • Android Studio(从3.1(173.3727—173.* )开始支持)
  • IntelliJ IDEA
  • IntelliJ IDEA Community Edition

安装

  • 使用 IDE 内置插件系统安装:

    • File > Preferences(Settings) > Plugins > Browse repositories... > 搜索并找到"MvpAutoCodePlus" > Install Plugin

    install

  • 手动安装:

重启IDE.

使用

  1. 配置父接口:

    • File > Preferences(Settings) > Other Settings > MvpAutoCodePlus >

    settings

    基于这一套Java接口的配置示例:

    settings1

    项目内的Class已经在V1.0beta2支持选择,但是如果有泛型限定的话,泛型还是需要手动添加,比如选择的类签名为:com.longforus.base.java.BasePresenterJv<V extends IView,M extends IModel>

    use3

    需要手动添加后面的泛型限定<V,M>:

    use4

    现在还支持全局和当前项目模式,全局模式中配置的接口可在所有项目中使用,当前项目中配置的接口只在当前项目中起效,方便有多个不相同工程时的无缝切换.

  2. 生成:

    use1

    • 右击要生成的目标包,New > Generate Mvp Code (或选中包,按Alt+Insert),生成contract包后可以选中contract包或contract的父包.

    • 输入生成的代码主名,比如要做Login功能,就输入Login,生成结果是ILoginContract,LoginActivity,LoginPresenter,LoginModel

    • 从1.4开始如果P的超接口以ViewModel结尾,那么生成的结果是ILoginContract,LoginActivity,LoginViewModel,LoginModel

    • 选择代码实现方式,可选Java或Kotlin

    • 选择View的实现方式,Activity或Fragment,如果配置了多个的话,可选择其中之一,不想生成的项去掉前面的复选框.如果没有输入P和M实现类的超类,那么生成的P和M的实现类只会实现对应的接口.

    • 从1.1开始支持不生成Model接口和对应的实现类,更加灵活.

    • 点击Ok,稍等一会儿,代码就生成了,生成的包结构如下:

      use2

关于父接口

只使用了我自己目前使用的接口来开发测试,欢迎各位使用自己的接口进行测试.如需要我使用的接口 ,请下载后放入自己的项目中.

存在问题

  • 父接口和父类如果有泛型限定在选择后还需要手动输入泛型,好在只用设置一次就可保存了,项目中也不会经常变动.
  • 还没有研究生成View对应的布局文件,要是也能生成默认的,会更方便一些.
  • 其他未知问题,此插件是作者首次开发插件,完全从0开始,官方的文档不是很详细,英语水平更是不堪,国内的参考资料也不多,做这个纯粹是忽然想到了,就开始做了.难免有未尽之处,欢迎各位star,issue.

完整的更新历史记录

鸿洋公众号插件广告文 ,感谢大神给予机会.插件的开发,推荐大家查看鸿洋的开发教程,要是插件不符合你的要求.可以issue,也可以fork自行修改.感谢你的关注.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].