{"id":313813,"date":"2020-11-26T09:01:13","date_gmt":"2020-11-26T09:01:13","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=313813"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=313813","title":{"rendered":"\u041c\u0430\u0433\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u043b\u044f Android-\u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ue\/ul\/tc\/ueultcu9h6_imr6b0x6kdrl-nxq.jpeg\"><\/p>\n<p>  <\/p>\n<p>\u041d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 Android Studio 4.1, Google \u043f\u0440\u0435\u043a\u0440\u0430\u0442\u0438\u043b \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0445 FreeMarker-\u043d\u044b\u0445 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432. \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 <a href=\"https:\/\/vgtimes.ru\/uploads\/posts\/2020-06\/67229_16_9.jpg\">\u043f\u0440\u043e\u0441\u0442\u043e \u0432\u0437\u044f\u0442\u044c \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c<\/a> \u0441\u0432\u043e\u0438 ftl-\u0444\u0430\u0439\u043b\u044b \u0438 \u0441\u043b\u043e\u0436\u0438\u0442\u044c \u0438\u0445 \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u0443\u044e \u043f\u0430\u043f\u043a\u0443, \u0447\u0442\u043e\u0431\u044b Android Studio \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0430 \u0438\u0445 \u0432 \u043c\u0435\u043d\u044e New \u2192 Other. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u044b \u043d\u0430\u043c \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0442 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0438 \u0438 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u0438\u0437\u043d\u0443\u0442\u0440\u0438 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432 IDEA. \u041d\u0430\u0441 \u0432 hh \u0442\u0430\u043a\u0430\u044f \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0443\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442, \u0442\u0430\u043a \u043a\u0430\u043a \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 FreeMarker-\u043d\u044b\u0445 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u043d\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u0434\u0430\u044e\u0442\u0441\u044f \u0432 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f\u0445. \u041b\u0435\u0437\u0442\u044c \u0432 \u043f\u043b\u0430\u0433\u0438\u043d\u044b, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0448\u0430\u0431\u043b\u043e\u043d? \u041d\u0435\u0442 \u0443\u0436, \u0443\u0432\u043e\u043b\u044c\u0442\u0435.\u00a0<\/p>\n<p>  <\/p>\n<p>\u0412\u0441\u0451 \u044d\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u043b\u043e \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043c\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u043b\u0430\u0433\u0438\u043d \u0434\u043b\u044f Android Studio, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0440\u0435\u0448\u0438\u0442\u044c \u044d\u0442\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b. \u0412\u0441\u0442\u0440\u0435\u0447\u0430\u0439\u0442\u0435 \u2013 <strong>Geminio<\/strong>.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<p>\u041f\u0440\u043e \u0442\u043e, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u043b\u0430\u0433\u0438\u043d \u0438 \u0447\u0442\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0435\u0433\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432 \u0435\u0433\u043e <a href=\"https:\/\/github.com\/hhru\/android-multimodule-plugin\/blob\/master\/plugins\/hh-geminio\/README.md\">README<\/a>, \u0430 \u0432\u043e\u0442 \u043f\u0440\u043e \u0442\u043e, \u043a\u0430\u043a \u043e\u043d \u0443\u0441\u0442\u0440\u043e\u0435\u043d \u0438\u0437\u043d\u0443\u0442\u0440\u0438 \u2013 \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0434\u0435\u0441\u044c. \u0410 \u0435\u0449\u0451 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0438\u0437 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u044b. <\/p>\n<p>  <\/p>\n<p>*<em>Geminio \u2013 \u0437\u0430\u043a\u043b\u0438\u043d\u0430\u043d\u0438\u0435 \u0443\u0434\u0432\u043e\u0435\u043d\u0438\u044f \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u043e\u0432 \u0432\u043e \u0432\u0441\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0413\u0430\u0440\u0440\u0438 \u041f\u043e\u0442\u0442\u0435\u0440\u0430<\/em><\/p>\n<p>  <\/p>\n<h2 id=\"nemnogo-terminologii\">\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u0442\u0435\u0440\u043c\u0438\u043d\u043e\u043b\u043e\u0433\u0438\u0438<\/h2>\n<p>  <\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043c\u0435\u043d\u044c\u0448\u0435 \u043f\u0443\u0442\u0430\u0442\u044c\u0441\u044f \u0438 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0442\u043e\u0433\u043e, \u043e \u0447\u0451\u043c \u043c\u044b \u0433\u043e\u0432\u043e\u0440\u0438\u043c, \u0432\u0432\u0435\u0434\u0451\u043c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0442\u0435\u0440\u043c\u0438\u043d\u043e\u043b\u043e\u0433\u0438\u0438. <\/p>\n<p>  <\/p>\n<p>\u042f \u0431\u0443\u0434\u0443 \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u043c \u043d\u0430\u0431\u043e\u0440 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u0432 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0438 \u0434\u0438\u0430\u043b\u043e\u0433\u0430 \u0434\u043b\u044f \u0432\u0432\u043e\u0434\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432. \u00ab\u0420\u0435\u0446\u0435\u043f\u0442\u043e\u043c\u00bb \u043d\u0430\u0437\u043e\u0432\u0451\u043c \u043d\u0430\u0431\u043e\u0440 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432\u0432\u0435\u0434\u0451\u0442 \u0434\u0430\u043d\u043d\u044b\u0435. \u041a\u043e\u0433\u0434\u0430 \u044f \u0431\u0443\u0434\u0443 \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u043f\u0440\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u044f \u0431\u0443\u0434\u0443 \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u044d\u0442\u043e ftl-\u0448\u0430\u0431\u043b\u043e\u043d\u0430\u043c\u0438 \u0438\u043b\u0438 FreeMarker-\u043d\u044b\u043c\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u0430\u043c\u0438. <\/p>\n<p>  <\/p>\n<h2 id=\"chem-zamenili-freemarker\">\u0427\u0435\u043c \u0437\u0430\u043c\u0435\u043d\u0438\u043b\u0438 FreeMarker?<\/h2>\n<p>  <\/p>\n<p>Google \u0443\u0436\u0435 \u0434\u0430\u0432\u043d\u043e \u043e\u0431\u044a\u044f\u0432\u0438\u043b Kotlin \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u0435\u043c\u044b\u043c \u044f\u0437\u044b\u043a\u043e\u043c \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u043e\u0434 Android. \u0412\u0441\u0435 \u043d\u043e\u0432\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u043d\u043e\u0432\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 Google \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0438\u043c\u0435\u043d\u043d\u043e \u043d\u0430 Kotlin. \u0418 \u043f\u043b\u0430\u0433\u0438\u043d android-\u0430 \u0432 Android Studio \u043d\u0435 \u0441\u0442\u0430\u043b \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c. <\/p>\n<p>  <\/p>\n<p>\u041a\u0430\u043a \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0434\u043e Android Studio 4.1? \u0412\u044b \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b\u0438 \u043f\u0430\u043f\u043a\u0443 \u0434\u043b\u044f \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u0430, \u0437\u0430\u0432\u043e\u0434\u0438\u043b\u0438 \u0432 \u043d\u0451\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0444\u0430\u0439\u043b\u043e\u0432 \u2013 <code>globals.xml.ftl<\/code>, <code>template.xml<\/code>, <code>recipe.xml.ftl<\/code> \u0434\u043b\u044f \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u0430, \u0430 \u0435\u0449\u0451 \u0432\u044b \u043f\u043e\u043c\u0435\u0449\u0430\u043b\u0438 \u0442\u0443\u0434\u0430 ftl-\u0448\u0430\u0431\u043b\u043e\u043d\u044b, \u0441\u043b\u0443\u0436\u0438\u0432\u0448\u0438\u0435 \u043a\u0430\u0440\u043a\u0430\u0441\u043e\u043c \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c\u043e\u0433\u043e \u043a\u043e\u0434\u0430. \u0417\u0430\u0442\u0435\u043c \u0432\u0441\u0435 \u044d\u0442\u0438 \u0444\u0430\u0439\u043b\u044b \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u043b\u0438 \u0432 \u043f\u0430\u043f\u043a\u0443 <code>Android Studio\/plugins\/android\/lib\/templates\/&lt;category&gt;<\/code>. \u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 Android Studio \u043f\u0430\u0440\u0441\u0438\u043b\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043f\u0430\u043f\u043a\u0438 \/templates, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u043b\u0430 \u0432 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043c\u0435\u043d\u044e <code>New \u2013&gt;<\/code> \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 action-\u044b, \u0430 \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 action-\u0430 \u0447\u0438\u0442\u0430\u043b\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 <code>template.xml<\/code>, \u0441\u0442\u0440\u043e\u0438\u043b\u0430 UI \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435.<\/p>\n<p>  <\/p>\n<p>\u0412 \u0446\u0435\u043b\u043e\u043c \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u043f\u043e\u0447\u0435\u043c\u0443 \u0432 Google \u043e\u0442\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u043e\u0442 \u044d\u0442\u043e\u0433\u043e \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430. \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043d\u043e\u0432\u043e\u0433\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 FreeMarker-\u043d\u044b\u0445 recipe-\u043e\u0432 \u0440\u0430\u043d\u044c\u0448\u0435 \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u043b\u043e \u0440\u0443\u0441\u0441\u043a\u0443\u044e \u0440\u0443\u043b\u0435\u0442\u043a\u0443: \u0434\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0442\u044b \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u043c\u043e\u0433 \u0442\u043e\u0447\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043b\u0438 \u0435\u0433\u043e \u043e\u043f\u0438\u0441\u0430\u043b, \u0432\u0441\u0435 \u043b\u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u043b. \u0410 \u043f\u043e\u0442\u043e\u043c, \u043f\u043e \u0440\u0435\u0430\u043a\u0446\u0438\u0438 Android Studio, \u0442\u044b \u043f\u044b\u0442\u0430\u043b\u0441\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c, \u0432 \u043a\u0430\u043a\u043e\u0439 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0431\u0443\u043a\u0432\u0435 \u043e\u0448\u0438\u0431\u0441\u044f. \u041d\u0430\u0445\u043e\u0434\u0438\u043b \u043e\u0448\u0438\u0431\u043a\u0443, \u043c\u0435\u043d\u044f\u043b \u0448\u0430\u0431\u043b\u043e\u043d, \u0438 \u0432\u0441\u0451 \u0448\u043b\u043e \u043d\u0430 \u043d\u043e\u0432\u044b\u0439 \u043a\u0440\u0443\u0433. \u0410 \u0447\u0438\u0441\u043b\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u0440\u0430\u0441\u0442\u0451\u0442, \u0440\u0430\u0441\u0442\u0451\u0442 \u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043c\u0435\u0441\u0442 \u0432 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435, \u043a\u0443\u0434\u0430 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u044d\u0442\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u044b. \u0420\u0430\u043d\u044c\u0448\u0435 \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0438 \u0442\u043e\u0433\u043e \u0436\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0441\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 action-\u044b \u043f\u043b\u0430\u0433\u0438\u043d\u044b. \u041d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0443\u043f\u0440\u043e\u0449\u0430\u0442\u044c.<\/p>\n<p>  <\/p>\n<p>\u0412\u043e\u0442 \u0442\u0430\u043a \u0438 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0443\u0434\u043e\u0431\u043d\u044b\u0439 Kotlin DSL \u0434\u043b\u044f \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432. \u0421\u0440\u0430\u0432\u043d\u0438\u0442\u0435 \u0434\u0432\u0430 \u043f\u043e\u0434\u0445\u043e\u0434\u0430:<\/p>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">FreeMarker-\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<p>\u0412\u043e\u0442 \u0442\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b \u0444\u0430\u0439\u043b <strong>template.xml<\/strong>:<\/p>\n<p>  <\/p>\n<pre><code class=\"xml\">&lt;?xml version=&quot;1.0&quot;?&gt; &lt;template     format=&quot;4&quot;     revision=&quot;1&quot;     name=&quot;HeadHunter BaseFragment&quot;     description=&quot;Creates HeadHunter BaseFragment&quot;     minApi=&quot;7&quot;     minBuildApi=&quot;8&quot;&gt;      &lt;category value=&quot;HeadHunter&quot; \/&gt;      &lt;!-- \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430 --&gt;      &lt;parameter         id=&quot;className&quot;         name=&quot;Fragment Name&quot;         type=&quot;string&quot;         constraints=&quot;class|nonempty|unique&quot;         default=&quot;BlankFragment&quot;         help=&quot;The name of the fragment class to create&quot; \/&gt;      &lt;parameter         id=&quot;fragmentName&quot;         name=&quot;Fragment Layout Name&quot;         type=&quot;string&quot;         constraints=&quot;layout|nonempty|unique&quot;         default=&quot;fragment_blank&quot;         suggest=&quot;fragment_${classToResource(className)}&quot;         help=&quot;The name of the layout to create&quot; \/&gt;      &lt;parameter         id=&quot;includeFactory&quot;         name=&quot;Include fragment factory method?&quot;         type=&quot;boolean&quot;         default=&quot;true&quot;         help=&quot;Generate static fragment factory method for easy instantiation&quot; \/&gt;      &lt;!-- \u0434\u043e\u043f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b  --&gt;      &lt;parameter         id=&quot;includeModule&quot;         name=&quot;Include Toothpick Module class?&quot;         type=&quot;boolean&quot;         default=&quot;true&quot;         help=&quot;Generate fragment Toothpick Module for easy instantiation&quot; \/&gt;      &lt;parameter         id=&quot;moduleName&quot;         name=&quot;Fragment Toothpick Module&quot;         type=&quot;string&quot;         constraints=&quot;class|nonempty|unique&quot;         default=&quot;BlankModule&quot;         visibility=&quot;includeModule&quot;         suggest=&quot;${underscoreToCamelCase(classToResource(className))}Module&quot;         help=&quot;The name of the Fragment Toothpick Module to create&quot; \/&gt;      &lt;thumbs&gt;         &lt;thumb&gt;template_base_fragment.png&lt;\/thumb&gt;     &lt;\/thumbs&gt;      &lt;globals file=&quot;globals.xml.ftl&quot; \/&gt;     &lt;execute file=&quot;recipe.xml.ftl&quot; \/&gt;  &lt;\/template&gt;<\/code><\/pre>\n<p>  <\/p>\n<p>\u0410 \u0435\u0449\u0451 \u0431\u044b\u043b \u0444\u0430\u0439\u043b <strong>recipe.xml.ftl<\/strong>: <\/p>\n<p>  <\/p>\n<pre><code class=\"xml\">&lt;?xml version=&quot;1.0&quot;?&gt; &lt;recipe&gt;      &lt;#if useSupport&gt;     &lt;dependency mavenUrl=&quot;com.android.support:support-v4:19.+&quot;\/&gt;     &lt;\/#if&gt;      &lt;instantiate         from=&quot;res\/layout\/fragment_blank.xml.ftl&quot;         to=&quot;${escapeXmlAttribute(resOut)}\/layout\/${escapeXmlAttribute(fragmentName)}.xml&quot; \/&gt;      &lt;open file=&quot;${escapeXmlAttribute(resOut)}\/layout\/${escapeXmlAttribute(fragmentName)}.xml&quot; \/&gt;      &lt;instantiate         from=&quot;src\/app_package\/BlankFragment.kt.ftl&quot;         to=&quot;${srcOutRRR}\/${className}.kt&quot; \/&gt;      &lt;open file=&quot;${srcOutRRR}\/${className}.kt&quot; \/&gt;      &lt;#if includeModule&gt;         &lt;instantiate             from=&quot;src\/app_package\/BlankModule.kt.ftl&quot;             to=&quot;${srcOutRRR}\/di\/${moduleName}.kt&quot; \/&gt;          &lt;open file=&quot;${srcOutRRR}\/di\/${moduleName}.kt&quot; \/&gt;     &lt;\/#if&gt;  &lt;\/recipe&gt;<\/code><\/pre>\n<\/div><\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0422\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u043d\u043e \u0432 Kotlin DSL<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e TemplateBuilder-\u0430:<\/p>\n<p>  <\/p>\n<pre><code class=\"kotlin\">val baseFragmentTemplate: Template     get() = template {         revision = 1         name = &quot;HeadHunter BaseFragment&quot;         description = &quot;Creates HeadHunter BaseFragment&quot;         minApi = 7         minBuildApi = 8          formFactor = FormFactor.Mobile         category = Category.Fragment         screens = listOf(             WizardUiContext.FragmentGallery,             WizardUiContext.MenuEntry         )          \/\/ \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b         val className = stringParameter {             name = &quot;Fragment Name&quot;             constraints = listOf(                 Constraint.CLASS,                 Constraint.NONEMPTY,                 Constraint.UNIQUE             )             default = &quot;BlankFragment&quot;             help = &quot;The name of the fragment class to create&quot;         }         val fragmentName = stringParameter {             name = &quot;Fragment Layout Name&quot;             constraints = listOf(                 Constraint.LAYOUT,                 Constraint.NONEMPTY,                 Constraint.UNIQUE             )             default = &quot;fragment_blank&quot;             suggest = { &quot;fragment_${classToResource(className.value)}&quot; }             help = &quot;The name of the layout to create&quot;         }         val includeFactory = booleanParameter {             name = &quot;Include fragment factory method?&quot;             default = true             help = &quot;Generate static fragment factory method for easy instantiation&quot;         }          \/\/ \u0434\u043e\u043f. \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b         val includeModule = booleanParameter {             name = &quot;Include Toothpick Module class?&quot;             default = true             help = &quot;Generate fragment Toothpick Module for easy instantiation&quot;         }         val moduleName = stringParameter {             name = &quot;Fragment Toothpick Module&quot;             constraints = listOf(                 Constraint.CLASS,                 Constraint.NONEMPTY,                 Constraint.UNIQUE             )             visible = { includeModule.value }             suggest = { &quot;${underscoreToCamelCase(classToResource(className.value))}Module&quot; }             help = &quot;The name of the Fragment Toothpick Module to create&quot;             default = &quot;BlankFragmentModule&quot;         }          thumb { File(&quot;template_base_fragment.png&quot;) }          recipe = { templateData -&gt;             baseFragmentRecipe(                 moduleData = templateData as ModuleTemplateData,                 className = className.value,                 fragmentName = fragmentName.value,                 includeFactory = includeFactory.value,                 includeModule = includeModule.value,                 moduleName = moduleName.value             )         }     }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0417\u0430\u0442\u0435\u043c \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0440\u0435\u0446\u0435\u043f\u0442 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438:<\/p>\n<p>  <\/p>\n<pre><code class=\"kotlin\">fun RecipeExecutor.baseFragmentRecipe(     moduleData: ModuleTemplateData,     className: String,     fragmentName: String,     includeFactory: Boolean,     includeModule: Boolean,     moduleName: String ) {     val (projectData, srcOut, resOut, _) = moduleData      if (projectData.androidXSupport.not()) {         addDependency(&quot;com.android.support:support-v4:19.+&quot;)     }     save(getFragmentBlankLayoutText(), resOut.resolve(&quot;\/layout\/${fragmentName}.xml&quot;))     open(resOut.resolve(&quot;\/layout\/${fragmentName}.xml&quot;))      save(getFragmentBlankClassText(className, includeFactory), srcOut.resolve(&quot;${className}.kt&quot;))     open(srcOut.resolve(&quot;${className}.kt&quot;))      if (includeModule) {         save(getFragmentModuleClassText(moduleName), srcOut.resolve(&quot;\/di\/${moduleName}.kt&quot;))         open(srcOut.resolve(&quot;\/di\/${moduleName}.kt&quot;))     } }  private fun getFragmentBlankClassText(className: String, includeFactory: Boolean): String {     return &quot;...&quot; }  private fun getFragmentBlankLayoutText(): String {     return &quot;...&quot; }  private fun getFragmentModuleClassText(moduleName: String): String {     return &quot;...&quot; }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0435\u043a\u0441\u0442 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u043f\u0435\u0440\u0435\u043a\u043e\u0447\u0435\u0432\u0430\u043b \u0438\u0437 FreeMarker-\u043d\u044b\u0445 ftl-\u0444\u0430\u0439\u043b\u043e\u0432 \u0432 Kotlin-\u043e\u0432\u0441\u043a\u0438\u0435 \u0441\u0442\u0440\u043e\u0447\u043a\u0438.<\/p>\n<\/div><\/div>\n<p>  <\/p>\n<p>\u041f\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0443 \u043a\u043e\u0434\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u043d\u043e \u0432\u043e\u0442 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043e\u043a IDE \u043f\u0440\u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043d\u0435 \u043e\u0448\u0438\u0431\u0430\u0442\u044c\u0441\u044f \u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u0445 enum-\u043e\u0432 \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u0445. \u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u043a \u044d\u0442\u043e\u043c\u0443 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044e \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435, \u0435\u0441\u043b\u0438 \u0432\u044b \u0437\u0430\u0431\u044b\u043b\u0438 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043e\u0434\u0438\u043d \u0438\u0437 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432), \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0437\u043e\u0432\u0430 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0438\u0437 \u0440\u0430\u0437\u043d\u044b\u0445 \u043c\u0435\u043d\u044e \u0432 Android Studio \u2013 \u0438, \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043f\u043e\u0431\u0435\u0434\u0438\u0442\u0435\u043b\u044c. <\/p>\n<p>  <\/p>\n<h3 id=\"dobavlenie-shablona-cherez-extension-point\">\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0447\u0435\u0440\u0435\u0437 extension point<\/h3>\n<p>  <\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043d\u043e\u0432\u044b\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u043f\u043e\u043f\u0430\u043b\u0438 \u0432 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0433\u0430\u043b\u0435\u0440\u0435\u0438 \u043d\u043e\u0432\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0432 Android Studio, \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e DSL \u0448\u0430\u0431\u043b\u043e\u043d \u0432 \u043d\u043e\u0432\u0443\u044e \u0442\u043e\u0447\u043a\u0443 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f (extension point) \u2013 <a href=\"https:\/\/cs.android.com\/android-studio\/platform\/tools\/base\/+\/mirror-goog-studio-master-dev:wizard\/template-plugin\/src\/com\/android\/tools\/idea\/wizard\/template\/WizardTemplateProvider.kt\">WizardTemplateProvider<\/a>.<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u043a\u043b\u0430\u0441\u0441 provider-\u0430, \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u044f\u0441\u044c \u043e\u0442 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 WizardTemplateProvider:<\/p>\n<p>  <\/p>\n<pre><code class=\"kotlin\">class MyWizardTemplateProvider : WizardTemplateProvider() {      override fun getTemplates(): List&lt;Template&gt; {         return listOf(             baseFragmentTemplate         )     }  }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0410 \u0437\u0430\u0442\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 provider \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 extension-\u0430 \u0432 plugin.xml \u0444\u0430\u0439\u043b\u0435:<\/p>\n<p>  <\/p>\n<pre><code class=\"xml\">&lt;extensions defaultExtensionNs=&quot;com.android.tools.idea.wizard.template&quot;&gt;     &lt;wizardTemplateProvider implementation=&quot;ru.hh.plugins.geminio.actions.MyWizardTemplateProvider&quot; \/&gt; &lt;\/extensions&gt;<\/code><\/pre>\n<p>  <\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0432 Android Studio, \u043c\u044b \u0443\u0432\u0438\u0434\u0438\u043c \u0448\u0430\u0431\u043b\u043e\u043d baseFragmentTemplate \u0432 \u043c\u0435\u043d\u044e New-&gt;Fragment \u0438 \u0432 \u0433\u0430\u043b\u0435\u0440\u0435\u0435 \u043d\u043e\u0432\u043e\u0433\u043e \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430. <\/p>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041f\u043e\u043a\u0430\u0436\u0438 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438!<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<p>\u0412\u043e\u0442 \u043d\u0430\u0448 \u0448\u0430\u0431\u043b\u043e\u043d \u0432 \u043c\u0435\u043d\u044e New -&gt; Fragments:<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/0d2\/448\/7c2\/0d24487c2014a11055329c9228e20b5e\"><\/p>\n<p>  <\/p>\n<p>\u0410 \u0432\u043e\u0442 \u043e\u043d \u0436\u0435 \u2013 \u0432 \u0433\u0430\u043b\u0435\u0440\u0435\u0435 \u043d\u043e\u0432\u043e\u0433\u043e \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430:<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a8f\/dcd\/9db\/a8fdcd9db4b0d51b994a60fc243072ab\"><\/p>\n<\/div><\/div>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0437\u0430\u0445\u043e\u0442\u0438\u0442\u0435 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0439\u0442\u0438 \u0432\u0435\u0441\u044c \u044d\u0442\u043e\u0442 \u043f\u0443\u0442\u044c \u043f\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044e \u043d\u043e\u0432\u043e\u0433\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0438\u0437 \u043a\u043e\u0434\u0430 \u043f\u043b\u0430\u0433\u0438\u043d\u0430, \u043c\u043e\u0436\u0435\u0442\u0435, \u0432\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 <a href=\"https:\/\/cs.android.com\/android-studio\/platform\/tools\/base\/+\/mirror-goog-studio-master-dev:wizard\/template-impl\/src\/com\/android\/tools\/idea\/wizard\/template\/impl\/\">\u0441\u043f\u0438\u0441\u043e\u043a \u0433\u043e\u0442\u043e\u0432\u044b\u0445 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432<\/a> \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u043a\u043e\u0434\u0435 Android Studio (\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u043d\u0430\u043a\u043e\u043d\u0435\u0446-\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0432 <a href=\"https:\/\/cs.android.com\">cs.android.com<\/a>), \u0430 \u0432\u043e-\u0432\u0442\u043e\u0440\u044b\u0445 \u2013 \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432\u043e\u0442 \u044d\u0442\u0443 <a href=\"https:\/\/steewsc.medium.com\/template-plugin-for-android-studio-4-1-92dcbc689d39\">\u0441\u0442\u0430\u0442\u044c\u044e \u043d\u0430 Medium<\/a> (\u0442\u0430\u043c \u0445\u043e\u0440\u043e\u0448\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u043f\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u043d\u043e\u0432\u043e\u0433\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0430, \u043d\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u043d \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0445\u0430\u043a \u0441 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435\u043c \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u0430 Project-\u0430 \u2013 \u0442\u0430\u043a \u043b\u0443\u0447\u0448\u0435 \u043d\u0435 \u0434\u0435\u043b\u0430\u0442\u044c).<\/p>\n<p>  <\/p>\n<h3 id=\"a-chem-eschyo-mozhno-zamenit-freemarker\">\u0410 \u0447\u0435\u043c \u0435\u0449\u0451 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c FreeMarker?<\/h3>\n<p>  <\/p>\n<p>\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u043a\u043e\u0434\u0430 \u0438\u0437 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"https:\/\/www.jetbrains.com\/help\/idea\/using-file-and-code-templates.html\">File templates<\/a>. \u042d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e: \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0435 \u0435\u0433\u043e \u0432 \u043f\u0430\u043f\u043a\u0443 <strong>resources\/fileTemplates<\/strong> \u0438\u2026 \u0412\u044b \u0432\u043e\u0441\u0445\u0438\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u044b! <\/p>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0410 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435?<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<p>\u0412 \u043f\u0430\u043f\u043a\u0443 \/resources\/fileTemplates \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u0432\u0430\u043c \u043a\u043e\u0434\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <strong>\/resources\/fileTemplates\/Toothpick Module.kt.ft<\/strong> .<\/p>\n<p>  <\/p>\n<pre><code class=\"kotlin\">package ${PACKAGE_NAME}.di  import toothpick.config.Module  internal class ${NAME}: Module() {      init {             \/\/ TODO     } }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0428\u0430\u0431\u043b\u043e\u043d\u044b \u043a\u043e\u0434\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043d\u0430 \u0434\u0432\u0438\u0436\u043a\u0435 <a href=\"https:\/\/velocity.apache.org\/\">Velocity<\/a>, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0432 \u043a\u043e\u0434 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0438 \u0446\u0438\u043a\u043b\u044b. File template-\u044b \u0438\u043c\u0435\u044e\u0442 \u0440\u044f\u0434 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <strong>PACKAGE_NAME<\/strong> (\u043f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u0442 package name, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u0432 Project View \u0444\u0430\u0439\u043b\u0430), <strong>MONTH<\/strong> (\u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043c\u0435\u0441\u044f\u0446) \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435. \u041a\u0430\u0436\u0434\u044b\u0439 &quot;\u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0439&quot; \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d \u0432 \u043f\u043e\u043b\u0435 \u0432\u0432\u043e\u0434\u0430 \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. <\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 Android Studio \u0432 \u043c\u0435\u043d\u044e New \u0432\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u043d\u043e\u0432\u044b\u0439 \u043f\u0443\u043d\u043a\u0442 \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c \u0432\u0430\u0448\u0435\u0433\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0430:<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f49\/81d\/c76\/f4981dc760929335a9c51baef5c1dc15\"><\/p>\n<p>  <\/p>\n<p>\u041d\u0430\u0436\u0430\u0432 \u043d\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043c\u0435\u043d\u044e, \u0432\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u0434\u0438\u0430\u043b\u043e\u0433, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043b\u0441\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u0430. <\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/da5\/3cd\/eea\/da53cdeea469e6ebefd014cffeb6da3b\"><\/p>\n<\/div><\/div>\n<p>  <\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0442\u0430\u043a\u0438\u0445 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0434\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 <a href=\"https:\/\/github.com\/badoo\/MVICore\/blob\/master\/mvicore-plugin\/templates\/src\/main\/resources\/fileTemplates\/\">\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 MviCore<\/a> \u043a\u043e\u043b\u043b\u0435\u0433 \u0438\u0437 Badoo.\u00a0<\/p>\n<p>  <\/p>\n<p>\u0412 \u0447\u0451\u043c \u043c\u0438\u043d\u0443\u0441 \u0442\u0430\u043a\u0438\u0445 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u2013 \u043e\u043d\u0438 \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0432\u0430\u043c \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c <strong>\u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0444\u0430\u0439\u043b\u043e\u0432<\/strong>. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0432 hh \u0438\u0445 \u043e\u0431\u044b\u0447\u043d\u043e \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0451\u043c.<\/p>\n<p>  <\/p>\n<h2 id=\"chto-ne-tak-s-novym-mehanizmom\">\u0427\u0442\u043e \u043d\u0435 \u0442\u0430\u043a \u0441 \u043d\u043e\u0432\u044b\u043c \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u043c<\/h2>\n<p>  <\/p>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u043f\u0440\u0435\u0442\u0435\u043d\u0437\u0438\u044f \u043a \u043d\u043e\u0432\u043e\u043c\u0443 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0443 \u2013 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0432\u043b\u0438\u044f\u0442\u044c \u043d\u0430 \u0432\u0430\u0448\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u0438\u0437\u0432\u043d\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432. \u0412\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0438 \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u0432 \u043d\u0438\u0445 \u0442\u0435\u043a\u0441\u0442, \u043d\u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0448\u0430\u0431\u043b\u043e\u043d, \u043f\u043e\u043a\u0430 \u043d\u0435 \u0437\u0430\u043b\u0435\u0437\u0435\u0442\u0435 \u0432 \u043f\u043b\u0430\u0433\u0438\u043d.\u00a0<\/p>\n<p>  <\/p>\n<p>\u041c\u044b \u0436\u0435 \u0445\u043e\u0442\u0438\u043c \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 ftl-\u0444\u0430\u0439\u043b\u043e\u0432, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u0438 \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0431\u0435\u0437 \u0432\u043c\u0435\u0448\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430 \u0432 \u043f\u043b\u0430\u0433\u0438\u043d, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u0442\u043b\u0430\u0434\u043a\u0430 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u0438\u0437 \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u2014 \u0442\u043e\u0442 \u0435\u0449\u0451 \u043a\u0432\u0435\u0441\u0442 =) \u0410 \u0435\u0449\u0451 \u2013 \u043c\u044b \u043e\u0447\u0435\u043d\u044c \u043d\u0435 \u0445\u043e\u0442\u0438\u043c \u0432\u044b\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u0442\u043e\u0447\u0435\u043d\u044b \u043f\u043e\u0434 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 FreeMarker-\u0430.<\/p>\n<p>  <\/p>\n<h2 id=\"mehanizm-renderinga-shablonov\">\u041c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432<\/h2>\n<p>  <\/p>\n<p>\u041f\u043e\u0447\u0435\u043c\u0443 \u0431\u044b \u043d\u0435 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u0442\u043e\u043c, \u043a\u0430\u043a \u0432\u043e\u043e\u0431\u0449\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433 \u043d\u043e\u0432\u044b\u0445 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u0432 Android Studio? \u0418 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u044d\u0442\u043e\u0433\u043e \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043e\u0431\u0451\u0440\u0442\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u043e\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u043d\u0430 \u0440\u0435\u043d\u0434\u0435\u0440.<\/p>\n<p>  <\/p>\n<p>\u0420\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438\u0441\u044c. \u0414\u0435\u043b\u0438\u043c\u0441\u044f.\u00a0<\/p>\n<p>  <\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442\u044c Android Studio \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c UI \u0438 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0434 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0430, \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430. \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0432\u044b \u0443\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u043b\u0438\u00a0\u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043f\u043b\u0430\u0433\u0438\u043d, \u043e\u0431\u044a\u044f\u0432\u0438\u043b\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 android-\u043f\u043b\u0430\u0433\u0438\u043d\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043b\u0435\u0436\u0438\u0442 \u0432 Android Studio 4.1, \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u043d\u043e\u0432\u044b\u0439 action, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u0432\u0435\u0447\u0430\u0442\u044c \u0437\u0430 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433. \u0422\u043e\u0433\u0434\u0430 \u043c\u0435\u0442\u043e\u0434 actionPerformed \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0432\u043e\u0442 \u0442\u0430\u043a:<\/p>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 actionPerformed<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"kotlin\">override fun actionPerformed(e: AnActionEvent) {     val dataContext = e.dataContext      val module = LangDataKeys.MODULE.getData(dataContext)!!      var targetDirectory = CommonDataKeys.VIRTUAL_FILE.getData(dataContext)     if (targetDirectory != null &amp;&amp; targetDirectory.isDirectory.not()) {        \/\/ If the user selected a simulated folder entry (eg &quot;Manifests&quot;), there will be no target directory         targetDirectory = targetDirectory.parent     }     targetDirectory!!      val facet = AndroidFacet.getInstance(module)     val moduleTemplates = facet.getModuleTemplates(targetDirectory)     assert(moduleTemplates.isNotEmpty())      val initialPackageSuggestion = facet.getPackageForPath(moduleTemplates, targetDirectory).orEmpty()      val renderModel = RenderTemplateModel.fromFacet(         facet,         initialPackageSuggestion,         moduleTemplates[0],         &quot;MyActionCommandName&quot;,         ProjectSyncInvoker.DefaultProjectSyncInvoker(),         true,     ).apply {         newTemplate = template { ... } \/\/ build your template      }       val configureTemplateStep = ConfigureTemplateParametersStep(          model = renderModel,          title = &quot;Template name&quot;,          templates = moduleTemplates      )       val wizard = ModelWizard.Builder()                     .addStep(configureTemplateStep).build().apply {           val resultListener = object : ModelWizard.WizardListener {           override fun onWizardFinished(result: ModelWizard.WizardResult) {               super.onWizardFinished(result)               if (result.isFinished) {                   \/\/ TODO do some stuff after creating files                   \/\/   (renderTemplateModel.createdFiles)               }           }        }     }       val dialog = StudioWizardDialogBuilder(wizard, &quot;Template wizard&quot;)             .setProject(e.project!!)             .build()      dialog.show() }<\/code><\/pre>\n<\/div><\/div>\n<p>  <\/p>\n<p>\u0424\u0443\u0445, \u044d\u0442\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430! \u041d\u043e \u0441 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u044d\u0442\u043e \u0441\u043d\u0438\u043c\u0430\u0435\u0442 \u0441 \u043d\u0430\u0441 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0434\u0443\u043c\u0430\u0442\u044c \u043f\u0440\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0434\u0438\u0430\u043b\u043e\u0433\u043e\u0432 \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438, \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0435\u0439 \u043a\u043e\u0434\u0430 \u0438 \u043c\u043d\u043e\u0433\u0438\u043c \u0434\u0440\u0443\u0433\u0438\u043c, \u0442\u0430\u043a \u0447\u0442\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c\u0441\u044f.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e \u043b\u043e\u0433\u0438\u043a\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u0442 Cmd + N \u043d\u0430 \u043a\u0430\u043a\u043e\u043c-\u0442\u043e \u0444\u0430\u0439\u043b\u0435 \u0438\u043b\u0438 package-\u0435 \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u0430\u043a\u043e\u0433\u043e-\u0442\u043e \u043c\u043e\u0434\u0443\u043b\u044f. \u0418\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043c \u043c\u044b \u0438 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0430\u0447\u043a\u0443 \u0444\u0430\u0439\u043b\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u044b. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c, \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u0430\u043a\u043e\u0433\u043e \u0436\u0435 \u043c\u043e\u0434\u0443\u043b\u044f \u0438 \u043a\u0430\u043a\u043e\u0439 \u043f\u0430\u043f\u043a\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c.<\/p>\n<p>  <\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c\u0438 AnActionEvent-\u0430.<\/p>\n<p>  <\/p>\n<pre><code class=\"kotlin\">val dataContext = e.dataContext  val module = LangDataKeys.MODULE.getData(dataContext)!!  var targetDirectory = CommonDataKeys.VIRTUAL_FILE.getData(dataContext) if (targetDirectory != null &amp;&amp; targetDirectory.isDirectory.not()) {     \/\/ If the user selected a simulated folder entry (eg &quot;Manifests&quot;), there will be no target directory     targetDirectory = targetDirectory.parent } targetDirectory!!<\/code><\/pre>\n<p>  <\/p>\n<p>\u041a\u0430\u043a \u044f \u0443\u0436\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b \u0432 \u0441\u0432\u043e\u0435\u0439 <a href=\"https:\/\/habr.com\/ru\/company\/hh\/blog\/463583\/\">\u0441\u0442\u0430\u0442\u044c\u0435 \u0441 \u0442\u0435\u043e\u0440\u0438\u0435\u0439 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f<\/a>, AnActionEvent \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0432\u0430\u0448\u0435\u0433\u043e Action-\u0430. \u0412\u043d\u0443\u0442\u0440\u0438 \u044d\u0442\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e dataContext, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u043a\u043b\u044e\u0447\u0435\u0439 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0434\u043e\u0441\u0442\u0430\u0432\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435. \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u0435\u0449\u0451 \u043a\u043b\u044e\u0447\u0438 \u0435\u0441\u0442\u044c, \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043a\u043b\u0430\u0441\u0441\u044b PlatformDataKeys, LangDataKeys \u0438 \u0434\u0440\u0443\u0433\u0438\u0435. \u041a\u043b\u044e\u0447 LangDataKeys.MODULE \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043d\u0430\u043c \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043c\u043e\u0434\u0443\u043b\u044c, \u0430 CommonDataKeys.VIRTUAL_FILE \u2013 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c \u0432 Project View \u0444\u0430\u0439\u043b. \u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0439 \u0438 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e, \u0432\u043d\u0443\u0442\u0440\u044c \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0444\u0430\u0439\u043b\u044b. <\/p>\n<p>  <\/p>\n<pre><code class=\"kotlin\">val facet = AndroidFacet.getInstance(module)<\/code><\/pre>\n<p>  <\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0434\u0432\u0438\u0433\u0430\u0442\u044c\u0441\u044f \u0434\u0430\u043b\u044c\u0448\u0435, \u043d\u0430\u043c \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043e\u0431\u044a\u0435\u043a\u0442 AndroidFacet. <a href=\"https:\/\/www.jetbrains.org\/intellij\/sdk\/docs\/reference_guide\/project_model\/facet.html\">Facet<\/a> \u2014 \u044d\u0442\u043e, \u043f\u043e \u0441\u0443\u0442\u0438, \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u043c\u043e\u0434\u0443\u043b\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0438\u043b\u0438 \u0438\u043d\u043e\u0433\u043e \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u043e\u0435 \u0434\u043b\u044f Android \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043d\u0430\u0448\u0435\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f. \u0418\u0437 facet-\u0430 \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, package name, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u0432 AndroidManifest.xml \u0432\u0430\u0448\u0435\u0433\u043e android-\u043c\u043e\u0434\u0443\u043b\u044f.<\/p>\n<p>  <\/p>\n<pre><code class=\"kotlin\">val moduleTemplates = facet.getModuleTemplates(targetDirectory) assert(moduleTemplates.isNotEmpty())  val initialPackageSuggestion = facet.getPackageForPath(moduleTemplates, targetDirectory).orEmpty()<\/code><\/pre>\n<p>  <\/p>\n<p>\u0418\u0437 facet-\u0430 \u043c\u044b \u0434\u043e\u0441\u0442\u0430\u0451\u043c \u043e\u0431\u044a\u0435\u043a\u0442 <a href=\"https:\/\/cs.android.com\/android-studio\/platform\/tools\/adt\/idea\/+\/mirror-goog-studio-master-dev:project-system\/src\/com\/android\/tools\/idea\/projectsystem\/NamedModuleTemplate.kt\">NamedModuleTemplate<\/a> \u2013 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0434\u043b\u044f \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u201c\u043f\u0443\u0442\u0435\u0439\u201d android-\u043c\u043e\u0434\u0443\u043b\u044f: \u043f\u0443\u0442\u044c \u0434\u043e \u043f\u0430\u043f\u043a\u0438 \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c, \u043f\u0430\u043f\u043a\u0438 \u0441 \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c\u0438, \u0442\u0435\u0441\u0442\u0430\u043c\u0438 \u0438 \u0442.\u0434. \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u044d\u0442\u043e\u043c\u0443 \u043e\u0431\u044a\u0435\u043a\u0442\u0443 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0438 package name \u0434\u043b\u044f \u043f\u043e\u0434\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0432 \u0431\u0443\u0434\u0443\u0449\u0438\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u043a\u043e\u0434\u0430.<\/p>\n<p>  <\/p>\n<pre><code class=\"kotlin\">val renderModel = RenderTemplateModel.fromFacet(     facet,     initialPackageSuggestion,     moduleTemplates[0],     &quot;MyActionCommandName&quot;,     ProjectSyncInvoker.DefaultProjectSyncInvoker(),     true, ).apply {     newTemplate = template { ... } \/\/ build your template }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u0441\u0435 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0431\u044b\u043b\u0438 \u043d\u0443\u0436\u043d\u044b \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0431\u0443\u0434\u0443\u0449\u0435\u0433\u043e \u0434\u0438\u0430\u043b\u043e\u0433\u0430 \u2014 \u0435\u0433\u043e \u043c\u043e\u0434\u0435\u043b\u044c, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u0443\u044e \u043a\u043b\u0430\u0441\u0441\u043e\u043c <a href=\"https:\/\/cs.android.com\/android-studio\/platform\/tools\/adt\/idea\/+\/mirror-goog-studio-master-dev:android\/src\/com\/android\/tools\/idea\/npw\/model\/RenderTemplateModel.kt\">RenderTemplateModel<\/a>. \u041a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u044d\u0442\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f:<\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/cs.android.com\/android-studio\/platform\/tools\/adt\/idea\/+\/mirror-goog-studio-master-dev:android-common\/src\/org\/jetbrains\/android\/facet\/AndroidFacet.java\">AndroidFacet<\/a> \u043c\u043e\u0434\u0443\u043b\u044f, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0444\u0430\u0439\u043b\u044b;<\/li>\n<li>\u043f\u0435\u0440\u0432\u044b\u0439 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e package name (\u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u0445 \u0448\u0430\u0431\u043b\u043e\u043d\u0430);<\/li>\n<li>\u043e\u0431\u044a\u0435\u043a\u0442, \u0445\u0440\u0430\u043d\u044f\u0449\u0438\u0439 \u043f\u0443\u0442\u0438 \u043a \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u043c \u043f\u0430\u043f\u043a\u0430\u043c \u043c\u043e\u0434\u0443\u043b\u044f, \u2014 <a href=\"https:\/\/cs.android.com\/android-studio\/platform\/tools\/adt\/idea\/+\/mirror-goog-studio-master-dev:project-system\/src\/com\/android\/tools\/idea\/projectsystem\/NamedModuleTemplate.kt\">NamedModuleTemplate<\/a>;<\/li>\n<li>\u0441\u0442\u0440\u043e\u043a\u043e\u0432\u0443\u044e \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0443 \u0434\u043b\u044f \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 <a href=\"https:\/\/cs.android.com\/android\/platform\/superproject\/+\/master:tools\/idea\/platform\/core-api\/src\/com\/intellij\/openapi\/command\/WriteCommandAction.java\">WriteCommandAction<\/a> (\u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 IDEA, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u0439 \u0434\u043b\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043a\u043e\u0434\u0430) \u2013 \u043e\u043d\u0430 \u043d\u0443\u0436\u043d\u0430 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0443 \u0432\u0430\u0441 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u043b Undo;<\/li>\n<li>\u043e\u0431\u044a\u0435\u043a\u0442, \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0449\u0438\u0439 \u0437\u0430 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u044e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043f\u043e\u0441\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432, \u2014 <a href=\"https:\/\/cs.android.com\/android-studio\/platform\/tools\/adt\/idea\/+\/mirror-goog-studio-master-dev:android\/src\/com\/android\/tools\/idea\/npw\/model\/ProjectSyncInvoker.kt\">ProjectSyncInvoker<\/a>;<\/li>\n<li>\u0438, \u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u0444\u043b\u0430\u0433 \u2014 true \u0438\u043b\u0438 false, \u2014 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0442\u043e, \u043c\u043e\u0436\u043d\u043e \u043b\u0438 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0432 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0435 \u043a\u043e\u0434\u0430 \u0438\u043b\u0438 \u043d\u0435\u0442.<\/li>\n<\/ul>\n<p>  <\/p>\n<pre><code class=\"kotlin\">val configureTemplateStep = ConfigureTemplateParametersStep(     model = renderModel,     title = &quot;Template name&quot;,     templates = moduleTemplates )  val wizard = ModelWizard.Builder()     .addStep(configureTemplateStep)     .build().apply {         val resultListener = object : ModelWizard.WizardListener {                override fun onWizardFinished(result: ModelWizard.WizardResult) {                        super.onWizardFinished(result)                        if (result.isFinished) {                                \/\/ TODO do some stuff after creating files                    \/\/   (renderTemplateModel.createdFiles)                        }                }      } }  val dialog = StudioWizardDialogBuilder(wizard, &quot;Template wizard&quot;)             .setProject(e.project!!)             .build() dialog.show()<\/code><\/pre>\n<p>  <\/p>\n<p>\u0424\u0438\u043d\u0430\u043b! <\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u0435\u043c <a href=\"https:\/\/cs.android.com\/android-studio\/platform\/tools\/adt\/idea\/+\/mirror-goog-studio-master-dev:android\/src\/com\/android\/tools\/idea\/npw\/template\/ConfigureTemplateParametersStep.kt\">ConfigureTemplateParametersStep<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 template-\u0430 \u0438 \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442 UI \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b wizard-\u0434\u0438\u0430\u043b\u043e\u0433\u0430, \u043f\u043e\u0442\u043e\u043c \u043f\u0440\u043e\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u043c step \u0432 \u043c\u043e\u0434\u0435\u043b\u044c Wizard-\u0434\u0438\u0430\u043b\u043e\u0433\u0430 \u0438 \u043d\u0430\u043a\u043e\u043d\u0435\u0446-\u0442\u043e \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0441\u0430\u043c \u0434\u0438\u0430\u043b\u043e\u0433.<\/p>\n<p>  <\/p>\n<p>\u0410 \u0435\u0449\u0451 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 listener \u043d\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0434\u0438\u0430\u043b\u043e\u0433\u0430, \u0442\u0430\u043a \u0447\u0442\u043e \u043f\u043e\u0441\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432 \u043c\u043e\u0436\u0435\u043c \u0435\u0449\u0451 \u0438 \u043a\u0430\u043a-\u0442\u043e \u0438\u0445 \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c. \u0414\u043e\u0441\u0442\u0443\u0447\u0430\u0442\u044c\u0441\u044f \u0434\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u0447\u0435\u0440\u0435\u0437 renderTemplateModel.createdFiles.<\/p>\n<p>  <\/p>\n<p>\u0421\u0430\u043c\u043e\u0435 \u0441\u043b\u043e\u0436\u043d\u043e\u0435 \u2013 \u043f\u043e\u0437\u0430\u0434\u0438! \u041c\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0438 \u0434\u0438\u0430\u043b\u043e\u0433, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u0437\u044f\u043b \u043d\u0430 \u0441\u0435\u0431\u044f \u0440\u0430\u0431\u043e\u0442\u0443 \u043f\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044e UI \u0438\u0437 \u043c\u043e\u0434\u0435\u043b\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0440\u0435\u0446\u0435\u043f\u0442\u0430 \u0432\u043d\u0443\u0442\u0440\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u0430. <\/p>\n<p>  <\/p>\n<p>\u041e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0442\u043a\u0443\u0434\u0430-\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u0430\u043c \u0448\u0430\u0431\u043b\u043e\u043d. \u0418 \u0440\u0435\u0446\u0435\u043f\u0442. <\/p>\n<p>  <\/p>\n<h2 id=\"otkuda-vzyat-model-shablona\">\u041e\u0442\u043a\u0443\u0434\u0430 \u0432\u0437\u044f\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u0448\u0430\u0431\u043b\u043e\u043d\u0430<\/h2>\n<p>  <\/p>\n<p>\u0418\u0441\u0445\u043e\u0434\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u044f \u0440\u0435\u0448\u0430\u043b \u2013 \u0434\u0430\u0442\u044c \u043a\u043e\u043b\u043b\u0435\u0433\u0430\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u043d\u0435 \u0432 \u0432\u0438\u0434\u0435 \u043a\u043e\u0434\u0430, \u0430 \u0432 \u0432\u0438\u0434\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u043d\u0435 \u0431\u044b\u043b \u043d\u0443\u0436\u0435\u043d \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f \u043f\u043e\u0442\u043e\u043c \u0441\u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u0443\u044e \u0432 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 Android Studio \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0434\u0438\u0430\u043b\u043e\u0433\u0430. <\/p>\n<p>  <\/p>\n<p>\u041c\u043d\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u0441\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u2013 \u044d\u0442\u043e yaml-\u043a\u043e\u043d\u0444\u0438\u0433. \u041f\u043e\u0447\u0435\u043c\u0443 \u0438\u043c\u0435\u043d\u043d\u043e yaml? \u041f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e: \u0430) \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043f\u0440\u043e\u0449\u0435 XML, \u0438 \u0431) \u0432\u043d\u0443\u0442\u0440\u0438 IDEA \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u0447\u043a\u0430 \u0434\u043b\u044f \u0435\u0433\u043e \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 \u2013 <a href=\"https:\/\/bitbucket.org\/asomov\/snakeyaml\/src\/master\/\">SnakeYaml<\/a>, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0430\u044f \u0432 \u043e\u0434\u043d\u0443 \u0441\u0442\u0440\u043e\u0447\u043a\u0443 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432\u0435\u0441\u044c \u0444\u0430\u0439\u043b \u0432 <em>Map&lt;String, Any&gt;<\/em>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u0434\u0430\u043b\u044c\u0448\u0435 \u043a\u0440\u0443\u0442\u0438\u0442\u044c \u043a\u0430\u043a \u0443\u0433\u043e\u0434\u043d\u043e. <\/p>\n<p>  <\/p>\n<p>\u0412 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043a\u043e\u043d\u0444\u0438\u0433 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">yaml-\u043a\u043e\u043d\u0444\u0438\u0433 \u0448\u0430\u0431\u043b\u043e\u043d\u0430<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"plaintext\">requiredParams:   name: HeadHunter BaseFragment   description: Creates HeadHunter BaseFragment  optionalParams:   revision: 1   category: fragment   formFactor: mobile   constraints:     - kotlin   screens:     - fragment_gallery     - menu_entry   minApi: 7   minBuildApi: 8  widgets:   - stringParameter:       id: className       name: Fragment Name       help: The name of the fragment class to create       constraints:         - class         - nonempty         - unique       default: BlankFragment    - stringParameter:       id: fragmentName       name: Fragment Layout Name       help: The name of the layout to create       constraints:         - layout         - nonempty         - unique       default: fragment_blank       suggest: fragment_${className.classToResource()}    - booleanParameter:       id: includeFactory       name: Include fragment factory method?       help: Generate static fragment factory method for easy instantiation       default: true    - booleanParameter:       id: includeModule       name: Include Toothpick Module class?       help: Generate fragment Toothpick Module for easy instantiation       default: true    - stringParameter:       id: moduleName       name: Fragment Toothpick Module       help: The name of the Fragment Toothpick Module to create       constraints:         - class         - nonempty         - unique       default: BlankModule       visibility: ${includeModule}       suggest: ${className.classToResource().underlinesToCamelCase()}Module  recipe:   - instantiateAndOpen:       from: root\/src\/app_package\/BlankFragment.kt.ftl       to: ${srcOut}\/${className}.kt   - instantiateAndOpen:       from: root\/res\/layout\/fragment_blank.xml.ftl       to: ${resOut}\/layout\/${fragmentName}.xml   - predicate:       validIf: ${includeModule}       commands:         - instantiateAndOpen:             from: root\/src\/app_package\/BlankModule.kt.ftl             to: ${srcOut}\/di\/${moduleName}.kt<\/code><\/pre>\n<\/div><\/div>\n<p>  <\/p>\n<p>\u0412\u0441\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0434\u0435\u043b\u0438\u0442\u0441\u044f \u043d\u0430 4 \u0441\u0435\u043a\u0446\u0438\u0438:<\/p>\n<p>  <\/p>\n<ul>\n<li>requiredParams \u2013 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0430;<\/li>\n<li>optionalParams \u2013 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u043f\u043e\u043a\u043e\u0439\u043d\u043e \u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u0440\u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u0430. \u0412 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u044d\u0442\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043d\u0438 \u043d\u0430 \u0447\u0442\u043e \u043d\u0435 \u0432\u043b\u0438\u044f\u044e\u0442, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043c\u044b \u043d\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0430 \u0448\u0430\u0431\u043b\u043e\u043d \u0447\u0435\u0440\u0435\u0437 extension point. <\/li>\n<li>widgets \u2013 \u043d\u0430\u0431\u043e\u0440 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u0432\u0438\u0441\u044f\u0442 \u043e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0432\u0432\u043e\u0434\u0430. \u041a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u044d\u0442\u0438\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0432 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c \u0438\u0442\u043e\u0433\u0435 \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u0441\u044f \u0432 \u0432\u0438\u0434\u0436\u0435\u0442 \u043d\u0430 UI \u0434\u0438\u0430\u043b\u043e\u0433\u0430 (textField-\u044b, checkbox-\u044b \u0438 \u0442.\u043f.); <\/li>\n<li>recipe \u2013 \u043d\u0430\u0431\u043e\u0440 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442 \u0432\u0441\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0448\u0430\u0431\u043b\u043e\u043d\u0430.<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043c\u043d\u043e\u044e \u043f\u043b\u0430\u0433\u0438\u043d \u043f\u0430\u0440\u0441\u0438\u0442 \u044d\u0442\u043e\u0442 \u043a\u043e\u043d\u0444\u0438\u0433, \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u0435\u0433\u043e \u0432 \u043e\u0431\u044a\u0435\u043a\u0442 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 Android Studio \u0438 \u043f\u0440\u043e\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u0442 \u0432 RenderTemplateModel. <\/p>\n<p>  <\/p>\n<p>\u0412 \u0441\u0430\u043c\u043e\u0439 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u0438 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435 \u0431\u044b\u043b\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0433\u043e \u043a\u0440\u043e\u043c\u0435 \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 \u201c\u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439\u201d. \u042f \u0438\u043c\u0435\u044e \u0432 \u0432\u0438\u0434\u0443 \u0441\u0442\u0440\u043e\u0447\u043a\u0438 \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0433\u043e \u0432\u0438\u0434\u0430:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">suggest: ${className.classToResource().underlinesToCamelCase()}Module<\/code><\/pre>\n<p>  <\/p>\n<p>\u041d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u044d\u0442\u0443 \u0441\u0442\u0440\u043e\u0447\u043a\u0443, \u043f\u043e\u043d\u044f\u0442\u044c, \u0435\u0441\u0442\u044c \u043b\u0438 \u0432 \u043d\u0435\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u0430\u043a\u0438\u0445-\u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445, \u043f\u0440\u043e\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u043b\u0438 \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043d\u0430\u0434 \u044d\u0442\u0438\u043c\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438. \u042f \u043d\u0435 \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u043b \u043d\u0438\u0447\u0435\u0433\u043e \u043b\u0443\u0447\u0448\u0435, \u0447\u0435\u043c \u043f\u0430\u0440\u0441\u0438\u043d\u0433 \u0442\u0430\u043a\u0438\u0445 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434:<\/p>\n<p>  <\/p>\n<pre><code class=\"kotlin\">sealed class Command {      data class Fixed(         val value: String     ) : Command()      data class Dynamic(         val parameterId: String,         val modifiers: List&lt;GeminioRecipeExpressionModifier&gt;     ) : Command()      data class SrcOut(         val modifiers: List&lt;GeminioRecipeExpressionModifier&gt;     ) : Command()      data class ResOut(         val modifiers: List&lt;GeminioRecipeExpressionModifier&gt;     ) : Command()      object ReturnTrue : Command()      object ReturnFalse : Command()  }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041a\u0430\u0436\u0434\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0437\u043d\u0430\u0435\u0442, \u043a\u0430\u043a \u0441\u0435\u0431\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c, \u043a\u0430\u043a\u043e\u0439 \u043e\u043d\u0430 \u0432\u043d\u0435\u0441\u0451\u0442 \u0432\u043a\u043b\u0430\u0434 \u0432 \u0438\u0442\u043e\u0433\u043e\u0432\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u044b\u0439 \u0432 \u0442\u043e\u043c \u0438\u043b\u0438 \u0438\u043d\u043e\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0435. \u041d\u0430\u0434 \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u043e\u043c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0441\u0438\u0434\u0435\u0442\u044c: \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u044f \u0445\u043e\u0442\u0435\u043b \u0432\u044b\u0446\u0435\u043f\u0438\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u043a\u0443\u0441\u043e\u0447\u043a\u0438 ${&#8230;} \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043e\u043a, \u043d\u043e \u0432\u044b \u0436\u0435 \u0437\u043d\u0430\u0435\u0442\u0435, \u0435\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0440\u0435\u0448\u0438\u0442\u044c \u043a\u0430\u043a\u0443\u044e-\u0442\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439, \u0442\u043e \u0443 \u0432\u0430\u0441 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0435\u0449\u0451 \u043e\u0434\u043d\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430. \u0412 \u0438\u0442\u043e\u0433\u0435 \u044f \u0440\u0430\u0441\u043f\u0430\u0440\u0441\u0438\u043b \u0441\u0442\u0440\u043e\u0447\u043a\u0443 \u043f\u043e\u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u043e.<\/p>\n<p>  <\/p>\n<p>\u0427\u0442\u043e \u0435\u0449\u0451 \u0445\u043e\u0440\u043e\u0448\u043e \u0432 \u0441\u0432\u043e\u0451\u043c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0430 \u2013 \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u043a\u043b\u044e\u0447\u0438 \u0438 \u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043d\u0430 \u043d\u0438\u0445 \u0441\u0432\u043e\u044e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u043b\u043e\u0433\u0438\u043a\u0443. \u0422\u0430\u043a, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u043d\u043e\u0432\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0434\u043b\u044f \u0440\u0435\u0446\u0435\u043f\u0442\u043e\u0432 \u2013 instantiateAndOpen, \u2014 \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u0444\u0430\u0439\u043b \u0438\u0437 \u0442\u0435\u043a\u0441\u0442\u0430 ftl-\u0448\u0430\u0431\u043b\u043e\u043d\u0430, \u0430 \u043f\u043e\u0442\u043e\u043c \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0432 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0435 \u043a\u043e\u0434\u0430. \u0414\u0430-\u0434\u0430, \u0432 FreeMarker-\u043d\u044b\u0445 \u0448\u0430\u0431\u043b\u043e\u043d\u0430\u0445 \u0443\u0436\u0435 \u0431\u044b\u043b\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b instantiate \u0438 open, \u043d\u043e \u044d\u0442\u043e \u0431\u044b\u043b\u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b. <\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">recipe:   # \u041c\u043e\u0436\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u0432\u043e\u0442 \u0442\u0430\u043a   - instantiate:       from: root\/src\/app_package\/BlankFragment.kt.ftl       to: ${srcOut}\/${className}.kt   - open:       file: ${srcOut}\/${className}.kt    # \u0410 \u043c\u043e\u0436\u043d\u043e \u043e\u0434\u043d\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:   - instantiateAndOpen:       from: root\/src\/app_package\/BlankFragment.kt.ftl       to: ${srcOut}\/${className}.kt<\/code><\/pre>\n<p>  <\/p>\n<h2 id=\"kakie-eschyo-est-plyusy-v-geminio\">\u041a\u0430\u043a\u0438\u0435 \u0435\u0449\u0451 \u0435\u0441\u0442\u044c \u043f\u043b\u044e\u0441\u044b \u0432 Geminio<\/h2>\n<p>  <\/p>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043f\u043b\u044e\u0441 \u2013 \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0432\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u043f\u0430\u043f\u043a\u0443 \u0434\u043b\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0441 \u0440\u0435\u0446\u0435\u043f\u0442\u043e\u043c \u0432\u043d\u0443\u0442\u0440\u0438, \u0438 Android Studio \u0441\u043e\u0437\u0434\u0430\u043b\u0430 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0430 Action, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043a\u0430\u043a \u0443\u0433\u043e\u0434\u043d\u043e \u043c\u0435\u043d\u044f\u0442\u044c \u0432\u0430\u0448 \u0440\u0435\u0446\u0435\u043f\u0442 \u0438 \u0444\u0430\u0439\u043b\u044b \u0441 \u0448\u0430\u0431\u043b\u043e\u043d\u0430\u043c\u0438 \u043a\u043e\u0434\u0430. \u0412\u0441\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u0441\u044f \u0441\u0440\u0430\u0437\u0443 \u0436\u0435, \u0432\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c IDE \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d. \u0422\u043e \u0435\u0441\u0442\u044c \u0446\u0438\u043a\u043b \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0441\u0442\u0430\u043b \u0432 \u0440\u0430\u0437\u044b \u043a\u043e\u0440\u043e\u0447\u0435. <\/p>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0431\u044b \u0432\u044b \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b\u0438 \u0448\u0430\u0431\u043b\u043e\u043d \u0438\u0437 \u043f\u043b\u0430\u0433\u0438\u043d\u0430, \u0442\u043e \u0432\u044b \u0431\u044b \u043d\u0435 \u0438\u0437\u0431\u0435\u0436\u0430\u043b\u0438 \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u043e\u043c IDE \u2013 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0432\u0430\u0448 \u0448\u0430\u0431\u043b\u043e\u043d \u0431\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b. <\/p>\n<p>  <\/p>\n<h2 id=\"roadmap\">Roadmap<\/h2>\n<p>  <\/p>\n<p>\u042f \u0431\u044b\u043b \u0431\u044b \u0440\u0430\u0434 \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u0443\u0436\u0435 \u0441\u0435\u0439\u0447\u0430\u0441 \u043f\u043b\u0430\u0433\u0438\u043d \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u0438 \u0443 FreeMarker-\u043d\u044b\u0445 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432, \u043d\u043e\u2026 \u043d\u0435\u0442. \u0414\u0430\u043b\u0435\u043a\u043e \u043d\u0435 \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043d\u0443\u0436\u043d\u044b \u043f\u0440\u044f\u043c\u043e \u0441\u0435\u0439\u0447\u0430\u0441, \u0430 \u0434\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u044b \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043e\u0431\u0435\u0440\u0451\u043c\u0441\u044f \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u043d\u0435\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 enum-\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u043b\u0438\u0441\u044c \u043d\u0430 UI \u0432 \u0432\u0438\u0434\u0435 combobox-\u043e\u0432;<\/li>\n<li>\u043d\u0435 \u0432\u0441\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0438\u0437 FreeMarker-\u043d\u044b\u0445 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u0440\u0435\u0446\u0435\u043f\u0442\u0430\u0445 \u2013 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0435\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0432 build.gradle, merge-\u0430 XML-\u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432;<\/li>\n<li>\u043d\u043e\u0432\u044b\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u0441\u0442\u0440\u0430\u0434\u0430\u044e\u0442 \u043e\u0442 \u0442\u043e\u0439 \u0436\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b, \u0447\u0442\u043e \u0438 FreeMarker-\u043d\u044b\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u2013 \u043d\u0435\u0442 \u0430\u0434\u0435\u043a\u0432\u0430\u0442\u043d\u043e\u0439 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u044b \u0442\u043e\u0447\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u043b\u0430, \u0433\u0434\u0435 \u0438\u043c\u0435\u043d\u043d\u043e \u0441\u043b\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u043e\u0448\u0438\u0431\u043a\u0430;<\/li>\n<li>\u0438 \u043d\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043e\u043a IDE \u043f\u0440\u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u0430.<\/li>\n<\/ul>\n<p>  <\/p>\n<h2 id=\"zaklyuchenie\">\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>  <\/p>\n<p>\u0417\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u043e \u043d\u0430 \u043f\u043e\u0437\u0438\u0442\u0438\u0432\u043d\u043e\u0439 \u043d\u043e\u0442\u0435. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u043e\u0442 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0437\u0438\u0442\u0438\u0432\u0430:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e Google \u043f\u0440\u0435\u043a\u0440\u0430\u0442\u0438\u043b \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 FreeMarker-\u043d\u044b\u0445 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432, \u043c\u044b \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u0442\u043e\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0448\u0430\u0431\u043b\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0438<\/li>\n<li>\u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432 \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0432 \u043d\u0430\u0448\u0435\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438;<\/li>\n<li>\u044f \u0431\u0443\u0434\u0443 \u0440\u0430\u0434 \u0432\u0430\u0448\u0438\u043c \u0432\u043e\u043f\u0440\u043e\u0441\u0430\u043c \u0438 \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u043d\u0430 \u043d\u0438\u0445 \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c.<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0412\u0441\u0435\u043c \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438.<\/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:\/\/github.com\/hhru\/android-multimodule-plugin\/tree\/master\/plugins\/hh-geminio\">\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 Geminio<\/a> \u0438 \u0435\u0433\u043e <a href=\"https:\/\/github.com\/hhru\/android-multimodule-plugin\/blob\/master\/distr\/hh-geminio.zip\">\u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432<\/a><\/li>\n<li><a href=\"https:\/\/cs.android.com\/android-studio\">\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 Android Studio<\/a> \u0438 \u043a\u043e\u0434 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 <a href=\"https:\/\/cs.android.com\/android-studio\/platform\/tools\/base\/+\/mirror-goog-studio-master-dev:wizard\/template-impl\/src\/com\/android\/tools\/idea\/wizard\/template\/impl\/\">\u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/company\/redmadrobot\/blog\/274897\/\">\u0421\u0442\u0430\u0442\u044c\u044f \u043e\u0442 RedMadRobot<\/a> \u043f\u0440\u043e FreeMarker-\u043d\u044b\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u044b<\/li>\n<li><a href=\"https:\/\/steewsc.medium.com\/template-plugin-for-android-studio-4-1-92dcbc689d39\">\u0421\u0442\u0430\u0442\u044c\u044f \u043d\u0430 Medium<\/a> \u043f\u0440\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u0438\u0437\u043d\u0443\u0442\u0440\u0438 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432<\/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\/company\/hh\/blog\/529948\/\"> https:\/\/habr.com\/ru\/company\/hh\/blog\/529948\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ue\/ul\/tc\/ueultcu9h6_imr6b0x6kdrl-nxq.jpeg\"><\/p>\n<p>  <\/p>\n<p>\u041d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 Android Studio 4.1, Google \u043f\u0440\u0435\u043a\u0440\u0430\u0442\u0438\u043b \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0445 FreeMarker-\u043d\u044b\u0445 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432. \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 <a href=\"https:\/\/vgtimes.ru\/uploads\/posts\/2020-06\/67229_16_9.jpg\">\u043f\u0440\u043e\u0441\u0442\u043e \u0432\u0437\u044f\u0442\u044c \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c<\/a> \u0441\u0432\u043e\u0438 ftl-\u0444\u0430\u0439\u043b\u044b \u0438 \u0441\u043b\u043e\u0436\u0438\u0442\u044c \u0438\u0445 \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u0443\u044e \u043f\u0430\u043f\u043a\u0443, \u0447\u0442\u043e\u0431\u044b Android Studio \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0430 \u0438\u0445 \u0432 \u043c\u0435\u043d\u044e New \u2192 Other. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u044b \u043d\u0430\u043c \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0442 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0438 \u0438 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u0438\u0437\u043d\u0443\u0442\u0440\u0438 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432 IDEA. \u041d\u0430\u0441 \u0432 hh \u0442\u0430\u043a\u0430\u044f \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0443\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442, \u0442\u0430\u043a \u043a\u0430\u043a \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 FreeMarker-\u043d\u044b\u0445 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u043d\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u0434\u0430\u044e\u0442\u0441\u044f \u0432 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f\u0445. \u041b\u0435\u0437\u0442\u044c \u0432 \u043f\u043b\u0430\u0433\u0438\u043d\u044b, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0448\u0430\u0431\u043b\u043e\u043d? \u041d\u0435\u0442 \u0443\u0436, \u0443\u0432\u043e\u043b\u044c\u0442\u0435.\u00a0<\/p>\n<p>  <\/p>\n<p>\u0412\u0441\u0451 \u044d\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u043b\u043e \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043c\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u043b\u0430\u0433\u0438\u043d \u0434\u043b\u044f Android Studio, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0440\u0435\u0448\u0438\u0442\u044c \u044d\u0442\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b. \u0412\u0441\u0442\u0440\u0435\u0447\u0430\u0439\u0442\u0435 \u2013 <strong>Geminio<\/strong>.<\/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-313813","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/313813","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=313813"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/313813\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=313813"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=313813"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=313813"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}