{"id":298097,"date":"2020-02-02T21:00:20","date_gmt":"2020-02-02T21:00:20","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=298097"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=298097","title":{"rendered":"Moxy Strategy plugin"},"content":{"rendered":"\n<div class=\"post__text post__text-html\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/486658\/\">\n<p>\u0418\u043d\u043e\u0433\u0434\u0430 \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u0432\u0435\u0449\u0438 \u043e\u0447\u0435\u043d\u044c \u0443\u0442\u043e\u043c\u043b\u044f\u044e\u0442, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043a\u043e\u0433\u0434\u0430 \u0438\u0445 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e. \u041e\u0434\u043d\u0430 \u0438\u0437 \u0442\u0430\u043a\u0438\u0445 \u0432\u0435\u0449\u0435\u0439 \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u043c <a href=\"https:\/\/github.com\/moxy-community\/Moxy\">Moxy <\/a> \u2014 \u044d\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0439 \u043a \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c. \u0414\u043b\u044f \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0431\u044b\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u043d <a href=\"https:\/\/plugins.jetbrains.com\/plugin\/13679-moxy-strategy\">\u043f\u043b\u0430\u0433\u0438\u043d<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e &quot;alt+enter&quot; \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u044b\u0431\u043e\u0440 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 \u0435\u0441\u043b\u0438 \u0435\u0435 \u043d\u0435\u0442 \u0438\u043b\u0438 \u0434\u0438\u0430\u043b\u043e\u0433 \u0441 \u0437\u0430\u043c\u0435\u043d\u043e\u0439 \u043d\u0430 \u0434\u0440\u0443\u0433\u0443\u044e \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044e. \u0422\u0435, \u043a\u0442\u043e \u0445\u043e\u0447\u0435\u0442 \u0443\u0437\u043d\u0430\u0442\u044c \u043a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0434\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434 \u043a\u0430\u0442.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/7v\/4g\/6s\/7v4g6s91cknp5xovm9ubgjzfope.jpeg\"><\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<p>\u041a\u043e\u0433\u0434\u0430 \u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u043b \u0438\u0437\u0443\u0447\u0430\u0442\u044c Moxy, \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0431\u044b\u043b\u043e \u0437\u0430\u043f\u043e\u043c\u043d\u0438\u0442\u044c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0439 \u0438 \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0442\u044c \u043e\u0431 \u0438\u0445 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u0438. \u041f\u043e\u0441\u043b\u0435 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0438 \u0441 \u043d\u0438\u043c\u0438 \u044d\u0442\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0443\u0448\u043b\u0430, \u043d\u043e \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u0431\u044b\u043b\u043e \u0436\u0435\u043b\u0430\u043d\u0438\u0435 \u043a\u0430\u043a\u0438\u043c \u0442\u043e \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u044d\u0442\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c.<\/p>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u044f \u0437\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043b\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435\u043c \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432, \u0438 <a href=\"https:\/\/habr.com\/ru\/users\/adev_one\/\" class=\"user_link\">adev_one<\/a> \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u0430\u043b \u043c\u043d\u0435, \u0447\u0442\u043e \u043f\u043b\u0430\u0433\u0438\u043d \u043a\u0430\u043a \u0440\u0430\u0437 \u0438 \u043c\u043e\u0436\u0435\u0442 \u0440\u0435\u0448\u0438\u0442\u044c \u0442\u0430\u043a\u0443\u044e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443. <\/p>\n<p>  <\/p>\n<h2 id=\"inspection\">Inspection<\/h2>\n<p>  <\/p>\n<p>\u0418\u0442\u0430\u043a, \u043c\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0438 \u0445\u043e\u0442\u0438\u043c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044e. \u0412 \u044d\u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u043c \u043d\u0430 \u043f\u043e\u043c\u043e\u0449\u044c \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 <a href=\"https:\/\/www.jetbrains.com\/help\/idea\/resolving-problems.html\">code inspections<\/a>. \u041e\u043d\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u044e\u0442 \u043a\u043e\u0434 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 <a href=\"https:\/\/www.jetbrains.org\/intellij\/sdk\/docs\/basics\/architectural_overview\/psi.html\">PSI (Program Structure Interface)<\/a>, \u0438 \u0435\u0441\u043b\u0438 \u0447\u0442\u043e \u0442\u043e \u043d\u0435 \u0442\u0430\u043a, \u043f\u043e\u0434\u0441\u0432\u0435\u0447\u0438\u0432\u0430\u044e\u0442 \u043a\u043e\u0434 \u043a\u0440\u0430\u0441\u043d\u044b\u043c \u0438\u043b\u0438 \u0441\u0435\u0440\u044b\u043c, \u0438 \u043f\u043e alt+enter \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f.<br \/>  \u041e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043f\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 <a href=\"https:\/\/www.jetbrains.org\/intellij\/sdk\/docs\/tutorials\/code_inspections.html\">code inspections<\/a>.<br \/>  PSI \u2014 \u044d\u0442\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0443 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430 \u0438 \u0442.\u0434. \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u0439 \u0430\u043d\u0430\u043b\u043e\u0433, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043d\u0435\u043c, \u0435\u0433\u043e parent \u0438 child. \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c \u043a\u0430\u043a\u043e\u0439 \u043a\u043b\u0430\u0441\u0441 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0439 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u044f\u0437\u044b\u043a\u0430, \u0435\u0441\u0442\u044c \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u043f\u043b\u0430\u0433\u0438\u043d <a href=\"https:\/\/plugins.jetbrains.com\/plugin\/227-psiviewer\">Psi viewer plugin<\/a>.<\/p>\n<p>  <\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043d\u0435\u0433\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439.<\/p>\n<p>  <\/p>\n<div class=\"oembed\">\n<div>\n<div style=\"left: 0; width: 100%; height: 0; position: relative; padding-bottom: 56.2493%;\"><iframe src=\"https:\/\/www.youtube.com\/embed\/36fK0gMvCls?rel=0&amp;showinfo=1&amp;hl=en-US\" style=\"border: 0; top: 0; left: 0; width: 100%; height: 100%; position: absolute;\" allowfullscreen scrolling=\"no\"><\/iframe><\/div>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>\u0412\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0449\u0438\u0439 \u043d\u0430\u0441 \u043a\u043b\u0430\u0441\u0441 \u044d\u0442\u043e KtNamedFunction.<\/p>\n<p>  <\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 Inpection.<\/p>\n<p>  <\/p>\n<p>\u041a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u0438 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0445\u043e\u0440\u043e\u0448\u043e \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u043e <a href=\"https:\/\/proandroiddev.com\/write-an-android-studio-plugin-part-1-creating-a-basic-plugin-af956c4f8b50\">\u0432 \u0446\u0438\u043a\u043b\u0435 \u0441\u0442\u0430\u0442\u0435\u0439<\/a>. \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0432 \u0444\u0430\u0439\u043b\u0435 plugins.xml<\/p>\n<p>  <\/p>\n<pre><code class=\"xml\">    &lt;depends&gt;org.jetbrains.kotlin&lt;\/depends&gt;     &lt;depends&gt;com.intellij.modules.lang&lt;\/depends&gt;<\/code><\/pre>\n<p>  <\/p>\n<p>\u0438 \u0432 \u0444\u0430\u0439\u043b\u0435 build.gradle<\/p>\n<p>  <\/p>\n<pre><code class=\"xml\">dependencies {     implementation &quot;org.jetbrains.kotlin:kotlin-stdlib-jdk8&quot;     implementation &quot;org.jetbrains.kotlin:kotlin-reflect&quot;     implementation &quot;com.github.moxy-community:moxy:1.0.13&quot; }  intellij {  ...     plugins = [&quot;Kotlin&quot;]  ... }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e inpection.<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c <code>AbstractKotlinInspection<\/code><\/p>\n<p>  <\/p>\n<pre><code class=\"kotlin\">class MvpViewStrategyInspection : AbstractKotlinInspection() {}<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u043d\u0435\u043c \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e:<\/p>\n<p>  <\/p>\n<pre><code class=\"kotlin\">override fun buildVisitor(holder: ProblemsHolder, isOnTheFly: Boolean): PsiElementVisitor <\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u043d\u0435\u0439 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c Visitor, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043a\u043e\u0434 \u0444\u0430\u0439\u043b\u0430 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438 \u0438 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f.<\/p>\n<p>  <\/p>\n<p>\u0425\u043e\u0440\u043e\u0448\u0435\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043f\u043e Visitor \u044f \u043d\u0435 \u043d\u0430\u0448\u0435\u043b, \u043d\u043e \u043a\u043e\u0433\u0434\u0430 \u0441\u043c\u043e\u0442\u0440\u0435\u043b \u043f\u043b\u0430\u0433\u0438\u043d\u044b kotlin \u043d\u0430\u0442\u043a\u043d\u0443\u043b\u0441\u044f \u043d\u0430 \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438-\u0444\u0430\u0431\u0440\u0438\u043a\u0438 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f Visitor. \u0414\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 KtNamedFunction \u0435\u0441\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0444\u0430\u0431\u0440\u0438\u043a\u0430:<\/p>\n<p>  <\/p>\n<pre><code class=\"kotlin\">org.jetbrains.kotlin.psi VisitorWrappersKt.class  public fun namedFunctionVisitor(block: (KtNamedFunction) \u2192 Unit): KtVisitorVoid<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u043b\u044f\u043c\u0431\u0434\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c PSI: \u0432\u044b\u0431\u0440\u0430\u043d\u0430 \u043b\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0431\u0435\u0437 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 \u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0438 \u043e\u043d\u0430 \u0447\u0430\u0441\u0442\u044c\u044e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 MvpView. \u041a\u043e\u0433\u0434\u0430 \u0432\u0441\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u044b, \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c \u043e\u0448\u0438\u0431\u043a\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e ProblemsHolder.<br \/>  \u0412 \u0438\u0442\u043e\u0433\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u044d\u0442\u043e \u0432\u043e\u0442 \u0442\u0430\u043a:<\/p>\n<p>  <\/p>\n<pre><code class=\"kotlin\">private val fixes = MoxyStrategy.values().map { AddStrategyFix(it) }.toTypedArray()  override fun buildVisitor(holder: ProblemsHolder, isOnTheFly: Boolean): PsiElementVisitor {         return namedFunctionVisitor { ktNamedFunction -&gt;             if (!ktNamedFunction.isClassInheritMvpView() ||                 ktNamedFunction.isHasMoxyAnnotation()             ) return@namedFunctionVisitor             holder.registerProblem(                 ktNamedFunction, \/\/ psiElement                 StrategyIntentionType.MissingStrategy.title,  \/\/ description                 *fixes \/\/ LocalQuickFix             )         }     }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 AddStrategyFix? \u042d\u0442\u043e \u043e\u0431\u044a\u0435\u043a\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u0442 LocalQuickFix. \u041e\u043d \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0441\u044f, \u043a\u043e\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0431\u0440\u0430\u043d \u0438\u0437 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0445 \u043f\u0443\u043d\u043a\u0442\u043e\u0432:<\/p>\n<p>  <\/p>\n<pre><code class=\"kotlin\">class AddStrategyFix(         private val strategy: MoxyStrategy     ) : LocalQuickFix {         override fun getFamilyName(): String = &quot;add ${strategy.className}&quot;          override fun applyFix(project: Project, descriptor: ProblemDescriptor) {             val ktFunction = (descriptor.psiElement as KtNamedFunction)             val editor = ktFunction.getProjectEditor()             ktFunction.addStrategyAnnotation(strategy, project, editor)         }     }<\/code><\/pre>\n<p>  <\/p>\n<p><code>getFamilyName<\/code> \u2014 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u0443\u043d\u043a\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0432 \u0434\u0438\u0430\u043b\u043e\u0433\u0435.<br \/>  \u0412 <code>applyFix<\/code> \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044e.<\/p>\n<p>  <\/p>\n<p>\u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c Inspection \u0432 plguin.xml, (\u043f\u043e\u0445\u043e\u0436\u0435 Activity \u0432 Manifest)<\/p>\n<p>  <\/p>\n<pre><code class=\"xml\"> &lt;extensions defaultExtensionNs=&quot;com.intellij&quot;&gt;         &lt;localInspection language=&quot;kotlin&quot;                          displayName=&quot;missing strategy for function&quot;                          groupPath=&quot;Moxy&quot;                          groupBundle=&quot;messages.InspectionsBundle&quot;                          groupKey=&quot;group.names.probable.bugs&quot;                          enabledByDefault=&quot;true&quot;                          level=&quot;ERROR&quot;                          implementationClass=&quot;com.maksimnovikov.inspection.MvpViewStrategyInspection&quot;\/&gt;     &lt;\/extensions&gt;<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u0438\u0442\u043e\u0433\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c:<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/2j\/dk\/2u\/2jdk2uj8gvzuenhrw1xqslzwt18.gif\"><\/p>\n<p>  <\/p>\n<p>\u0422\u0430\u043a \u0436\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0438\u043c\u043f\u043e\u0440\u0442\u044b \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 <code>StateStrategyType<\/code> \u0438 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438.<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 <code>AddToEndSingleTagStrategy<\/code> \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u043b \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430<br \/>  <code>tag<\/code> \u0438 \u043f\u0435\u0440\u0435\u043d\u043e\u0441 \u043a\u0443\u0440\u0441\u043e\u0440\u0430 \u043d\u0430 \u043d\u0435\u0433\u043e.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/jb\/gz\/16\/jbgz16qjiwukcb1axvwzp7xd_si.gif\"><\/p>\n<p>  <\/p>\n<h2 id=\"intention\">Intention<\/h2>\n<p>  <\/p>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044e \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438, \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044e \u0431\u044b\u0441\u0442\u0440\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438. \u041f\u0435\u0440\u0435\u0434\u0443\u043c\u0430\u043b\u0438 \u0438 \u0440\u0435\u0448\u0438\u043b\u0438 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0435\u0435 \u043d\u0430 \u0434\u0440\u0443\u0433\u0443\u044e.<br \/>  \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0448 \u043f\u043e\u043c\u043e\u0449\u043d\u0438\u043a \u044d\u0442\u043e Intention.<br \/>  \u041f\u0440\u0438\u043d\u0446\u0438\u043f \u0440\u0430\u0431\u043e\u0442\u044b \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u0435\u043d \u0441 Inspection, \u043d\u043e \u0431\u0435\u0437 \u043a\u0430\u043a\u043e\u0433\u043e \u043b\u0438\u0431\u043e \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430 \u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043f\u043e\u0434 \u043a\u0430\u0440\u0435\u0442\u043a\u043e\u0439. <a href=\"https:\/\/www.jetbrains.com\/help\/idea\/intention-actions.html\">\u041a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0443\u0436\u0435 \u0438\u043c\u0435\u044e\u0449\u0438\u0435\u0441\u044f intention<\/a>. <a href=\"https:\/\/www.jetbrains.org\/intellij\/sdk\/docs\/tutorials\/code_intentions.html\">\u041e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043f\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435<\/a>.<\/p>\n<p>  <\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 Intention.<\/p>\n<p>  <\/p>\n<p>\u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c <code>PsiElementBaseIntentionAction<\/code> :<\/p>\n<p>  <\/p>\n<pre><code class=\"kotlin\">class MvpViewStrategyIntention : PsiElementBaseIntentionAction(){     override fun getText(): String      override fun getFamilyName(): String     override fun isAvailable(project: Project, editor: Editor?, element: PsiElement): Boolean     override fun invoke(project: Project, editor: Editor?, element: PsiElement) }<\/code><\/pre>\n<p>  <\/p>\n<p>getText \u2014 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u043e\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435<br \/>  getFamilyName \u2014 \u043d\u0443\u0436\u0435\u043d \u0434\u043b\u044f \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438 intention \u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445<br \/>  isAvailable \u2014 \u0432 \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u043f\u043e\u0434 \u043a\u0443\u0440\u0441\u043e\u0440\u043e\u043c, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0431\u0443\u0434\u0435\u0442 \u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d intention \u0432 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0438\u043b\u0438 \u043d\u0435\u0442.<br \/>  invoke \u2014 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u0432\u044b\u0431\u0440\u0430\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0439 intention \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430<\/p>\n<p>  <\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 isAvailable \u0438 invoke:<\/p>\n<p>  <\/p>\n<h4 id=\"isavailable\">isAvailable<\/h4>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0443\u0436\u043d\u043e \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u043d\u044c\u0448\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c, \u0447\u0442\u043e intention \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0438 \u043d\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043b\u044c\u0448\u0435. \u042d\u0442\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c.<br \/>  \u0422\u0430\u043a \u0436\u0435 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c child \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043f\u043e\u0442\u043e\u043c\u0443 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u0430\u043c\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e. \u041e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b.<\/p>\n<p>  <\/p>\n<pre><code class=\"kotlin\">override fun isAvailable(project: Project, editor: Editor?, element: PsiElement): Boolean {         if ((element.containingFile ?: return false) !is KtFile) return false         if (!element.isClassInheritMvpView()) return false         val ktFunction = element.getParentOfType&lt;KtNamedFunction&gt;() ?: return false         return ktFunction.isHasMoxyAnnotation()     }<\/code><\/pre>\n<p>  <\/p>\n<h4 id=\"invoke\">invoke<\/h4>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e Intention \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 \u043d\u0435 \u0432\u044b\u0433\u043e\u0434\u043d\u043e \u043f\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u0434\u0438\u0430\u043b\u043e\u0433 \u043f\u043e \u043d\u0430\u0436\u0430\u0442\u0438\u044e \u043d\u0430 \u043e\u0434\u0438\u043d \u043f\u0443\u043d\u043a\u0442.<br \/>  \u041f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c \u043d\u0430\u0448\u0430 \u043b\u044e\u0431\u0438\u043c\u0430\u044f IDE \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 swing. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043a\u0442\u043e \u0445\u043e\u0440\u043e\u0448\u043e \u0441 \u043d\u0438\u043c \u0437\u043d\u0430\u043a\u043e\u043c, \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441. \u042f \u043f\u043e\u0448\u0435\u043b \u0434\u0440\u0443\u0433\u0438\u043c \u043f\u0443\u0442\u0435\u043c \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0431\u0438\u043b\u0434\u0435\u0440 \u0434\u043b\u044f \u0434\u0438\u0430\u043b\u043e\u0433\u0430 \u0432\u044b\u0431\u043e\u0440\u0430 \u2014 <code>JBPopupFactory<\/code><\/p>\n<p>  <\/p>\n<pre><code class=\"kotlin\">fun &lt;T&gt; Editor.showSelectPopup(     items: List&lt;T&gt;,     onSelected: (T) -&gt; Unit ) {     JBPopupFactory.getInstance()         .createPopupChooserBuilder(items)         .setRequestFocus(true)         .setCancelOnClickOutside(true)         .setItemChosenCallback { onSelected(it) }         .createPopup()         .showInBestPositionFor(this) }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e, \u043f\u043e\u0441\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0434\u0438\u0430\u043b\u043e\u0433\u0430 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0441\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0436\u0435 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u043a\u043e\u0434 \u0438 \u043f\u0440\u0438 \u043f\u043e\u043f\u044b\u0442\u043a\u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u0432\u044b\u0434\u0430\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0443. \u0427\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0431\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043f\u043e \u0437\u0430\u043c\u0435\u043d\u0435 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>WriteCommandAction.runWriteCommandAction(project) {}<\/code><\/p>\n<p>  <\/p>\n<pre><code class=\"kotlin\">  override fun invoke(project: Project, editor: Editor, element: PsiElement) {         editor.showSelectPopup(MoxyStrategy.values().toList()) { selectedStrategy -&gt;             WriteCommandAction.runWriteCommandAction(project) {                 val ktFunction = element.getParentOfType&lt;KtNamedFunction&gt;() ?: return@runWriteCommandAction                 ktFunction.replaceAnnotation(selectedStrategy, project, editor)             }         }     }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0430\u043a \u0436\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c intention \u0432 plugin.xml<\/p>\n<p>  <\/p>\n<pre><code class=\"xml\">&lt;extensions defaultExtensionNs=&quot;com.intellij&quot;&gt;         &lt;intentionAction&gt;             &lt;className&gt;com.maksimnovikov.intention.MvpViewStrategyIntention&lt;\/className&gt;             &lt;category&gt;Moxy intentions&lt;\/category&gt;         &lt;\/intentionAction&gt; &lt;\/extensions&gt;<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u0438\u0442\u043e\u0433\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b:<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/za\/do\/ti\/zadotisje-2vllqaaj2onbbh9ue.gif\"><\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/xn\/qf\/w-\/xnqfw-wipdfbb0b2hqhmanx2nvi.gif\"><\/p>\n<p>  <\/p>\n<h2 id=\"itogo\">\u0418\u0442\u043e\u0433\u043e<\/h2>\n<p>  <\/p>\n<p>\u0421 \u044d\u0442\u0438\u043c \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u043c \u0440\u0435\u0448\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0437\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u044f \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0439 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0439. \u0418\u0445 \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u0438\u0434\u0435\u043d. \u0415\u0441\u043b\u0438 \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 \u043f\u043e\u043d\u0430\u0447\u0430\u043b\u0443 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435 \u043f\u043e\u043d\u044f\u0442\u0435\u043d, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0435\u0451 \u0438 \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c\u0443 \u043a\u043e\u0434\u0443, \u0433\u0434\u0435 \u0435\u0441\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f. \u0422\u0430\u043a\u0436\u0435 \u0432 \u043e\u0431\u0449\u0435\u043c \u0443\u043b\u0443\u0447\u0448\u0430\u0435\u0442\u0441\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u043e \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u043e \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f\u043c\u0438 Moxy.<\/p>\n<p>  <\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432 \u0440\u0430\u043d\u044c\u0448\u0435 \u0434\u043b\u044f \u043c\u0435\u043d\u044f \u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u043e\u0447\u0435\u043d\u044c \u0441\u043b\u043e\u0436\u043d\u044b\u043c \u0438 \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u044b\u043c. \u0412 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0438\u0437-\u0437\u0430 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0438 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043d\u0430 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c \u0441\u0430\u0439\u0442\u0435. \u042d\u0442\u043e \u0438 \u043f\u043e\u0434\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u043e \u043c\u0435\u043d\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u044d\u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e. \u041d\u0430\u0434\u0435\u044e\u0441\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432 \u0441\u0442\u0430\u043b\u043e \u0434\u043b\u044f \u0432\u0430\u0441 \u0447\u0443\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u043c. \u0411\u0443\u0434\u0443 \u0440\u0430\u0434 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u043a\u0440\u0438\u0442\u0438\u043a\u0435 \u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u0432\u044f\u0437\u0438.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0434 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c <a href=\"https:\/\/github.com\/Maksim-Novikov\/moxy-strategy-plugin\">\u0437\u0434\u0435\u0441\u044c<\/a><\/p>\n<p>  <\/p>\n<h2 id=\"poleznye-ssylki\">\u041f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0441\u0441\u044b\u043b\u043a\u0438<\/h2>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/plugins.jetbrains.com\/plugin\/13679-moxy-strategy\">\u043f\u043b\u0430\u0433\u0438\u043d \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 Jetbrains<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/Maksim-Novikov\/moxy-strategy-plugin\">\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/a><\/li>\n<li><a href=\"https:\/\/proandroiddev.com\/write-an-android-studio-plugin-part-1-creating-a-basic-plugin-af956c4f8b50\">\u0441\u0435\u0440\u0438\u044f \u0441\u0442\u0430\u0442\u0435\u0439 \u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432<\/a><\/li>\n<li><a href=\"https:\/\/www.youtube.com\/watch?v=MSMI85JMIwE&amp;feature=youtu.be\">\u0434\u043e\u043a\u043b\u0430\u0434 \u043e\u0442 hh.ru<\/a><\/li>\n<li><a href=\"https:\/\/www.jetbrains.org\/intellij\/sdk\/docs\/basics.html\">\u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043e\u0442 Jetbrains \u043f\u043e \u043f\u043b\u0430\u0433\u0438\u043d\u0430\u043c<\/a><\/li>\n<li><a href=\"https:\/\/plugins.jetbrains.com\/plugin\/227-psiviewer\">Psi viewer plugin<\/a><\/li>\n<\/ul>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/486658\/\"> https:\/\/habr.com\/ru\/post\/486658\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/486658\/\">\n<p>\u0418\u043d\u043e\u0433\u0434\u0430 \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u0432\u0435\u0449\u0438 \u043e\u0447\u0435\u043d\u044c \u0443\u0442\u043e\u043c\u043b\u044f\u044e\u0442, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043a\u043e\u0433\u0434\u0430 \u0438\u0445 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e. \u041e\u0434\u043d\u0430 \u0438\u0437 \u0442\u0430\u043a\u0438\u0445 \u0432\u0435\u0449\u0435\u0439 \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u043c <a href=\"https:\/\/github.com\/moxy-community\/Moxy\">Moxy <\/a> \u2014 \u044d\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0439 \u043a \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c. \u0414\u043b\u044f \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0431\u044b\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u043d <a href=\"https:\/\/plugins.jetbrains.com\/plugin\/13679-moxy-strategy\">\u043f\u043b\u0430\u0433\u0438\u043d<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e &quot;alt+enter&quot; \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u044b\u0431\u043e\u0440 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 \u0435\u0441\u043b\u0438 \u0435\u0435 \u043d\u0435\u0442 \u0438\u043b\u0438 \u0434\u0438\u0430\u043b\u043e\u0433 \u0441 \u0437\u0430\u043c\u0435\u043d\u043e\u0439 \u043d\u0430 \u0434\u0440\u0443\u0433\u0443\u044e \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044e. \u0422\u0435, \u043a\u0442\u043e \u0445\u043e\u0447\u0435\u0442 \u0443\u0437\u043d\u0430\u0442\u044c \u043a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0434\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434 \u043a\u0430\u0442.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/7v\/4g\/6s\/7v4g6s91cknp5xovm9ubgjzfope.jpeg\"><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-298097","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/298097","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=298097"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/298097\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=298097"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=298097"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=298097"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}