{"id":376758,"date":"2024-05-22T09:00:57","date_gmt":"2024-05-22T09:00:57","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=376758"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2024-05-22T09:00:57","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=376758","title":{"rendered":"<span>\u041f\u0438\u0448\u0435\u043c plugin \u0434\u043b\u044f Jetbrains IDE: \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u043e\u0432 \u0432\u043d\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0432 Project Tool<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/0cb\/ea2\/d64\/0cbea2d649543b1e0e9e8dc04c1629e9.jpg\" width=\"1600\" height=\"900\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/0cb\/ea2\/d64\/0cbea2d649543b1e0e9e8dc04c1629e9.jpg\" data-blurred=\"true\"\/><\/figure>\n<p>\u0414\u043e\u0431\u0440\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u0443\u0442\u043e\u043a, \u0434\u043e\u0440\u043e\u0433\u043e\u0439 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044c. \u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u041c\u0438\u0445\u0430\u0438\u043b, \u044f Android-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0432 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0426\u0438\u0430\u043d. \u042d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0451\u0439 \u044f \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u044e \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u0446\u0438\u043a\u043b \u0441\u0442\u0430\u0442\u0435\u0439 \u043f\u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0439 \u043a\u0443\u0445\u043d\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432 \u0434\u043b\u044f Jetbrains IDE: IDEA, Android Studio (AS) \u0438 \u043f\u0440. \u041d\u0430 \u0434\u0432\u043e\u0440\u0435 2024 \u0433\u043e\u0434, \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043d\u0435 \u0442\u0430\u043a \u0431\u043e\u0433\u0430\u0442\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439, \u043a\u0430\u043a \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b. \u041d\u043e \u0435\u0441\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043c\u0435\u043b\u043e \u043c\u043e\u0436\u043d\u043e \u0434\u0435\u0440\u0431\u0430\u043d\u0438\u0442\u044c. \u0412 \u044d\u0442\u043e\u043c \u0446\u0438\u043a\u043b\u0435 \u0441\u0442\u0430\u0442\u0435\u0439 \u044f \u0431\u0443\u0434\u0443 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u043e\u043f\u044b\u0442 \u043f\u043e\u0438\u0441\u043a\u0430 \u043d\u0443\u0436\u043d\u043e\u0439 \u043c\u043d\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0438 \u0435\u0451 \u0440\u0430\u0437\u0431\u043e\u0440.<\/p>\n<p>\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c\u0441\u044f \u0441 \u0442\u0435\u043c, \u043a\u0430\u043a \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u043d\u0435 \u0438\u0437 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0432 project tool.\u00a0<\/p>\n<p>\u042f \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0441\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u00abGroup File Template \u200b(GFT)<em>\u200b<\/em>\u00bb<em>, <\/em><a href=\"https:\/\/plugins.jetbrains.com\/plugin\/16836-group-file-template-gft-\"><u>GFT \u043d\u0430 Market<\/u><\/a>, <a href=\"https:\/\/github.com\/Louco11\/Group-File-Template-GFT\"><u>GitHub<\/u><\/a> \u0412 \u0441\u0432\u043e\u0435\u0439 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 <a href=\"https:\/\/habr.com\/ru\/companies\/cian\/articles\/740928\/\"><u>\u0441\u0442\u0430\u0442\u044c\u0435<\/u><\/a> \u044f \u043e\u043f\u0438\u0441\u0430\u043b, \u043a\u0430\u043a \u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f. \u0412\u0435\u0441\u044c \u043c\u043e\u0439 \u043e\u043f\u044b\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043f\u043b\u0430\u0433\u0438\u043d\u0430\u043c\u0438 \u043a\u0440\u0443\u0442\u0438\u0442\u0441\u044f \u0432\u043e\u043a\u0440\u0443\u0433 \u043d\u0435\u0433\u043e. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u0441\u0432\u043e\u0451\u043c \u0431\u043b\u043e\u0433\u0435 \u0431\u0443\u0434\u0443 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c, \u043a\u0430\u043a \u044f \u0434\u0435\u043b\u0430\u043b \u0442\u043e\u0442 \u0438\u043b\u0438 \u0438\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u044d\u0442\u043e\u0433\u043e \u043f\u043b\u0430\u0433\u0438\u043d\u0430.<\/p>\n<p>\u0418\u0442\u0430\u043a, \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c. \u041f\u043b\u0430\u0433\u0438\u043d GFT \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u043a\u0430\u043a Android-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a. \u0427\u0442\u043e \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442? \u042f \u0440\u0430\u0431\u043e\u0442\u0430\u044e \u0441 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043b\u0435\u0436\u0438\u0442 \u0432 \u043e\u0434\u043d\u043e\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u2014 \u0432 \u043d\u0451\u043c \u043f\u0438\u0448\u0443\u0442 \u0441\u0432\u043e\u0439 \u043a\u043e\u0434 \u0432\u0441\u0435 Android-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438. \u041c\u044b \u0432\u0441\u0435 \u0438\u043c\u0435\u0435\u043c \u043e\u0434\u043d\u0443 \u0442\u043e\u0447\u043a\u0443 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u2014 \u0432\u0435\u0442\u043a\u0443 <strong>develop<\/strong>. \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u043f\u0440\u0438 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u043c <strong>develop<\/strong> \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0438\u043c\u0435\u0435\u0442 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u0434\u043b\u044f GFT.<\/p>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0432 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u043f\u043e \u043f\u043b\u0430\u0433\u0438\u043d\u0443, \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u0447\u0442\u043e \u0435\u0433\u043e \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u044e\u0442 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f AS, \u043d\u043e \u0438 \u0434\u043b\u044f \u0434\u0440\u0443\u0433\u0438\u0445 Jetbrains IDE.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f82\/cad\/c2a\/f82cadc2a5f3f9db0adc55d9636f5c16.webp\" width=\"720\" height=\"380\"\/><\/figure>\n<p>\u0422\u0430\u043a\u0438\u0445 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0439 \u043d\u0435\u043c\u043d\u043e\u0433\u043e, \u043d\u043e \u0438 \u043f\u043b\u0430\u0433\u0438\u043d \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0439 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439. \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0443 \u0432\u0430\u0441 100 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u0432 \u0441 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u043c\u0438, \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043e\u0439 \u0438 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u043e\u043c. \u041a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044f \u00ab\u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u0432\u043d\u0443\u0442\u0440\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u00bb \u0434\u043b\u044f \u0432\u0430\u0441 \u043a\u0440\u0430\u0439\u043d\u0435 \u043d\u0435 \u0443\u0434\u043e\u0431\u043d\u0430\u044f. \u0412\u0435\u0434\u044c \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c 100 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0445 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u0432 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438. \u0417\u0432\u0443\u0447\u0438\u0442 \u043a\u0430\u043a \u043f\u043e\u0434\u0432\u0438\u0433, \u0434\u043e\u0441\u0442\u043e\u0439\u043d\u044b\u0439 \u0413\u0435\u0440\u0430\u043a\u043b\u0430.<\/p>\n<p>\u0410 \u0437\u043d\u0430\u0447\u0438\u0442, \u043d\u0430\u0434\u043e \u043d\u0430\u0443\u0447\u0438\u0442\u044c \u043f\u043b\u0430\u0433\u0438\u043d \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u0432\u043d\u0443\u0442\u0440\u0438 IDE. \u0422\u043e\u0433\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u0432 \u043e\u0434\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435.<\/p>\n<h3>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0438\u043b\u0438, \u043d\u0430\u043a\u0438\u0434\u0430\u0435\u043c MVP.<\/h3>\n<p>\u041f\u043b\u0430\u043d MVP:<\/p>\n<ol>\n<li>\n<p>\u041f\u0440\u0438 \u043a\u043b\u0438\u043a\u0435 \u043f\u0440\u0430\u0432\u043e\u0439 \u043a\u043d\u043e\u043f\u043a\u043e\u0439 \u043c\u044b\u0448\u0438 \u043d\u0430 \u0448\u0430\u0431\u043b\u043e\u043d GFT, \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u043e\u043c \u043c\u0435\u043d\u044e \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043a\u043d\u043e\u043f\u043a\u0438 \u00abCopy Template\u00bb \u0438 \u00abMove Template\u00bb<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0435\u043c \u0438\u043b\u0438 \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0448\u0430\u0431\u043b\u043e\u043d \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0441 IDE<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0438 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0434\u0430\u0451\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d<\/p>\n<\/li>\n<li>\n<p>\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c \u043d\u0430\u0448\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u0432 project tool.<\/p>\n<\/li>\n<\/ol>\n<p>\u041f\u043b\u0430\u043d \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439, \u0444\u0438\u0447\u0430 \u043f\u0440\u043e\u0441\u0442\u0430\u044f. \u041d\u0443, \u0447\u0430\u0441\u0430 4 \u0440\u0430\u0431\u043e\u0442\u044b, \u2014 \u043f\u043e\u0434\u0443\u043c\u0430\u043b \u044f \u0438 \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043b.<\/p>\n<h3>\u0414\u0435\u043d\u044c \u043f\u0435\u0440\u0432\u044b\u0439. \u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 IDE?<\/h3>\n<p>\u041d\u0430 \u0447\u0430\u0441\u0430\u0445 20:10, \u043a\u043b\u0430\u0441\u0441\u0438\u043a\u0430, \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c. \u0421\u043e\u0437\u0434\u0430\u0435\u043c Action \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u2014<strong> <\/strong><a href=\"https:\/\/github.com\/Louco11\/Group-File-Template-GFT\/blob\/master\/src\/main\/kotlin\/com\/arch\/temp\/actions\/MigrateTemplateAction.kt\"><strong><u>MigrateTemplateAction : Action()<\/u><\/strong><\/a>.<strong> <\/strong>\u041d\u0430\u043c \u043d\u0443\u0436\u043d\u044b 2 \u043a\u043d\u043e\u043f\u043e\u0447\u043a\u0438, \u0437\u043d\u0430\u0447\u0438\u0442 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c \u043d\u0430\u0448 <strong>Action<\/strong> \u0432 plugin.xml 2 \u0440\u0430\u0437\u0430, \u0441 \u0440\u0430\u0437\u043d\u044b\u043c \u0438\u043c\u0435\u043d\u0435\u043c \u0438 ID.<\/p>\n<pre><code class=\"xml\">&lt;action        id=\"MigrateTemplateActionCopy\"        class=\"com.arch.temp.actions.MigrateTemplateAction\"        text=\"Copy Template\">    &lt;add-to-group group-id=\"ProjectViewPopupMenu\" anchor=\"after\" relative-to-action=\"CutCopyPasteGroup\"\/> &lt;\/action>  &lt;action        id=\"MigrateTemplateActionRemove\"        class=\"com.arch.temp.actions.MigrateTemplateAction\"        text=\"Move Template\">    &lt;add-to-group group-id=\"ProjectViewPopupMenu\" anchor=\"after\" relative-to-action=\"MigrateTemplateActionCopy\"\/> &lt;\/action><\/code><\/pre>\n<p>\u041c\u043d\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u043b\u043e\u0433\u0438\u0447\u043d\u044b\u043c \u0437\u0430\u043f\u0438\u0445\u043d\u0443\u0442\u044c \u043e\u0431\u0430 Action \u0432 \u0431\u043b\u043e\u043a \u2014 CutCopyPasteGroup.<\/p>\n<p>\u0412 Action \u0434\u0435\u043b\u0430\u0435\u043c \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0448\u0438 \u043a\u043d\u043e\u043f\u043a\u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u0438\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u044e \u043d\u0430 \u043f\u0430\u043f\u043a\u0435 \u0441 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u043c. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u043c\u0435\u0442\u043e\u0434 <strong>update<\/strong>, \u043f\u0438\u0448\u0435\u043c \u043d\u0430\u0448\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0438 \u0432\u0443\u0430\u043b\u044f \u2014 \u0432\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442!<\/p>\n<pre><code class=\"kotlin\">override fun update(e: AnActionEvent) {    val project = e.project    val pathTemplate = e.getData(CommonDataKeys.VIRTUAL_FILE)?.path    val shortMainTemplate = File(\"$pathTemplate\/$MAIN_SHORT_FILE_TEMPLATE\")    val shirtTemplate = File(\"$pathTemplate\/$MAIN FILE TEMPLATE\")    e.presentation.isEnabledAndVisible = project != null &amp;&amp; (shortMainTemplate.isFile || shortTemplate.isFile) }<\/code><\/pre>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/414\/96d\/458\/41496d458280e63e2adc4807c760bee3.png\" width=\"446\" height=\"478\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/414\/96d\/458\/41496d458280e63e2adc4807c760bee3.png\"\/><\/figure>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u043b \u043d\u0430 \u0447\u0430\u0441\u044b \u0438 \u043f\u043e\u0434\u0443\u043c\u0430\u043b: \u00ab\u041f\u0444\u0444. \u0427\u0451\u0442, \u043f\u043e\u0445\u043e\u0434\u0443, \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0441\u0434\u0435\u043b\u0430\u044e\u00bb.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u0432 \u043d\u0430\u0448\u0435\u043c <strong>Action <\/strong>\u043c\u0435\u0442\u043e\u0434 <strong>actionPerformed(actionEvent: AnActionEvent)<\/strong>. \u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432\u0441\u0451 \u043f\u0440\u043e\u0441\u0442\u043e: \u043c\u044b \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u043d\u0430 \u00abCopy Template\u00bb \u0438\u043b\u0438 \u00abMove Template\u00bb \u0438 \u043c\u0435\u0442\u043e\u0434 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f.\u00a0<\/p>\n<p>\u0411\u0435\u0440\u0451\u043c \u0438\u0437 <strong>actionEvent.getData(CommonDataKeys.VIRTUAL_FILE) <\/strong><a href=\"https:\/\/plugins.jetbrains.com\/docs\/intellij\/virtual-file-system.html\"><u>VirtualFile<\/u><\/a> \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043c\u044b \u043a\u043b\u0438\u043a\u043d\u0443\u043b\u0438. \u041e\u0442\u043b\u0438\u0447\u043d\u043e! \u041f\u0435\u0440\u0432\u044b\u0439 \u043f\u0443\u0442\u044c, \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u043e\u0442\u043a\u0443\u0434\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0442\u044c, \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c. \u0414\u0430\u043b\u0435\u0435, \u0431\u0435\u0440\u0451\u043c \u043f\u0443\u0442\u044c \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u043a\u0443\u0434\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0442\u044c. \u0422\u0430\u043a, \u0441\u0442\u043e\u043f, \u0430 \u043e\u0442\u043a\u0443\u0434\u0430 \u0435\u0433\u043e \u0431\u0440\u0430\u0442\u044c? \u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0432 IDE?<\/p>\n<p>\u041d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u043e\u0442\u0432\u0435\u0447\u0430\u0442\u044c \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441\u044b:<\/p>\n<ul>\n<li>\n<p>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 IDE? \u0417\u0432\u0443\u0447\u0438\u0442 \u043a\u0430\u043a \u0442\u043e, \u0433\u0434\u0435 \u043b\u0435\u0436\u0430\u0442 \u043a\u043e\u043d\u0444\u0438\u0433 \u0444\u0430\u0439\u043b\u044b \u0441\u0430\u043c\u043e\u0439 IDE. \u0425\u043e\u0442\u044f \u0442\u0443\u0442 \u044f \u0438\u0441\u043f\u044b\u0442\u044b\u0432\u0430\u044e \u0441\u043e\u043c\u043d\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p>\u041e\u0442\u043a\u0443\u0434\u0430 \u0431\u0440\u0430\u0442\u044c? \u041d\u0443, \u043d\u0430\u0432\u0435\u0440\u043d\u043e\u0435, \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c \u043f\u0443\u0442\u044c, \u043d\u0435 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 project, \u0430 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 application.<\/p>\n<\/li>\n<\/ul>\n<p>\u041d\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u043e. \u041b\u0430\u0434\u043d\u043e. \u0417\u043d\u0430\u0447\u0438\u0442 \u0447\u0442\u043e? \u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e, \u0441\u0442\u0430\u0432\u0438\u043c \u0431\u0440\u0435\u0439\u043a\u043f\u043e\u0438\u043d\u0442 \u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u0448\u0435\u0440\u0441\u0442\u0438\u0442\u044c \u0432\u0441\u0451, \u0447\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448\u0438\u043c \u0432\u043e\u043f\u0440\u043e\u0441\u0430\u043c. \u041d\u0430 \u0447\u0430\u0441\u0430\u0445 00:30.\u00a0<\/p>\n<p>\u041d\u0430\u0448\u0451\u043b \u0447\u0443\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u043d\u0438\u0447\u0435\u0433\u043e. \u041f\u0430\u0440\u0443 \u043f\u0440\u0438\u043a\u043e\u043b\u044c\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <strong>File.separatorChar, <\/strong>\u043e\u043d \u043e\u0442\u0434\u0430\u0435\u0442 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 OS \u043a\u043e\u043c\u043f\u0430. \u041f\u043e\u043b\u0435\u0437\u043d\u043e, \u043d\u043e \u043d\u0435 \u0442\u043e, \u0447\u0442\u043e \u044f \u0438\u0441\u043a\u0430\u043b.\u00a0<\/p>\n<p>\u041b\u0430\u0430\u0430\u0430\u0430\u0434\u043d\u043e. \u0418\u0434\u0443 \u0432 <a href=\"https:\/\/plugins.jetbrains.com\/docs\/intellij\/welcome.html\"><u>\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e<\/u><\/a>, \u043f\u043e\u0447\u0442\u0438 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043d\u0430\u0445\u043e\u0436\u0443. \u0412\u0441\u0451 \u043d\u0435 \u0442\u043e. \u041d\u0430 \u0447\u0430\u0441\u0430\u0445 01:20. \u041c\u044b \u043f\u0440\u043e\u0438\u0433\u0440\u0430\u043b\u0438 \u044d\u0442\u0443 \u0431\u0438\u0442\u0432\u0443, \u043f\u043e\u0440\u0430 \u0441\u043f\u0430\u0442\u044c.<\/p>\n<h3>\u0414\u0435\u043d\u044c \u0432\u0442\u043e\u0440\u043e\u0439. Scratch files.<\/h3>\n<p>\u041d\u043e\u0447\u044c\u044e \u043c\u043d\u0435 \u043d\u0435 \u043f\u0440\u0438\u0441\u043d\u0438\u043b\u043e\u0441\u044c \u0433\u0435\u043d\u0438\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435. \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u0448\u0435\u0440\u0441\u0442\u044e \u0444\u043e\u0440\u0443\u043c\u044b, \u0431\u043b\u043e\u0433\u0438 \u0438 \u043d\u0430\u0442\u044b\u043a\u0430\u044e\u0441\u044c \u043d\u0430 <a href=\"https:\/\/www.jetbrains.com\/help\/idea\/scratches.html\"><strong><u>Scratch files<\/u><\/strong><\/a>.\u00a0<\/p>\n<p><strong>Scratch-\u0444\u0430\u0439\u043b\u044b<\/strong> \u2014 \u044d\u0442\u043e \u043f\u043e\u043b\u043d\u043e\u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435, \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u044b\u0435 \u0438 \u043e\u0442\u043b\u0430\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0435 \u0444\u0430\u0439\u043b\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442 \u043f\u043e\u0434\u0441\u0432\u0435\u0442\u043a\u0443 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430, \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435 \u043a\u043e\u0434\u0430 \u0438 \u0432\u0441\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u0442\u0438\u043f\u0430 \u0444\u0430\u0439\u043b\u043e\u0432. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0430\u0434 \u043e\u0434\u043d\u0438\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c \u0443 \u0432\u0430\u0441 \u043c\u043e\u0436\u0435\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442\u044c \u0438\u0434\u0435\u044f \u043c\u0435\u0442\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0434\u0440\u0443\u0433\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435. <strong>\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u0444\u0430\u0439\u043b \u0441 \u0447\u0435\u0440\u043d\u043e\u0432\u0438\u043a\u043e\u043c \u043c\u0435\u0442\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u043d\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0442\u043a\u0440\u044b\u0442 \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u043d\u0430\u0434 \u043b\u044e\u0431\u044b\u043c \u0434\u0440\u0443\u0433\u0438\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c.<\/strong><\/p>\n<p><strong><\/strong>\u0423\u0440\u0430! \u041f\u0435\u0440\u0432\u0430\u044f \u0441\u0442\u043e\u044f\u0449\u0430\u044f \u0437\u0430\u0446\u0435\u043f\u043a\u0430! \u042d\u0442\u043e \u0436\u0435 \u0442\u043e, \u0447\u0442\u043e \u044f \u0445\u043e\u0447\u0443 \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u043d\u0443 \u043f\u0440\u044f\u043c \u0442\u043e\u0447\u044c-\u0432-\u0442\u043e\u0447\u044c. \u0420\u0430\u043d\u044c\u0448\u0435 \u044f \u0434\u0443\u043c\u0430\u043b, \u0447\u0442\u043e \u044d\u0442\u043e Scratch-\u0444\u0430\u0439\u043b\u044b \u2014 \u044d\u0442\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b. \u0412\u0441\u044f\u043a\u0443\u044e \u0442\u0440\u0435\u0431\u0443\u0445\u0443 \u0442\u0443\u0434\u0430 \u043a\u0438\u0434\u0430\u043b: JSON \u0438\u0437 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043f\u043e\u043a\u0440\u0443\u0442\u0438\u0442\u044c, main \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043f\u043e \u0431\u044b\u0441\u0442\u0440\u043e\u043c\u0443 \u0432\u044b\u0437\u0432\u0430\u0442\u044c. \u0410 \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u044f \u043c\u0438\u043a\u0441\u0435\u0440\u043e\u043c \u0448\u0443\u0440\u0443\u043f\u044b \u043a\u0440\u0443\u0447\u0443.<\/p>\n<p>\u0415\u0441\u043b\u0438 Scratch-\u0444\u0430\u0439\u043b\u044b \u043d\u0435 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435, \u0437\u043d\u0430\u0447\u0438\u0442 \u043e\u043d\u0438 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0433\u0434\u0435-\u0442\u043e \u0432\u043e \u0432\u043d\u0435\u0448\u043d\u0435\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435. \u041d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u043d\u0430\u0448 \u0441\u0451\u0440\u0447, \u043d\u0430 \u0447\u0430\u0441\u0430\u0445 20:15. \u0422\u0430\u043f\u0430\u0435\u043c \u0434\u0432\u0430\u0436\u0434\u044b \u043d\u0430 Shift, \u0432\u0431\u0438\u0432\u0430\u0435\u043c Scratch.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/382\/742\/2b3\/3827422b3413872d5944d756032a765b.png\" width=\"1372\" height=\"186\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/382\/742\/2b3\/3827422b3413872d5944d756032a765b.png\"\/><\/figure>\n<p>\u041d\u0430\u0445\u043e\u0434\u0438\u043c 2 \u043e\u0431\u044a\u0435\u043a\u0442\u0430: ScratchFileService \u0438 ScratchTreeStructureProvider. \u0417\u0430\u0445\u043e\u0434\u0438\u043c \u0432 ScratchFileService \u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u043c\u0435\u0442\u043e\u0434 <strong>getRootPath.<\/strong><\/p>\n<pre><code class=\"java\">public @SystemIndependent @NotNull String getRootPath(@NotNull RootType rootType) {        return myRootPaths.get(rootType.getId()); }<\/code><\/pre>\n<p>\u0427\u0442\u043e \u043c\u044b \u0432\u0438\u0434\u0438\u043c: myRootPaths \u2014 \u044d\u0442\u043e <strong>ConcurrentMap&lt;String, String> myRootPaths = ConcurrentFactoryMap.createMap(ScratchFileServiceImpl::calcRootPath), <\/strong>\u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e<strong> <\/strong>\u043f\u043e <strong>rootType.Id <\/strong>\u0432\u044b\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0443\u0442\u044c. \u041b\u0435\u0437\u0435\u043c \u0432<strong> calcRootPath.<\/strong><\/p>\n<pre><code class=\"java\">private static @SystemIndependent @NotNull String calcRootPath(@NotNull String rootId) {  String path = System.getProperty(PathManager.PROPERTY_SCRATCH_PATH + \"\/\" + rootId);  if (path != null &amp;&amp; path.length() > 2 &amp;&amp; path.charAt(0) == '\\\"') {        path = StringUtil.unquoteString(path);  }  return path != null ? FileUtil.toSystemIndependentName(path) :        FileUtil.toSystemIndependentName(PathManager.getScratchPath()) + \"\/\" + rootId; }<\/code><\/pre>\n<p>\u0427\u0442\u043e \u0432\u0438\u0434\u043d\u043e? \u041f\u043e \u043a\u0430\u043a\u0438\u043c-\u0442\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u043c, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043f\u0443\u0442\u044c \u043a root-\u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0443. <em>PROPERTY_SCRATCH_PATH <\/em>= &#171;idea.scratch.path&#187;<\/p>\n<p>\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u043d\u0435 \u043e\u0431\u044b\u0447\u043d\u044b\u0435, \u043a \u043d\u0438\u043c \u043f\u043b\u044e\u0441\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u043a\u043e\u0439-\u0442\u043e rootId. \u041a \u0442\u043e\u043c\u0443 \u0436\u0435, \u043a\u0430\u043a \u043f\u043e\u0434\u043a\u0430\u0442\u0430\u043b\u043e\u0433.\u00a0<\/p>\n<p>\u041d\u0430\u0445\u043e\u0434\u0438\u043c <strong>ScratchRootType extends RootType<\/strong>.<strong> RootType <\/strong>\u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0435 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 myId \u0438 myDisplayName.<\/p>\n<pre><code class=\"java\">ScratchRootType() {       super(\"scratches\", LangBundle.message(\"root.type.scratches\")); }<\/code><\/pre>\n<p>RootId \u043f\u043e\u043b\u0443\u0447\u0435\u043d \u2014 \u044d\u0442\u043e \u00abscratches\u00bb. \u0415\u0449\u0451 \u043c\u044b \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e <strong>ScratchRootType <\/strong>\u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d \u0432<strong> plugin.xml<\/strong>, \u0437\u043d\u0430\u0447\u0438\u0442 \u043d\u0430\u0434\u043e \u043d\u0435 \u0437\u0430\u0431\u044b\u0442\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a\u0436\u0435.<strong> <\/strong><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/070\/40a\/af8\/07040aaf88ce24ee407a812730d61e5a.png\" width=\"972\" height=\"174\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/070\/40a\/af8\/07040aaf88ce24ee407a812730d61e5a.png\"\/><\/figure>\n<pre><code class=\"xml\">&lt;scratch.rootType implementation=\"com.intellij.ide.scratch.ScratchRootType\"\/><\/code><\/pre>\n<p>\u0423 <strong>RootType<\/strong> \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u043c\u0435\u0442\u043e\u0434 <strong>getAllRootTypes(). <\/strong>\u041e\u043d \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0432\u0441\u0435 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 <strong>RootType.<\/strong><\/p>\n<p>\u041a\u0430\u0439\u0444, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u044f \u043c\u043e\u0433\u0443 \u043e\u0442\u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043e\u0442 <strong>RootType, <\/strong>\u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u2014 \u0438 \u0443 \u043c\u0435\u043d\u044f \u0431\u0443\u0434\u0435\u0442 \u043f\u0443\u0442\u044c \u043a \u043c\u043e\u0435\u043c\u0443 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0443 \u0441 \u0448\u0430\u0431\u043b\u043e\u043d\u0430\u043c\u0438. \u041d\u0430 \u0447\u0430\u0441\u0430\u0445 21:20 \u043f\u0435\u0440\u0432\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u043a\u043e\u0434\u0430 \u043f\u043e\u043d\u0435\u0441\u043b\u0438\u0441\u044c.<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u044e <a href=\"https:\/\/github.com\/Louco11\/Group-File-Template-GFT\/blob\/master\/src\/main\/kotlin\/com\/arch\/temp\/extension\/GFTemplateRootType.kt\"><strong><u>GFTemplateRootType: RootType(<\/u><em><u>ROOT_ID<\/u><\/em><u>, <\/u><em><u>GFT_ROOT_NAME<\/u><\/em><u>)<\/u><\/strong><\/a>\u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u044e \u0435\u0433\u043e \u0432 plugin.xml. <\/p>\n<pre><code class=\"xml\">&lt;extensions defaultExtensionNs=\"com.intellij\">    &lt;scratch.rootType implementation=\"com.arch.temp.extension.GFTemplateRootType\"\/> &lt;\/extensions><\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u044e, \u0432\u044b\u0437\u044b\u0432\u0430\u044e <strong>getAllRootTypes(), <\/strong>\u0432\u0438\u0436\u0443 \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 GFTemplateRootType<strong>. <\/strong>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u0443\u0442\u0438 \u043f\u043e\u0437\u0430\u0438\u043c\u0441\u0442\u0432\u0443\u0435\u043c \u043c\u0435\u0442\u043e\u0434 \u0443 <strong>ScratchFileServiceImpl.getInstance().getRootPath(rootType). <\/strong>\u041f\u043e\u043b\u0443\u0447\u0430\u044e \u043f\u0443\u0442\u044c \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u043a\u0443\u0434\u0430 \u043a\u043b\u0430\u0441\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d\u044b. \u041f\u043e\u0431\u0435\u0434\u0430!!! \u041c\u044b \u0437\u043d\u0430\u0435\u043c \u0442\u043e\u0447\u043a\u0443 \u0410 \u0438 \u0442\u043e\u0447\u043a\u0443 \u0411.<\/p>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u0443\u044e \u043b\u043e\u0433\u0438\u043a\u0443 \u0432 <a href=\"https:\/\/github.com\/Louco11\/Group-File-Template-GFT\/blob\/master\/src\/main\/kotlin\/com\/arch\/temp\/actions\/MigrateTemplateAction.kt\"><strong><u>MigrateTemplateAction<\/u><\/strong><\/a>, \u0434\u0435\u043b\u0430\u044e \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u043e <em>\u0442\u0435\u043a\u0441\u0442\u0443 \u043a\u043d\u043e\u043f\u043a\u0438<\/em>. \u0418 \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044c \u0432 \u043d\u0435\u0434\u043e\u0443\u043c\u0435\u043d\u0438\u0438 \u00ab\u0421\u0435\u0440\u044c\u0435\u0437\u043d\u043e? \u041f\u043e \u0442\u0435\u043a\u0441\u0442\u0443? \u0423 \u043d\u0430\u0441 \u0436\u0435 \u0435\u0441\u0442\u044c \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0435 ID!\u00bb \u041f\u0440\u0438\u043a\u0438\u043d\u044c, \u044f \u0442\u0430\u043a \u0438 \u043d\u0435 \u043d\u0430\u0448\u0451\u043b, \u043a\u0430\u043a \u0438\u0437 <strong>Action <\/strong>\u0432\u044b\u0442\u0430\u0449\u0438\u0442\u044c \u0435\u0433\u043e ID (\u0435\u0441\u043b\u0438 \u0442\u044b \u0447\u0442\u043e-\u0442\u043e \u043e\u0431 \u044d\u0442\u043e\u043c \u0437\u043d\u0430\u0435\u0448\u044c, \u0431\u0435\u0433\u0438 \u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u044b, \u0434\u043e\u0431\u0440\u044b\u0439 \u0447\u0435\u043b\u043e\u0432\u0435\u043a), \u044d\u0442\u043e \u0435\u0449\u0451 \u0447\u0430\u0441 \u043f\u043e\u0442\u0440\u0430\u0447\u0435\u043d\u043d\u044b\u0439 \u0432 \u043f\u0443\u0441\u0442\u0443\u044e. \u041f\u0435\u0440\u0435\u0434 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0435\u043c \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u0434\u0438\u0430\u043b\u043e\u0433 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u0430.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c60\/9b7\/c6b\/c609b7c6b0172a8cf1eeaa18218fa357.png\" width=\"730\" height=\"278\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c60\/9b7\/c6b\/c609b7c6b0172a8cf1eeaa18218fa357.png\"\/><\/figure>\n<p>\u0418 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432\u0441\u0451 \u2014 \u043d\u0430\u0448\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f \u0432 IDE. \u041d\u043e \u043c\u044b \u043f\u043e\u043a\u0430 \u043d\u0435 \u0432\u0438\u0434\u0438\u043c \u0438\u0445 \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432. \u041f\u043e\u043d\u0435\u0441\u043b\u0430\u0441\u044c! \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u044e \u0432 <strong>ListTemplateActionGroup <\/strong>\u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 root \u043a\u0430\u0442\u0430\u043b\u043e\u0433, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043c\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432.<\/p>\n<pre><code class=\"kotlin\">fun AnActionEvent.getListTemplate(): List&lt;MainClassJson> {    val listTemplate = mutableListOf&lt;MainClassJson>()      getData(CommonDataKeys.PROJECT)?.let {        val basePath = getBasePathTemplate()        listTemplate.addAll(getListMainClassTemplate(basePath))    }    val pathHomeTemplate = getRootPathTemplate()    listTemplate.addAll(getListMainClassTemplate(pathHomeTemplate))    return listTemplate }<\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/bc9\/411\/59b\/bc941159b662eb301f6f726838c5b855.png\" width=\"754\" height=\"192\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/bc9\/411\/59b\/bc941159b662eb301f6f726838c5b855.png\"\/><\/figure>\n<p>\u0412\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438 \u0434\u0430\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u0432\u0441\u0451 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e. \u041d\u0430 \u0447\u0430\u0441\u0430\u0445 00:40, \u043d\u0430\u0433\u0440\u0430\u0436\u0434\u0430\u0435\u043c \u0441\u0435\u0431\u044f \u0448\u043e\u043a\u043e\u043b\u0430\u0434\u043a\u043e\u0439 \u0438 \u0441\u043f\u0430\u0442\u044c.<\/p>\n<h3>\u0414\u0435\u043d\u044c \u0442\u0440\u0435\u0442\u0438\u0439\/\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u044b\u0439\/\u043f\u044f\u0442\u044b\u0439. \u0411\u0430\u0437\u0430.\u00a0<\/h3>\n<p>\u0411\u043e\u043b\u044c\u0448\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0441\u0434\u0435\u043b\u0430\u043b. \u041e\u0441\u0442\u0430\u043b\u0438\u0441\u044c \u043f\u0443\u0441\u0442\u044f\u043a\u0438 \u2014 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u0432 project tool. \u0412\u0441\u0435 \u0437\u0432\u0451\u0437\u0434\u044b \u0441\u043b\u043e\u0436\u0438\u043b\u0438\u0441\u044c \u0442\u0430\u043a, \u0447\u0442\u043e \u0443 Scratch \u0444\u0430\u0439\u043b\u043e\u0432 \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u0439 \u0440\u0430\u0437\u0434\u0435\u043b.<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/fd6\/001\/517\/fd6001517538b1454362399b7a2243f2.png\" width=\"434\" height=\"362\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/fd6\/001\/517\/fd6001517538b1454362399b7a2243f2.png\"\/><\/figure>\n<p>\u041f\u0440\u043e\u0441\u0442\u043e \u0431\u0435\u0440\u0443 \u0438 \u0432\u0441\u0451, \u0447\u0442\u043e \u0435\u0441\u0442\u044c \u0432 <strong>ScratchTreeStructureProvider<\/strong>,<strong> <\/strong>\u043a\u043e\u043f\u0438\u0440\u0443\u044e \u0441\u0435\u0431\u0435. \u00ab\u041e\u0431\u043c\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u0441\u044f\u00bb \u0431\u0440\u0435\u0439\u043a\u043f\u043e\u0438\u043d\u0442\u0430\u043c\u0438, \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u044e\u0432\u0435\u043b\u0438\u0440\u0438\u0442\u044c: \u0442\u0443\u0442 \u043e\u0442\u0440\u0435\u0437\u0430\u0442\u044c, \u0441\u044e\u0434\u0430 \u043f\u0440\u0438\u0434\u0435\u043b\u0430\u0442\u044c, \u0442\u0443\u0442 \u043f\u0435\u0440\u0435\u0434\u0435\u043b\u0430\u0442\u044c. \u0427\u0442\u043e-\u0442\u043e \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0431\u0435\u0440\u0451\u043c \u043a\u0443\u0441\u043a\u0438 \u0438\u0437 \u0434\u0440\u0443\u0433\u0438\u0445 \u043c\u0435\u0441\u0442. \u041d\u0435 \u0431\u0443\u0434\u0443 \u0442\u043e\u043c\u0438\u0442\u044c, \u0432\u044b\u0434\u0430\u044e \u00ab\u0411\u0430\u0437\u0443\u00bb \u043a\u0430\u043a \u043d\u0430\u043c \u0437\u0430\u043a\u043e\u043d\u043d\u0435\u043a\u0442\u0438\u0442\u044c\u0441\u044f \u0441 project tool.<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u043a\u043b\u0430\u0441\u0441 <strong>TemplateProjectView<\/strong> \u0438 \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u0441\u044f \u043e\u0442 <strong>AbstractProjectViewPane<\/strong> \u0438\u043b\u0438 <strong>AbstractProjectViewPaneWithAsyncSupport.<\/strong><\/p>\n<p>\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c TemplateProjectView \u043a\u043b\u0430\u0441\u0441 \u0432 plugin.xml \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 extension.<\/p>\n<pre><code class=\"xml\">&lt;extensions defaultExtensionNs=\"com.intellij\">    &lt;projectViewPane implementation=\"com.arch.temp.projectView.TemplateProjectView\"\/> &lt;\/extensions><\/code><\/pre>\n<p>\u041f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u043c\u0435\u0442\u043e\u0434\u044b \u0438 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u043c.<\/p>\n<pre><code class=\"kotlin\">override fun getTitle() = GFT_HOME_TEMPLATES \\\\ \u0418\u043c\u044f \u043d\u0430 ProjectViewPane  override fun getIcon() = AllIcons.General.ProjectTab \\\\ \u0418\u043a\u043e\u043d\u043a\u0430  override fun getId() = TEMPLATE_VIEW_ID \\\\ ID \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043c\u043e\u0436\u0435\u043c \u0443\u0437\u043d\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0443\u0441 \u043f\u0430\u043d\u0435\u043b\u0438 \u0438 \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u043d\u0435\u0439  override fun getWeight() = 111 \\\\ \u0420\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 \u0432\u044b\u043f\u0430\u0434\u0430\u044e\u0449\u0435\u043c \u0441\u043f\u0438\u0441\u043a\u0435 \u0447\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0447\u0438\u0441\u043b\u043e \u0442\u0435\u043c \u043d\u0438\u0436\u0435 \u043f\u0430\u043d\u0435\u043b\u044c<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u043f\u0443\u043d\u043a\u0442 \u00abGFT Templates\u00bb \u0432 \u0432\u044b\u043f\u0430\u0434\u0430\u044e\u0449\u0435\u043c \u043c\u0435\u043d\u044e.<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/02d\/2eb\/856\/02d2eb8566418e15b451b886ae04e4d0.png\" width=\"436\" height=\"442\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/02d\/2eb\/856\/02d2eb8566418e15b451b886ae04e4d0.png\"\/><\/figure>\n<p>\u0418\u0434\u0451\u043c \u0434\u0430\u043b\u044c\u0448\u0435. \u041a\u043e\u0433\u0434\u0430 \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 \u043c\u044b \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u043d\u0430\u0448\u0435 <strong>ProjectView<\/strong>, \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <strong>createTree. <\/strong>\u0417\u0430\u0442\u0435\u043c <strong>createStructure. <\/strong>\u042f \u044d\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u0442\u0430\u043a, \u0447\u0442\u043e \u0432\u043d\u0430\u0447\u0430\u043b\u0435 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u043a\u0430\u043d\u0432\u0430\u0441, \u0430 \u0437\u0430\u0442\u0435\u043c \u043d\u0430\u043a\u0438\u0434\u044b\u0432\u0430\u0435\u043c \u043d\u0430 \u043d\u0435\u0433\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443.<\/p>\n<pre><code class=\"kotlin\">override fun createStructure(): ProjectAbstractTreeStructureBase {    return ProjectViewPaneTreeStructure() }  override fun createTree(treeModel: DefaultTreeModel): ProjectViewTree {    return object : ProjectViewTree(treeModel) {        override fun toString(): String {            return title + \" \" + super.toString()        }    } }<\/code><\/pre>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u043d\u0430\u0448\u0443 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443.<\/p>\n<pre><code class=\"kotlin\">inner class ProjectViewPaneTreeStructure : ProjectTreeStructure(myProject, id), ProjectViewSettings {    override fun createRoot(project: Project, settings: ViewSettings): AbstractTreeNode&lt;*> {        return TemplateViewProjectNode(project, settings)    }     override fun isShowLibraryContents() = false  }<\/code><\/pre>\n<p>\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u0432 \u043c\u0435\u0442\u043e\u0434\u0435 <strong>isShowLibraryContents <\/strong>false, \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u043e \u0432\u043a\u043b\u0430\u0434\u043a\u0443 \u0441 \u043b\u0438\u0431\u0430\u043c\u0438.<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/1f3\/f92\/7a4\/1f3f927a40b765cb8aec05d93903cb95.png\" width=\"342\" height=\"58\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/1f3\/f92\/7a4\/1f3f927a40b765cb8aec05d93903cb95.png\"\/><\/figure>\n<p>\u0415\u0441\u0442\u044c \u043f\u043e\u0445\u043e\u0436\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u044b, \u043e\u043d\u0438 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e <em>false<\/em>: <strong>isShowScratchesAndConsoles, isShowModules <\/strong>\u0438 \u0442. \u0434.<\/p>\n<p>\u041c\u0435\u0442\u043e\u0434 <strong>createRoot <\/strong>\u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043e\u0442 \u043d\u0430\u0441 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043d\u0435\u043a\u043e\u0439 <strong>AbstractTreeNode, <\/strong>\u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0438 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432\u0441\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430.<\/p>\n<p>\u0412 <strong>AbstractTreeNode <\/strong>\u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432\u0441\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0434\u043b\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b: \u0438\u043c\u044f, \u0446\u0432\u0435\u0442, \u0438\u043a\u043e\u043d\u043a\u0430, \u0435\u0451 \u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a\u0438 (\u0435\u0441\u043b\u0438 \u044d\u0442\u043e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f) \u0438 \u0432\u0441\u0451, \u0432\u0441\u0451, \u0432\u0441\u0451, \u0447\u0442\u043e \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430.<\/p>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u0441\u0432\u043e\u044e <a href=\"https:\/\/github.com\/Louco11\/Group-File-Template-GFT\/blob\/master\/src\/main\/kotlin\/com\/arch\/temp\/node\/TemplateViewProjectNode.kt\"><strong><u>ProjectViewNode<\/u><\/strong><\/a><strong>, <\/strong>\u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u044b:<\/p>\n<ul>\n<li>\n<p><strong>canRepresent, contains<\/strong>. \u0421\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442 \u043f\u0440\u0438 \u043d\u0430\u0436\u0430\u0442\u0438\u0438 <strong>SelectOpenedFile<\/strong><\/p>\n<\/li>\n<li>\n<p><strong>update. <\/strong>\u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u043e\u0434\u044b <strong>getChildren(): List&lt;AbstractTreeNode&lt;*>>. <\/strong>\u0417\u0434\u0435\u0441\u044c \u043f\u0438\u0448\u0435\u043c \u0432\u0441\u044e \u043b\u043e\u0433\u0438\u043a\u0443 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c.<\/p>\n<\/li>\n<\/ul>\n<p>\u042f \u0440\u0435\u0448\u0438\u043b \u043d\u0430\u043a\u043e\u0441\u0442\u044b\u043b\u0438\u0442\u044c \u0438 \u0437\u0430\u0432\u0451\u043b \u0434\u0432\u0430 RootType: \u043e\u0434\u0438\u043d \u044d\u0442\u043e rootPath, \u0432\u0442\u043e\u0440\u043e\u0439 projectPath (\u043d\u0443 \u0432\u043e\u0442 \u0437\u0430\u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0442\u0430\u043a, \u0434\u043b\u044f \u0435\u0434\u0438\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u0438\u044f). \u042f \u0438\u0445 \u043f\u043e\u043b\u0443\u0447\u0430\u044e \u0447\u0435\u0440\u0435\u0437 <strong>RootType.getAllRootTypes(), <\/strong>\u043f\u043e ID.\u00a0<\/p>\n<p>\u0412 \u0438\u0442\u043e\u0433\u0435 \u0443 \u043d\u0430\u0441 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0434\u0432\u0430 \u043f\u0443\u043d\u043a\u0442\u0430 \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435: Ide GFTemplates \u0438 Project GFTemplates.<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f2c\/d92\/1bc\/f2cd921bccee33e6e62a0c1062e369ab.png\" width=\"424\" height=\"150\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f2c\/d92\/1bc\/f2cd921bccee33e6e62a0c1062e369ab.png\"\/><\/figure>\n<p>\u041d\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0438\u0445, \u0432\u044b\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u0435\u043c \u043f\u0443\u0442\u044c. \u042d\u0442\u043e pathProject\/template \u0438 rootPath\/template.<\/p>\n<p>\u041d\u0430\u0445\u043e\u0434\u0438\u043c <strong>VirtualFile <\/strong>\u0438 \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u043e \u043f\u0440\u043e\u0431\u0435\u0436\u0438\u043c\u0441\u044f \u043f\u043e \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c. \u0415\u0441\u043b\u0438 \u044d\u0442\u043e \u0444\u0430\u0439\u043b, \u0442\u043e \u0432\u0435\u0440\u043d\u0435\u043c <strong>PsiFileNode<\/strong>, \u0435\u0441\u043b\u0438 \u043a\u0430\u0442\u0430\u043b\u043e\u0433, \u0442\u043e <strong>PsiDirectoryNode.<\/strong><\/p>\n<p>\u0412\u043e\u0442 \u0438 \u0432\u0441\u0451. \u0412 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u0432\u0441\u0435 \u043d\u0430\u0448\u0435 \u0434\u0435\u0440\u0435\u0432\u043e \u0441 \u0444\u0430\u0439\u043b\u0430\u043c\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u0438\u0437 \u0440\u0430\u0437\u043d\u044b\u0445 \u043c\u0435\u0441\u0442. \u0423\u0420\u0410!<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a98\/c45\/434\/a98c4543428df9f0fc475a4f0fb323bb.png\" width=\"440\" height=\"624\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a98\/c45\/434\/a98c4543428df9f0fc475a4f0fb323bb.png\"\/><\/figure>\n<p>\u0422\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u043d\u043e\u0432\u044b\u0439 \u0448\u0430\u0431\u043b\u043e\u043d. \u041a \u043d\u0435\u0441\u0447\u0430\u0441\u0442\u044c\u044e, \u043e\u043d \u043d\u0435 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435. \u041f\u0440\u043e\u0431\u0443\u0435\u043c \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c \u043f\u043e \u0432\u043a\u043b\u0430\u0434\u043a\u0430\u043c \u2014 \u0438 \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u043e \u043e\u043d \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f. \u0411\u0435\u0434\u0430, \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043d\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442, \u043d\u0435 \u0434\u0435\u043b\u0430\u0435\u0442 \u0435\u0451 \u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435.<\/p>\n<p>\u0412 \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u043d\u043e\u0434\u0435 \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 \u043c\u0435\u0442\u043e\u0434\u0430 init \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c \u0441\u043b\u0443\u0448\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432.<\/p>\n<pre><code class=\"kotlin\">VirtualFileManager.getInstance().addAsyncFileListener({ events: List&lt;VFileEvent?>? ->    val update = JBIterable.from(events)        .find { e: VFileEvent? ->            ProgressManager.checkCanceled()            val parent = getNewParent(e!!)            if (TemplateUtils.isTemplate(parent)) return@find true            if (!isDirectory(e)) return@find false            false        } != null    if (!update) null else object : AsyncFileListener.ChangeApplier {        override fun afterVfsChange() {            onUpdate.run()        }    } }, project)<\/code><\/pre>\n<p>\u041f\u0438\u0448\u0443 \u043b\u043e\u0433\u0438\u043a\u0443 \u043d\u0430 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u0435 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f\u0445 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0442 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f. \u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435. \u0417\u0430\u043f\u0443\u0441\u043a. \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0448\u0430\u0431\u043b\u043e\u043d \u2014 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f, \u0444\u0443\u0445! \u041a\u043b\u0438\u043a\u0430\u0435\u043c \u043d\u0430 \u043d\u0435\u0433\u043e \u0438 \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c, \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u043f\u0438\u044f \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 \u00abIde GFTemplates\u00bb.<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ffc\/3e0\/aad\/ffc3e0aaddda5db41f980e02a9d2ee6b.png\" width=\"340\" height=\"122\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ffc\/3e0\/aad\/ffc3e0aaddda5db41f980e02a9d2ee6b.png\"\/><\/figure>\n<p>\u041a\u043b\u0438\u043a\u0430\u0435\u043c \u0432 \u043c\u0435\u0441\u0442\u043e \u0433\u0434\u0435 \u0445\u043e\u0442\u0438\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d, \u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u043f\u0438\u0441\u043e\u043a, \u043e\u043d \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u043b\u0441\u044f, DONE!<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/844\/c9c\/081\/844c9c081a5c3a73cc745c62082c0f54.png\" width=\"798\" height=\"262\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/844\/c9c\/081\/844c9c081a5c3a73cc745c62082c0f54.png\"\/><\/figure>\n<h3>\u0412\u044b\u0432\u043e\u0434\u044b:<\/h3>\n<p>\u041c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <strong>ScratchFileServiceImpl <\/strong>\u0438<strong> rootType? <\/strong>\u0421\u043a\u043e\u0440\u0435\u0439 \u0432\u0441\u0435\u0433\u043e \u0434\u0430<strong>, <\/strong>\u0435\u0441\u043b\u0438 \u0441\u0435\u0441\u0442\u044c \u0438 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f, \u043a\u0430\u043a \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0451 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u0438 \u043f\u043e\u0442\u043e\u043c \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u043d\u0435\u043c\u0443 \u0438\u0437 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0442\u043e \u043b\u0435\u0433\u043a\u043e. \u041d\u043e, \u0432 \u043f\u043e\u0433\u043e\u043d\u0435 \u0437\u0430 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u0441\u043b\u0430\u0431\u044b\u043c \u043f\u043e\u0433\u0440\u0443\u0436\u0435\u043d\u0438\u0435\u043c \u0432 \u044d\u0442\u0443 \u0442\u0435\u043c\u0443, \u0438\u043c\u0435\u0435\u043c \u0447\u0442\u043e \u0438\u043c\u0435\u0435\u043c.<\/p>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0435\u0441\u0442\u044c \u0435\u0449\u0451 \u043a\u0430\u043a\u0430\u044f-\u043d\u0438\u0431\u0443\u0434\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0438 \u043e\u043d\u0430 \u0443\u0434\u043e\u0431\u043d\u0435\u0435. \u042f \u043d\u0435 \u043d\u0430\u0448\u0451\u043b, \u043d\u043e \u0447\u0443\u0432\u0441\u0442\u0432\u0443\u044e, \u0447\u0442\u043e \u0435\u0441\u0442\u044c.<\/p>\n<p>\u0421\u043b\u0430\u0431\u0430\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0440\u043e\u0436\u0434\u0430\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441 \u0434\u043e\u0441\u0442\u0438\u0447\u044c \u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0438\u0437 \u043a\u0443\u0441\u043a\u043e\u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043a\u0440\u044b\u0442 \u043e\u0442 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0432\u0434\u043e\u0445\u043d\u043e\u0432\u043b\u044f\u0435\u0442 \u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u044d\u0442\u0438\u043c \u043d\u0435\u043e\u0431\u044b\u0447\u043d\u044b\u043c \u043e\u043f\u044b\u0442\u043e\u043c \u0441 \u0432\u0430\u043c\u0438. \u041c\u043d\u0435 \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u043b\u043e\u0441\u044c! \u0414\u0430 \u0438 \u0444\u0438\u0447\u0430 \u0432\u044b\u0448\u043b\u0430 \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0439.\u00a0<\/p>\n<p>\u041a\u0441\u0442\u0430\u0442\u0438, \u0435\u0441\u043b\u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0434\u043e\u043a\u0443 \u043f\u043e <strong>projectViewPane<\/strong> \u0438\u0437 \u043a\u043e\u0434\u0430, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u043a\u0442\u043e \u0435\u0449\u0451 \u0435\u0433\u043e <a href=\"https:\/\/plugins.jetbrains.com\/intellij-platform-explorer\/extensions?extensions=com.intellij.projectViewPane\"><u>\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b<\/u><\/a>.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/2e1\/e83\/3f6\/2e1e833f68317daa16f1a6fc2c2aa78f.png\" width=\"1060\" height=\"748\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/2e1\/e83\/3f6\/2e1e833f68317daa16f1a6fc2c2aa78f.png\"\/><\/figure>\n<p>\u041c\u044b \u0443\u0432\u0438\u0434\u0438\u043c \u0447\u0443\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 10 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432. \u0422\u0435\u043f\u0435\u0440\u044c \u0438 \u0441 \u043c\u043e\u0438\u043c \u043d\u0430 \u0431\u043e\u0440\u0442\u0443 =)<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f19\/953\/933\/f19953933ad079172ad34f753019a5ed.png\" width=\"1600\" height=\"1003\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f19\/953\/933\/f19953933ad079172ad34f753019a5ed.png\"\/><\/figure>\n<p>\u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u043c\u043e\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u0431\u044b\u043b\u0430 \u0434\u043b\u044f \u0442\u0435\u0431\u044f \u043f\u043e\u043b\u0435\u0437\u043d\u0430. \u041d\u0435 \u043f\u043e\u043b\u0435\u043d\u0438\u0441\u044c \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043b\u0430\u0439\u043a \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u0438\u044f\u0442\u043d\u044b\u0439 \u043a\u043e\u043c\u043c\u0435\u043d\u0442. \u0415\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u044b\u0439, \u0442\u043e\u0436\u0435 \u043f\u0438\u0448\u0438 \u2014 \u043e\u0431\u0441\u0443\u0434\u0438\u043c. \u0423\u0434\u0430\u0447\u0438, \u043d\u0435 \u0431\u043e\u043b\u0435\u0439!<\/p>\n<p>\u0417.\u042b. \u0415\u0441\u043b\u0438 \u0442\u0432\u043e\u0439 \u043f\u043b\u0430\u0433\u0438\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0435\u043c \/ \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \/ \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u043e\u0432 \u0438\u043b\u0438 \u0444\u0430\u0439\u043b\u043e\u0432, \u043b\u0443\u0447\u0448\u0435 \u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u0447\u0435\u0440\u0435\u0437 <a href=\"https:\/\/intellij-support.jetbrains.com\/hc\/en-us\/community\/posts\/18010788883858-%D0%9Dow-to-update-the-project-tree-when-creating-a-file-directory\"><strong><u>Virtual Files<\/u><\/strong><\/a><strong>. Project tool<\/strong> \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d \u043d\u0430 \u0438\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u0435\u0441\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <strong>Java IO API<\/strong>, \u0442\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0441 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u043e\u0439.\u00a0<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \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\/articles\/816149\/\"> https:\/\/habr.com\/ru\/articles\/816149\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><\/figure>\n<p>\u0414\u043e\u0431\u0440\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u0443\u0442\u043e\u043a, \u0434\u043e\u0440\u043e\u0433\u043e\u0439 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044c. \u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u041c\u0438\u0445\u0430\u0438\u043b, \u044f Android-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0432 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0426\u0438\u0430\u043d. \u042d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0451\u0439 \u044f \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u044e \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u0446\u0438\u043a\u043b \u0441\u0442\u0430\u0442\u0435\u0439 \u043f\u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0439 \u043a\u0443\u0445\u043d\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432 \u0434\u043b\u044f Jetbrains IDE: IDEA, Android Studio (AS) \u0438 \u043f\u0440. \u041d\u0430 \u0434\u0432\u043e\u0440\u0435 2024 \u0433\u043e\u0434, \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043d\u0435 \u0442\u0430\u043a \u0431\u043e\u0433\u0430\u0442\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439, \u043a\u0430\u043a \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b. \u041d\u043e \u0435\u0441\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043c\u0435\u043b\u043e \u043c\u043e\u0436\u043d\u043e \u0434\u0435\u0440\u0431\u0430\u043d\u0438\u0442\u044c. \u0412 \u044d\u0442\u043e\u043c \u0446\u0438\u043a\u043b\u0435 \u0441\u0442\u0430\u0442\u0435\u0439 \u044f \u0431\u0443\u0434\u0443 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u043e\u043f\u044b\u0442 \u043f\u043e\u0438\u0441\u043a\u0430 \u043d\u0443\u0436\u043d\u043e\u0439 \u043c\u043d\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0438 \u0435\u0451 \u0440\u0430\u0437\u0431\u043e\u0440.<\/p>\n<p>\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c\u0441\u044f \u0441 \u0442\u0435\u043c, \u043a\u0430\u043a \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u043d\u0435 \u0438\u0437 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0432 project tool.\u00a0<\/p>\n<p>\u042f \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0441\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u00abGroup File Template \u200b(GFT)<em>\u200b<\/em>\u00bb<em>, <\/em><a href=\"https:\/\/plugins.jetbrains.com\/plugin\/16836-group-file-template-gft-\"><u>GFT \u043d\u0430 Market<\/u><\/a>, <a href=\"https:\/\/github.com\/Louco11\/Group-File-Template-GFT\"><u>GitHub<\/u><\/a> \u0412 \u0441\u0432\u043e\u0435\u0439 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 <a href=\"https:\/\/habr.com\/ru\/companies\/cian\/articles\/740928\/\"><u>\u0441\u0442\u0430\u0442\u044c\u0435<\/u><\/a> \u044f \u043e\u043f\u0438\u0441\u0430\u043b, \u043a\u0430\u043a \u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f. \u0412\u0435\u0441\u044c \u043c\u043e\u0439 \u043e\u043f\u044b\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043f\u043b\u0430\u0433\u0438\u043d\u0430\u043c\u0438 \u043a\u0440\u0443\u0442\u0438\u0442\u0441\u044f \u0432\u043e\u043a\u0440\u0443\u0433 \u043d\u0435\u0433\u043e. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u0441\u0432\u043e\u0451\u043c \u0431\u043b\u043e\u0433\u0435 \u0431\u0443\u0434\u0443 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c, \u043a\u0430\u043a \u044f \u0434\u0435\u043b\u0430\u043b \u0442\u043e\u0442 \u0438\u043b\u0438 \u0438\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u044d\u0442\u043e\u0433\u043e \u043f\u043b\u0430\u0433\u0438\u043d\u0430.<\/p>\n<p>\u0418\u0442\u0430\u043a, \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c. \u041f\u043b\u0430\u0433\u0438\u043d GFT \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u043a\u0430\u043a Android-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a. \u0427\u0442\u043e \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442? \u042f \u0440\u0430\u0431\u043e\u0442\u0430\u044e \u0441 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043b\u0435\u0436\u0438\u0442 \u0432 \u043e\u0434\u043d\u043e\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u2014 \u0432 \u043d\u0451\u043c \u043f\u0438\u0448\u0443\u0442 \u0441\u0432\u043e\u0439 \u043a\u043e\u0434 \u0432\u0441\u0435 Android-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438. \u041c\u044b \u0432\u0441\u0435 \u0438\u043c\u0435\u0435\u043c \u043e\u0434\u043d\u0443 \u0442\u043e\u0447\u043a\u0443 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u2014 \u0432\u0435\u0442\u043a\u0443 <strong>develop<\/strong>. \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u043f\u0440\u0438 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u043c <strong>develop<\/strong> \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0438\u043c\u0435\u0435\u0442 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u0434\u043b\u044f GFT.<\/p>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0432 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u043f\u043e \u043f\u043b\u0430\u0433\u0438\u043d\u0443, \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u0447\u0442\u043e \u0435\u0433\u043e \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u044e\u0442 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f AS, \u043d\u043e \u0438 \u0434\u043b\u044f \u0434\u0440\u0443\u0433\u0438\u0445 Jetbrains IDE.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0422\u0430\u043a\u0438\u0445 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0439 \u043d\u0435\u043c\u043d\u043e\u0433\u043e, \u043d\u043e \u0438 \u043f\u043b\u0430\u0433\u0438\u043d \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0439 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439. \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0443 \u0432\u0430\u0441 100 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u0432 \u0441 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u043c\u0438, \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043e\u0439 \u0438 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u043e\u043c. \u041a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044f \u00ab\u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u0432\u043d\u0443\u0442\u0440\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u00bb \u0434\u043b\u044f \u0432\u0430\u0441 \u043a\u0440\u0430\u0439\u043d\u0435 \u043d\u0435 \u0443\u0434\u043e\u0431\u043d\u0430\u044f. \u0412\u0435\u0434\u044c \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c 100 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0445 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u0432 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438. \u0417\u0432\u0443\u0447\u0438\u0442 \u043a\u0430\u043a \u043f\u043e\u0434\u0432\u0438\u0433, \u0434\u043e\u0441\u0442\u043e\u0439\u043d\u044b\u0439 \u0413\u0435\u0440\u0430\u043a\u043b\u0430.<\/p>\n<p>\u0410 \u0437\u043d\u0430\u0447\u0438\u0442, \u043d\u0430\u0434\u043e \u043d\u0430\u0443\u0447\u0438\u0442\u044c \u043f\u043b\u0430\u0433\u0438\u043d \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u0432\u043d\u0443\u0442\u0440\u0438 IDE. \u0422\u043e\u0433\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u0432 \u043e\u0434\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435.<\/p>\n<h3>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0438\u043b\u0438, \u043d\u0430\u043a\u0438\u0434\u0430\u0435\u043c MVP.<\/h3>\n<p>\u041f\u043b\u0430\u043d MVP:<\/p>\n<ol>\n<li>\n<p>\u041f\u0440\u0438 \u043a\u043b\u0438\u043a\u0435 \u043f\u0440\u0430\u0432\u043e\u0439 \u043a\u043d\u043e\u043f\u043a\u043e\u0439 \u043c\u044b\u0448\u0438 \u043d\u0430 \u0448\u0430\u0431\u043b\u043e\u043d GFT, \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u043e\u043c \u043c\u0435\u043d\u044e \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043a\u043d\u043e\u043f\u043a\u0438 \u00abCopy Template\u00bb \u0438 \u00abMove Template\u00bb<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0435\u043c \u0438\u043b\u0438 \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0448\u0430\u0431\u043b\u043e\u043d \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0441 IDE<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0438 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0434\u0430\u0451\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d<\/p>\n<\/li>\n<li>\n<p>\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c \u043d\u0430\u0448\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u0432 project tool.<\/p>\n<\/li>\n<\/ol>\n<p>\u041f\u043b\u0430\u043d \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439, \u0444\u0438\u0447\u0430 \u043f\u0440\u043e\u0441\u0442\u0430\u044f. \u041d\u0443, \u0447\u0430\u0441\u0430 4 \u0440\u0430\u0431\u043e\u0442\u044b, \u2014 \u043f\u043e\u0434\u0443\u043c\u0430\u043b \u044f \u0438 \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043b.<\/p>\n<h3>\u0414\u0435\u043d\u044c \u043f\u0435\u0440\u0432\u044b\u0439. \u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 IDE?<\/h3>\n<p>\u041d\u0430 \u0447\u0430\u0441\u0430\u0445 20:10, \u043a\u043b\u0430\u0441\u0441\u0438\u043a\u0430, \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c. \u0421\u043e\u0437\u0434\u0430\u0435\u043c Action \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u2014<strong> <\/strong><a href=\"https:\/\/github.com\/Louco11\/Group-File-Template-GFT\/blob\/master\/src\/main\/kotlin\/com\/arch\/temp\/actions\/MigrateTemplateAction.kt\"><strong><u>MigrateTemplateAction : Action()<\/u><\/strong><\/a>.<strong> <\/strong>\u041d\u0430\u043c \u043d\u0443\u0436\u043d\u044b 2 \u043a\u043d\u043e\u043f\u043e\u0447\u043a\u0438, \u0437\u043d\u0430\u0447\u0438\u0442 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c \u043d\u0430\u0448 <strong>Action<\/strong> \u0432 plugin.xml 2 \u0440\u0430\u0437\u0430, \u0441 \u0440\u0430\u0437\u043d\u044b\u043c \u0438\u043c\u0435\u043d\u0435\u043c \u0438 ID.<\/p>\n<pre><code class=\"xml\">&lt;action        id=\"MigrateTemplateActionCopy\"        class=\"com.arch.temp.actions.MigrateTemplateAction\"        text=\"Copy Template\">    &lt;add-to-group group-id=\"ProjectViewPopupMenu\" anchor=\"after\" relative-to-action=\"CutCopyPasteGroup\"\/> &lt;\/action>  &lt;action        id=\"MigrateTemplateActionRemove\"        class=\"com.arch.temp.actions.MigrateTemplateAction\"        text=\"Move Template\">    &lt;add-to-group group-id=\"ProjectViewPopupMenu\" anchor=\"after\" relative-to-action=\"MigrateTemplateActionCopy\"\/> &lt;\/action><\/code><\/pre>\n<p>\u041c\u043d\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u043b\u043e\u0433\u0438\u0447\u043d\u044b\u043c \u0437\u0430\u043f\u0438\u0445\u043d\u0443\u0442\u044c \u043e\u0431\u0430 Action \u0432 \u0431\u043b\u043e\u043a \u2014 CutCopyPasteGroup.<\/p>\n<p>\u0412 Action \u0434\u0435\u043b\u0430\u0435\u043c \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0448\u0438 \u043a\u043d\u043e\u043f\u043a\u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u0438\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u044e \u043d\u0430 \u043f\u0430\u043f\u043a\u0435 \u0441 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u043c. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u043c\u0435\u0442\u043e\u0434 <strong>update<\/strong>, \u043f\u0438\u0448\u0435\u043c \u043d\u0430\u0448\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0438 \u0432\u0443\u0430\u043b\u044f \u2014 \u0432\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442!<\/p>\n<pre><code class=\"kotlin\">override fun update(e: AnActionEvent) {    val project = e.project    val pathTemplate = e.getData(CommonDataKeys.VIRTUAL_FILE)?.path    val shortMainTemplate = File(\"$pathTemplate\/$MAIN_SHORT_FILE_TEMPLATE\")    val shirtTemplate = File(\"$pathTemplate\/$MAIN FILE TEMPLATE\")    e.presentation.isEnabledAndVisible = project != null &amp;&amp; (shortMainTemplate.isFile || shortTemplate.isFile) }<\/code><\/pre>\n<figure class=\"\"><\/figure>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u043b \u043d\u0430 \u0447\u0430\u0441\u044b \u0438 \u043f\u043e\u0434\u0443\u043c\u0430\u043b: \u00ab\u041f\u0444\u0444. \u0427\u0451\u0442, \u043f\u043e\u0445\u043e\u0434\u0443, \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0441\u0434\u0435\u043b\u0430\u044e\u00bb.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u0432 \u043d\u0430\u0448\u0435\u043c <strong>Action <\/strong>\u043c\u0435\u0442\u043e\u0434 <strong>actionPerformed(actionEvent: AnActionEvent)<\/strong>. \u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432\u0441\u0451 \u043f\u0440\u043e\u0441\u0442\u043e: \u043c\u044b \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u043d\u0430 \u00abCopy Template\u00bb \u0438\u043b\u0438 \u00abMove Template\u00bb \u0438 \u043c\u0435\u0442\u043e\u0434 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f.\u00a0<\/p>\n<p>\u0411\u0435\u0440\u0451\u043c \u0438\u0437 <strong>actionEvent.getData(CommonDataKeys.VIRTUAL_FILE) <\/strong><a href=\"https:\/\/plugins.jetbrains.com\/docs\/intellij\/virtual-file-system.html\"><u>VirtualFile<\/u><\/a> \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043c\u044b \u043a\u043b\u0438\u043a\u043d\u0443\u043b\u0438. \u041e\u0442\u043b\u0438\u0447\u043d\u043e! \u041f\u0435\u0440\u0432\u044b\u0439 \u043f\u0443\u0442\u044c, \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u043e\u0442\u043a\u0443\u0434\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0442\u044c, \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c. \u0414\u0430\u043b\u0435\u0435, \u0431\u0435\u0440\u0451\u043c \u043f\u0443\u0442\u044c \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u043a\u0443\u0434\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0442\u044c. \u0422\u0430\u043a, \u0441\u0442\u043e\u043f, \u0430 \u043e\u0442\u043a\u0443\u0434\u0430 \u0435\u0433\u043e \u0431\u0440\u0430\u0442\u044c? \u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0432 IDE?<\/p>\n<p>\u041d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u043e\u0442\u0432\u0435\u0447\u0430\u0442\u044c \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441\u044b:<\/p>\n<ul>\n<li>\n<p>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 IDE? \u0417\u0432\u0443\u0447\u0438\u0442 \u043a\u0430\u043a \u0442\u043e, \u0433\u0434\u0435 \u043b\u0435\u0436\u0430\u0442 \u043a\u043e\u043d\u0444\u0438\u0433 \u0444\u0430\u0439\u043b\u044b \u0441\u0430\u043c\u043e\u0439 IDE. \u0425\u043e\u0442\u044f \u0442\u0443\u0442 \u044f \u0438\u0441\u043f\u044b\u0442\u044b\u0432\u0430\u044e \u0441\u043e\u043c\u043d\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p>\u041e\u0442\u043a\u0443\u0434\u0430 \u0431\u0440\u0430\u0442\u044c? \u041d\u0443, \u043d\u0430\u0432\u0435\u0440\u043d\u043e\u0435, \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c \u043f\u0443\u0442\u044c, \u043d\u0435 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 project, \u0430 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 application.<\/p>\n<\/li>\n<\/ul>\n<p>\u041d\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u043e. \u041b\u0430\u0434\u043d\u043e. \u0417\u043d\u0430\u0447\u0438\u0442 \u0447\u0442\u043e? \u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e, \u0441\u0442\u0430\u0432\u0438\u043c \u0431\u0440\u0435\u0439\u043a\u043f\u043e\u0438\u043d\u0442 \u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u0448\u0435\u0440\u0441\u0442\u0438\u0442\u044c \u0432\u0441\u0451, \u0447\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448\u0438\u043c \u0432\u043e\u043f\u0440\u043e\u0441\u0430\u043c. \u041d\u0430 \u0447\u0430\u0441\u0430\u0445 00:30.\u00a0<\/p>\n<p>\u041d\u0430\u0448\u0451\u043b \u0447\u0443\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u043d\u0438\u0447\u0435\u0433\u043e. \u041f\u0430\u0440\u0443 \u043f\u0440\u0438\u043a\u043e\u043b\u044c\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <strong>File.separatorChar, <\/strong>\u043e\u043d \u043e\u0442\u0434\u0430\u0435\u0442 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 OS \u043a\u043e\u043c\u043f\u0430. \u041f\u043e\u043b\u0435\u0437\u043d\u043e, \u043d\u043e \u043d\u0435 \u0442\u043e, \u0447\u0442\u043e \u044f \u0438\u0441\u043a\u0430\u043b.\u00a0<\/p>\n<p>\u041b\u0430\u0430\u0430\u0430\u0430\u0434\u043d\u043e. \u0418\u0434\u0443 \u0432 <a href=\"https:\/\/plugins.jetbrains.com\/docs\/intellij\/welcome.html\"><u>\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e<\/u><\/a>, \u043f\u043e\u0447\u0442\u0438 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043d\u0430\u0445\u043e\u0436\u0443. \u0412\u0441\u0451 \u043d\u0435 \u0442\u043e. \u041d\u0430 \u0447\u0430\u0441\u0430\u0445 01:20. \u041c\u044b \u043f\u0440\u043e\u0438\u0433\u0440\u0430\u043b\u0438 \u044d\u0442\u0443 \u0431\u0438\u0442\u0432\u0443, \u043f\u043e\u0440\u0430 \u0441\u043f\u0430\u0442\u044c.<\/p>\n<h3>\u0414\u0435\u043d\u044c \u0432\u0442\u043e\u0440\u043e\u0439. Scratch files.<\/h3>\n<p>\u041d\u043e\u0447\u044c\u044e \u043c\u043d\u0435 \u043d\u0435 \u043f\u0440\u0438\u0441\u043d\u0438\u043b\u043e\u0441\u044c \u0433\u0435\u043d\u0438\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435. \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u0448\u0435\u0440\u0441\u0442\u044e \u0444\u043e\u0440\u0443\u043c\u044b, \u0431\u043b\u043e\u0433\u0438 \u0438 \u043d\u0430\u0442\u044b\u043a\u0430\u044e\u0441\u044c \u043d\u0430 <a href=\"https:\/\/www.jetbrains.com\/help\/idea\/scratches.html\"><strong><u>Scratch files<\/u><\/strong><\/a>.\u00a0<\/p>\n<p><strong>Scratch-\u0444\u0430\u0439\u043b\u044b<\/strong> \u2014 \u044d\u0442\u043e \u043f\u043e\u043b\u043d\u043e\u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435, \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u044b\u0435 \u0438 \u043e\u0442\u043b\u0430\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0435 \u0444\u0430\u0439\u043b\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442 \u043f\u043e\u0434\u0441\u0432\u0435\u0442\u043a\u0443 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430, \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435 \u043a\u043e\u0434\u0430 \u0438 \u0432\u0441\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u0442\u0438\u043f\u0430 \u0444\u0430\u0439\u043b\u043e\u0432. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0430\u0434 \u043e\u0434\u043d\u0438\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c \u0443 \u0432\u0430\u0441 \u043c\u043e\u0436\u0435\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442\u044c \u0438\u0434\u0435\u044f \u043c\u0435\u0442\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0434\u0440\u0443\u0433\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435. <strong>\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u0444\u0430\u0439\u043b \u0441 \u0447\u0435\u0440\u043d\u043e\u0432\u0438\u043a\u043e\u043c \u043c\u0435\u0442\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u043d\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0442\u043a\u0440\u044b\u0442 \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u043d\u0430\u0434 \u043b\u044e\u0431\u044b\u043c \u0434\u0440\u0443\u0433\u0438\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c.<\/strong><\/p>\n<p><strong><\/strong>\u0423\u0440\u0430! \u041f\u0435\u0440\u0432\u0430\u044f \u0441\u0442\u043e\u044f\u0449\u0430\u044f \u0437\u0430\u0446\u0435\u043f\u043a\u0430! \u042d\u0442\u043e \u0436\u0435 \u0442\u043e, \u0447\u0442\u043e \u044f \u0445\u043e\u0447\u0443 \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u043d\u0443 \u043f\u0440\u044f\u043c \u0442\u043e\u0447\u044c-\u0432-\u0442\u043e\u0447\u044c. \u0420\u0430\u043d\u044c\u0448\u0435 \u044f \u0434\u0443\u043c\u0430\u043b, \u0447\u0442\u043e \u044d\u0442\u043e Scratch-\u0444\u0430\u0439\u043b\u044b \u2014 \u044d\u0442\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b. \u0412\u0441\u044f\u043a\u0443\u044e \u0442\u0440\u0435\u0431\u0443\u0445\u0443 \u0442\u0443\u0434\u0430 \u043a\u0438\u0434\u0430\u043b: JSON \u0438\u0437 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043f\u043e\u043a\u0440\u0443\u0442\u0438\u0442\u044c, main \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043f\u043e \u0431\u044b\u0441\u0442\u0440\u043e\u043c\u0443 \u0432\u044b\u0437\u0432\u0430\u0442\u044c. \u0410 \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u044f \u043c\u0438\u043a\u0441\u0435\u0440\u043e\u043c \u0448\u0443\u0440\u0443\u043f\u044b \u043a\u0440\u0443\u0447\u0443.<\/p>\n<p>\u0415\u0441\u043b\u0438 Scratch-\u0444\u0430\u0439\u043b\u044b \u043d\u0435 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435, \u0437\u043d\u0430\u0447\u0438\u0442 \u043e\u043d\u0438 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0433\u0434\u0435-\u0442\u043e \u0432\u043e \u0432\u043d\u0435\u0448\u043d\u0435\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435. \u041d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u043d\u0430\u0448 \u0441\u0451\u0440\u0447, \u043d\u0430 \u0447\u0430\u0441\u0430\u0445 20:15. \u0422\u0430\u043f\u0430\u0435\u043c \u0434\u0432\u0430\u0436\u0434\u044b \u043d\u0430 Shift, \u0432\u0431\u0438\u0432\u0430\u0435\u043c Scratch.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u041d\u0430\u0445\u043e\u0434\u0438\u043c 2 \u043e\u0431\u044a\u0435\u043a\u0442\u0430: ScratchFileService \u0438 ScratchTreeStructureProvider. \u0417\u0430\u0445\u043e\u0434\u0438\u043c \u0432 ScratchFileService \u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u043c\u0435\u0442\u043e\u0434 <strong>getRootPath.<\/strong><\/p>\n<pre><code class=\"java\">public @SystemIndependent @NotNull String getRootPath(@NotNull RootType rootType) {        return myRootPaths.get(rootType.getId()); }<\/code><\/pre>\n<p>\u0427\u0442\u043e \u043c\u044b \u0432\u0438\u0434\u0438\u043c: myRootPaths \u2014 \u044d\u0442\u043e <strong>ConcurrentMap&lt;String, String> myRootPaths = ConcurrentFactoryMap.createMap(ScratchFileServiceImpl::calcRootPath), <\/strong>\u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e<strong> <\/strong>\u043f\u043e <strong>rootType.Id <\/strong>\u0432\u044b\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0443\u0442\u044c. \u041b\u0435\u0437\u0435\u043c \u0432<strong> calcRootPath.<\/strong><\/p>\n<pre><code class=\"java\">private static @SystemIndependent @NotNull String calcRootPath(@NotNull String rootId) {  String path = System.getProperty(PathManager.PROPERTY_SCRATCH_PATH + \"\/\" + rootId);  if (path != null &amp;&amp; path.length() > 2 &amp;&amp; path.charAt(0) == '\\\"') {        path = StringUtil.unquoteString(path);  }  return path != null ? FileUtil.toSystemIndependentName(path) :        FileUtil.toSystemIndependentName(PathManager.getScratchPath()) + \"\/\" + rootId; }<\/code><\/pre>\n<p>\u0427\u0442\u043e \u0432\u0438\u0434\u043d\u043e? \u041f\u043e \u043a\u0430\u043a\u0438\u043c-\u0442\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u043c, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043f\u0443\u0442\u044c \u043a root-\u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0443. <em>PROPERTY_SCRATCH_PATH <\/em>= &#171;idea.scratch.path&#187;<\/p>\n<p>\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u043d\u0435 \u043e\u0431\u044b\u0447\u043d\u044b\u0435, \u043a \u043d\u0438\u043c \u043f\u043b\u044e\u0441\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u043a\u043e\u0439-\u0442\u043e rootId. \u041a \u0442\u043e\u043c\u0443 \u0436\u0435, \u043a\u0430\u043a \u043f\u043e\u0434\u043a\u0430\u0442\u0430\u043b\u043e\u0433.\u00a0<\/p>\n<p>\u041d\u0430\u0445\u043e\u0434\u0438\u043c <strong>ScratchRootType extends RootType<\/strong>.<strong> RootType <\/strong>\u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0435 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 myId \u0438 myDisplayName.<\/p>\n<pre><code class=\"java\">ScratchRootType() {       super(\"scratches\", LangBundle.message(\"root.type.scratches\")); }<\/code><\/pre>\n<p>RootId \u043f\u043e\u043b\u0443\u0447\u0435\u043d \u2014 \u044d\u0442\u043e \u00abscratches\u00bb. \u0415\u0449\u0451 \u043c\u044b \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e <strong>ScratchRootType <\/strong>\u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d \u0432<strong> plugin.xml<\/strong>, \u0437\u043d\u0430\u0447\u0438\u0442 \u043d\u0430\u0434\u043e \u043d\u0435 \u0437\u0430\u0431\u044b\u0442\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a\u0436\u0435.<strong> <\/strong><\/p>\n<figure class=\"full-width\"><\/figure>\n<pre><code class=\"xml\">&lt;scratch.rootType implementation=\"com.intellij.ide.scratch.ScratchRootType\"\/><\/code><\/pre>\n<p>\u0423 <strong>RootType<\/strong> \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u043c\u0435\u0442\u043e\u0434 <strong>getAllRootTypes(). <\/strong>\u041e\u043d \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0432\u0441\u0435 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 <strong>RootType.<\/strong><\/p>\n<p>\u041a\u0430\u0439\u0444, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u044f \u043c\u043e\u0433\u0443 \u043e\u0442\u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043e\u0442 <strong>RootType, <\/strong>\u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u2014 \u0438 \u0443 \u043c\u0435\u043d\u044f \u0431\u0443\u0434\u0435\u0442 \u043f\u0443\u0442\u044c \u043a \u043c\u043e\u0435\u043c\u0443 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0443 \u0441 \u0448\u0430\u0431\u043b\u043e\u043d\u0430\u043c\u0438. \u041d\u0430 \u0447\u0430\u0441\u0430\u0445 21:20 \u043f\u0435\u0440\u0432\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u043a\u043e\u0434\u0430 \u043f\u043e\u043d\u0435\u0441\u043b\u0438\u0441\u044c.<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u044e <a href=\"https:\/\/github.com\/Louco11\/Group-File-Template-GFT\/blob\/master\/src\/main\/kotlin\/com\/arch\/temp\/extension\/GFTemplateRootType.kt\"><strong><u>GFTemplateRootType: RootType(<\/u><em><u>ROOT_ID<\/u><\/em><u>, <\/u><em><u>GFT_ROOT_NAME<\/u><\/em><u>)<\/u><\/strong><\/a>\u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u044e \u0435\u0433\u043e \u0432 plugin.xml. <\/p>\n<pre><code class=\"xml\">&lt;extensions defaultExtensionNs=\"com.intellij\">    &lt;scratch.rootType implementation=\"com.arch.temp.extension.GFTemplateRootType\"\/> &lt;\/extensions><\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u044e, \u0432\u044b\u0437\u044b\u0432\u0430\u044e <strong>getAllRootTypes(), <\/strong>\u0432\u0438\u0436\u0443 \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 GFTemplateRootType<strong>. <\/strong>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u0443\u0442\u0438 \u043f\u043e\u0437\u0430\u0438\u043c\u0441\u0442\u0432\u0443\u0435\u043c \u043c\u0435\u0442\u043e\u0434 \u0443 <strong>ScratchFileServiceImpl.getInstance().getRootPath(rootType). <\/strong>\u041f\u043e\u043b\u0443\u0447\u0430\u044e \u043f\u0443\u0442\u044c \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u043a\u0443\u0434\u0430 \u043a\u043b\u0430\u0441\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d\u044b. \u041f\u043e\u0431\u0435\u0434\u0430!!! \u041c\u044b \u0437\u043d\u0430\u0435\u043c \u0442\u043e\u0447\u043a\u0443 \u0410 \u0438 \u0442\u043e\u0447\u043a\u0443 \u0411.<\/p>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u0443\u044e \u043b\u043e\u0433\u0438\u043a\u0443 \u0432 <a href=\"https:\/\/github.com\/Louco11\/Group-File-Template-GFT\/blob\/master\/src\/main\/kotlin\/com\/arch\/temp\/actions\/MigrateTemplateAction.kt\"><strong><u>MigrateTemplateAction<\/u><\/strong><\/a>, \u0434\u0435\u043b\u0430\u044e \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u043e <em>\u0442\u0435\u043a\u0441\u0442\u0443 \u043a\u043d\u043e\u043f\u043a\u0438<\/em>. \u0418 \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044c \u0432 \u043d\u0435\u0434\u043e\u0443\u043c\u0435\u043d\u0438\u0438 \u00ab\u0421\u0435\u0440\u044c\u0435\u0437\u043d\u043e? \u041f\u043e \u0442\u0435\u043a\u0441\u0442\u0443? \u0423 \u043d\u0430\u0441 \u0436\u0435 \u0435\u0441\u0442\u044c \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0435 ID!\u00bb \u041f\u0440\u0438\u043a\u0438\u043d\u044c, \u044f \u0442\u0430\u043a \u0438 \u043d\u0435 \u043d\u0430\u0448\u0451\u043b, \u043a\u0430\u043a \u0438\u0437 <strong>Action <\/strong>\u0432\u044b\u0442\u0430\u0449\u0438\u0442\u044c \u0435\u0433\u043e ID (\u0435\u0441\u043b\u0438 \u0442\u044b \u0447\u0442\u043e-\u0442\u043e \u043e\u0431 \u044d\u0442\u043e\u043c \u0437\u043d\u0430\u0435\u0448\u044c, \u0431\u0435\u0433\u0438 \u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u044b, \u0434\u043e\u0431\u0440\u044b\u0439 \u0447\u0435\u043b\u043e\u0432\u0435\u043a), \u044d\u0442\u043e \u0435\u0449\u0451 \u0447\u0430\u0441 \u043f\u043e\u0442\u0440\u0430\u0447\u0435\u043d\u043d\u044b\u0439 \u0432 \u043f\u0443\u0441\u0442\u0443\u044e. \u041f\u0435\u0440\u0435\u0434 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0435\u043c \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u0434\u0438\u0430\u043b\u043e\u0433 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u0430.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0418 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432\u0441\u0451 \u2014 \u043d\u0430\u0448\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f \u0432 IDE. \u041d\u043e \u043c\u044b \u043f\u043e\u043a\u0430 \u043d\u0435 \u0432\u0438\u0434\u0438\u043c \u0438\u0445 \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432. \u041f\u043e\u043d\u0435\u0441\u043b\u0430\u0441\u044c! \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u044e \u0432 <strong>ListTemplateActionGroup <\/strong>\u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 root \u043a\u0430\u0442\u0430\u043b\u043e\u0433, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043c\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432.<\/p>\n<pre><code class=\"kotlin\">fun AnActionEvent.getListTemplate(): List&lt;MainClassJson> {    val listTemplate = mutableListOf&lt;MainClassJson>()      getData(CommonDataKeys.PROJECT)?.let {        val basePath = getBasePathTemplate()        listTemplate.addAll(getListMainClassTemplate(basePath))    }    val pathHomeTemplate = getRootPathTemplate()    listTemplate.addAll(getListMainClassTemplate(pathHomeTemplate))    return listTemplate }<\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0412\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438 \u0434\u0430\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u0432\u0441\u0451 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e. \u041d\u0430 \u0447\u0430\u0441\u0430\u0445 00:40, \u043d\u0430\u0433\u0440\u0430\u0436\u0434\u0430\u0435\u043c \u0441\u0435\u0431\u044f \u0448\u043e\u043a\u043e\u043b\u0430\u0434\u043a\u043e\u0439 \u0438 \u0441\u043f\u0430\u0442\u044c.<\/p>\n<h3>\u0414\u0435\u043d\u044c \u0442\u0440\u0435\u0442\u0438\u0439\/\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u044b\u0439\/\u043f\u044f\u0442\u044b\u0439. \u0411\u0430\u0437\u0430.\u00a0<\/h3>\n<p>\u0411\u043e\u043b\u044c\u0448\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0441\u0434\u0435\u043b\u0430\u043b. \u041e\u0441\u0442\u0430\u043b\u0438\u0441\u044c \u043f\u0443\u0441\u0442\u044f\u043a\u0438 \u2014 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u0432 project tool. \u0412\u0441\u0435 \u0437\u0432\u0451\u0437\u0434\u044b \u0441\u043b\u043e\u0436\u0438\u043b\u0438\u0441\u044c \u0442\u0430\u043a, \u0447\u0442\u043e \u0443 Scratch \u0444\u0430\u0439\u043b\u043e\u0432 \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u0439 \u0440\u0430\u0437\u0434\u0435\u043b.<\/p>\n<figure class=\"\"><\/figure>\n<p>\u041f\u0440\u043e\u0441\u0442\u043e \u0431\u0435\u0440\u0443 \u0438 \u0432\u0441\u0451, \u0447\u0442\u043e \u0435\u0441\u0442\u044c \u0432 <strong>ScratchTreeStructureProvider<\/strong>,<strong> <\/strong>\u043a\u043e\u043f\u0438\u0440\u0443\u044e \u0441\u0435\u0431\u0435. \u00ab\u041e\u0431\u043c\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u0441\u044f\u00bb \u0431\u0440\u0435\u0439\u043a\u043f\u043e\u0438\u043d\u0442\u0430\u043c\u0438, \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u044e\u0432\u0435\u043b\u0438\u0440\u0438\u0442\u044c: \u0442\u0443\u0442 \u043e\u0442\u0440\u0435\u0437\u0430\u0442\u044c, \u0441\u044e\u0434\u0430 \u043f\u0440\u0438\u0434\u0435\u043b\u0430\u0442\u044c, \u0442\u0443\u0442 \u043f\u0435\u0440\u0435\u0434\u0435\u043b\u0430\u0442\u044c. \u0427\u0442\u043e-\u0442\u043e \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0431\u0435\u0440\u0451\u043c \u043a\u0443\u0441\u043a\u0438 \u0438\u0437 \u0434\u0440\u0443\u0433\u0438\u0445 \u043c\u0435\u0441\u0442. \u041d\u0435 \u0431\u0443\u0434\u0443 \u0442\u043e\u043c\u0438\u0442\u044c, \u0432\u044b\u0434\u0430\u044e \u00ab\u0411\u0430\u0437\u0443\u00bb \u043a\u0430\u043a \u043d\u0430\u043c \u0437\u0430\u043a\u043e\u043d\u043d\u0435\u043a\u0442\u0438\u0442\u044c\u0441\u044f \u0441 project tool.<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u043a\u043b\u0430\u0441\u0441 <strong>TemplateProjectView<\/strong> \u0438 \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u0441\u044f \u043e\u0442 <strong>AbstractProjectViewPane<\/strong> \u0438\u043b\u0438 <strong>AbstractProjectViewPaneWithAsyncSupport.<\/strong><\/p>\n<p>\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c TemplateProjectView \u043a\u043b\u0430\u0441\u0441 \u0432 plugin.xml \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 extension.<\/p>\n<pre><code class=\"xml\">&lt;extensions defaultExtensionNs=\"com.intellij\">    &lt;projectViewPane implementation=\"com.arch.temp.projectView.TemplateProjectView\"\/> &lt;\/extensions><\/code><\/pre>\n<p>\u041f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u043c\u0435\u0442\u043e\u0434\u044b \u0438 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u043c.<\/p>\n<pre><code class=\"kotlin\">override<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\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-376758","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/376758","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=376758"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/376758\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=376758"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=376758"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=376758"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}