{"id":311226,"date":"2020-10-09T15:00:50","date_gmt":"2020-10-09T15:00:50","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=311226"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=311226","title":{"rendered":"\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 Code Improvement \u043f\u0440\u0438 \u043a\u043e\u043c\u043c\u0438\u0442\u0435 \u0432 Android Studio"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/522758\/\">\n<p>\u0420\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0433\u0438\u0442\u043e\u043c \u0432 Android Studio, \u043a\u0430\u043a \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u043c\u043e\u0436\u043d\u043e \u0434\u0432\u0443\u043c\u044f \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438.<\/p>\n<p>  <\/p>\n<p>\u041f\u0435\u0440\u0432\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0441\u043e\u043b\u044c. \u041f\u043b\u044e\u0441\u043e\u043c \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u043e\u0441\u0442\u044c. GUI \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043b\u0430\u0433\u0430\u0442\u044c \u0438 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0437\u0430\u0432\u0438\u0441\u043d\u0443\u0442\u044c \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 rebase \u0442\u0430\u043a, \u0447\u0442\u043e abort\/continue\/\u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 \u0434\u0440\u0443\u0433\u0443\u044e \u0432\u0435\u0442\u043a\u0443 \u043d\u0435 \u043f\u043e\u043c\u043e\u0436\u0435\u0442. \u041a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0432\u0430\u043c \u0432 \u043f\u043e\u043c\u043e\u0449\u044c, \u043e\u043d\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0435\u0437\u043e\u0442\u043a\u0430\u0437\u043d\u044b.<\/p>\n<p>  <\/p>\n<p>\u0412\u0442\u043e\u0440\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c GUI, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0439 Android Studio. \u041f\u043b\u044e\u0441\u044b \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b \u2014 \u043c\u0435\u043d\u044c\u0448\u0438\u0439 \u043f\u043e\u0440\u043e\u0433 \u0432\u0445\u043e\u0434\u0430, \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u0432\u043e\u043e\u0431\u0449\u0435 \u043c\u043e\u0436\u043d\u043e \u0434\u0435\u043b\u0430\u0442\u044c. \u0410 \u0442\u0430\u043a\u0436\u0435 \u0435\u0441\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043f\u043b\u044e\u0448\u043a\u0438 \u043e\u0442 \u0441\u0430\u043c\u043e\u0439 \u0441\u0442\u0443\u0434\u0438\u0438 \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0433\u0438\u0442\u043e\u043c. \u041e\u0431 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u043d\u0438\u0445 \u0438 \u043f\u043e\u0439\u0434\u0435\u0442 \u0440\u0435\u0447\u044c. \u041a\u0441\u0442\u0430\u0442\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f GUI, \u0442\u043e\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0432 \u043f\u043e\u043a\u043e\u0435 \u043c\u044b\u0448\u043a\u0443 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c hotkey<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<h1 id=\"ispolzuemye-hotkey-v-state\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 Hotkey \u0432 \u0441\u0442\u0430\u0442\u044c\u0435<\/h1>\n<p>  <\/p>\n<p>Shift+Shift (\u0434\u0432\u043e\u0439\u043d\u043e\u0435 \u043d\u0430\u0436\u0430\u0442\u0438\u0435 shift) \u2014 \u041e\u043a\u043d\u043e \u043f\u043e\u0438\u0441\u043a\u0430. \u041f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0441\u043a\u0430\u0442\u044c \u043a\u0430\u043a \u043a\u043e\u0434\/\u0440\u0435\u0441\u0443\u0440\u0441\u044b, \u0442\u0430\u043a \u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438.<\/p>\n<p>  <\/p>\n<p>Ctrl+Alt+L (\u2318+\u2325+L) \u2192 \u0424\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u0434\u0430<\/p>\n<p>  <\/p>\n<p>Shift+Ctrl+Alt+L (\u21e7+\u2318+\u2325+L) \u2192 \u0424\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u0434\u0430 \u2192 \u0424\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u0434\u0430 \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438.<\/p>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u043e\u0435 \u043e\u043a\u043d\u043e<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/4g\/kc\/gx\/4gkcgxxhroyrnnl7gklw8a5-0ey.png\" alt=\"image\"\/> <\/p>\n<\/div><\/div>\n<p>  <\/p>\n<h1 id=\"o-chem-voobsche-rech-i-gde-nayti\">\u041e \u0447\u0435\u043c \u0432\u043e\u043e\u0431\u0449\u0435 \u0440\u0435\u0447\u044c \u0438 \u0433\u0434\u0435 \u043d\u0430\u0439\u0442\u0438?<\/h1>\n<p>  <\/p>\n<p>\u041d\u0435\u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0438\u043c\u043f\u043e\u0440\u0442\u044b, \u043f\u0443\u0441\u0442\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438, \u043f\u0440\u043e\u0431\u0435\u043b\u044b \u0432\u043c\u0435\u0441\u0442\u043e \u0442\u0430\u0431\u043e\u0432 \u2014 \u044d\u0442\u0438 \u0432\u0435\u0449\u0438 \u0431\u0435\u0441\u044f\u0442, \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u0432 \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u043a\u043e\u0434, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u0439 \u0434\u043b\u044f pull request. \u0418\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u043e \u043b\u0435\u0433\u043a\u043e, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f hotkey Ctrl+Alt+L, \u043e\u0434\u043d\u0430\u043a\u043e \u0447\u0430\u0441\u0442\u043e \u043c\u044b \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c.<br \/>  Idea\/AndroidStudio \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u044c \u044d\u0442\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043f\u0435\u0440\u0435\u0434 \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u043c<\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 commit&#8217;\u0430 \u0447\u0435\u0440\u0435\u0437 Android Studio \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0442\u0430\u043a\u043e\u0433\u043e \u0432\u0438\u0434\u0430 \u043e\u043a\u043d\u043e:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/nn\/6k\/xp\/nn6kxp1l3-wzdchnoktxvk-70ng.png\"\/><\/p>\n<p>  <\/p>\n<p>\u041d\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0442 \u0433\u0430\u043b\u043e\u0447\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0441\u043f\u0440\u0430\u0432\u0430 \u043e\u0442 \u0441\u043f\u0438\u0441\u043a\u0430 \u0444\u0430\u0439\u043b\u043e\u0432, \u0432 \u0431\u043b\u043e\u043a\u0435 Before Commit. \u041f\u0440\u0438 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438 \u044d\u0442\u0438\u0445 \u043f\u043e\u043c\u043e\u0449\u043d\u0438\u043a\u043e\u0432, \u043e\u043d\u0438 \u0431\u0443\u0434\u0443\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u043a\u043e\u043c\u043c\u0438\u0442\u0435<\/p>\n<p>  <\/p>\n<h1 id=\"chem-imenno-mne-pomogut-eti-galochki\">\u0427\u0435\u043c \u0438\u043c\u0435\u043d\u043d\u043e \u043c\u043d\u0435 \u043f\u043e\u043c\u043e\u0433\u0443\u0442 \u044d\u0442\u0438 \u0433\u0430\u043b\u043e\u0447\u043a\u0438?<\/h1>\n<p>  <\/p>\n<h2 id=\"-reformat-code\">\u2713 Reformat code<\/h2>\n<p>  <\/p>\n<p>\u0414\u0430\u043d\u043d\u043e\u0435 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a\u043e\u0434 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0432\u0430\u0448\u0438\u043c code style. \u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e ctrl+shift+alt+L \u0441 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u043c clean up.<\/p>\n<p>  <\/p>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c code style \u043c\u043e\u0436\u043d\u043e \u0437\u0434\u0435\u0441\u044c Settings \u2192 Editor \u2192 Code Style<\/p>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">Tab and Indents<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<p>\u041f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442 \u043e\u0442\u0441\u0442\u0443\u043f\u044b \u0441\u0442\u0440\u043e\u043a \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 code style (\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0432 Code Style, \u0432 \u043e\u0434\u043d\u043e\u0438\u043c\u0435\u043d\u043d\u043e\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435)<\/p>\n<p>  <\/p>\n<blockquote><p>\u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043f\u0440\u043e\u0431\u0435\u043b\u044b, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u0442\u0441\u0442\u0443\u043f\u0430 (\u043e\u0442\u043c\u0435\u0447\u0435\u043d\u044b \u0442\u043e\u0447\u043a\u0430\u043c\u0438), \u0431\u0443\u0434\u0443\u0442 \u0437\u0430\u043c\u0435\u043d\u044b \u0442\u0430\u0431\u0430\u043c\u0438 (\u043e\u0442\u043c\u0435\u0447\u0435\u043d\u044b \u0441\u0442\u0440\u0435\u043b\u043a\u043e\u0439)<\/p><\/blockquote>\n<p>\u0414\u043e \u043a\u043e\u043c\u043c\u0438\u0442\u0430<\/p>\n<p>  <\/p>\n<pre><code class=\"kotlin\">class CleanTab(context: Context) {  ....val date = Date()  ....val button = Button(context) ....val textView = TextView(context) ....val ratingBar = RatingBar(context) ....val imageView = ImageView(context) }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043a\u043e\u043c\u043c\u0438\u0442\u0430<\/p>\n<p>  <\/p>\n<pre><code class=\"kotlin\">class CleanTab(context: Context) {  -&gt; val date = Date()  -&gt; val button = Button(context) -&gt; val textView = TextView(context) -&gt; val ratingBar = RatingBar(context) -&gt; val imageView = ImageView(context) }<\/code><\/pre>\n<\/div><\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">Spaces<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<p>\u0424\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u0443\u0435\u0442 \u0432\u0441\u0435 \u043f\u0440\u043e\u0431\u0435\u043b\u044b \u0432 \u043a\u043e\u0434\u0435 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 code-style.<\/p>\n<p>  <\/p>\n<blockquote><p>\u0411\u0443\u0434\u0443\u0442 \u0443\u0434\u0430\u043b\u0435\u043d\u044b \u043b\u0438\u0448\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u0435\u043b\u044b \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0435 Date, \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b \u043f\u0440\u043e\u0431\u0435\u043b\u044b \u043c\u0435\u0436\u0434\u0443 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 button \u0438 =, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043c\u0435\u0436\u0434\u0443 \u0441\u043f\u0438\u0441\u043a\u043e\u043c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 args \u0432 main \u0438 {<\/p><\/blockquote>\n<p>\u0414\u043e \u043a\u043e\u043c\u043c\u0438\u0442\u0430<\/p>\n<p>  <\/p>\n<pre><code class=\"kotlin\">class CleanSpaces(context:Context) {      val date = Date( )      val button= Button(context)      fun main(arg: Args){      } }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043a\u043e\u043c\u043c\u0438\u0442\u0430<\/p>\n<p>  <\/p>\n<pre><code class=\"kotlin\">class CleanSpaces(context: Context) {      val date = Date()      val button = Button(context)      fun main(arg: Args) {      } }<\/code><\/pre>\n<\/div><\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">Wrapping and Braces<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<p>\u042d\u0442\u043e\u0442 \u0431\u043b\u043e\u043a \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u043e\u043c \u0441\u0442\u0440\u043e\u043a. \u041f\u0435\u0440\u0435\u043d\u043e\u0441\u044f\u0442\u0441\u044f \u043a\u0430\u043a \u0441\u0430\u043c\u0438 \u0441\u0442\u0440\u043e\u043a\u0438 \u043a\u043e\u0434\u0430, \u0442\u0430\u043a \u0438 \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0438\u0435\/\u043e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0438\u0435 \u0441\u043a\u043e\u0431\u043a\u0438.<\/p>\n<p>  <\/p>\n<blockquote><p>\u0421\u0442\u0440\u043e\u0447\u043a\u0430 else, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441\u0442\u0440\u043e\u0447\u043a\u0430 catch \u0434\u043e\u043b\u0436\u043d\u044b \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0442\u043e\u0439 \u0436\u0435 \u043b\u0438\u043d\u0438\u0438, \u0447\u0442\u043e \u0438 \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u0441\u043a\u043e\u0431\u043a\u0430 (\u0442\u0430\u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043e \u0432 code style)<br \/>  \u041e\u0431\u0449\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u043d\u0430 \u0441\u0442\u0440\u043e\u043a\u0435 \u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 manyArguments \u0432\u044b\u0448\u043b\u043e \u0437\u0430 80 \u0437\u043d\u0430\u043a\u043e\u0432(\u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043e \u0432 code style), \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u0431\u0443\u0434\u0443\u0442 \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0435\u043d\u044b \u043d\u0430 \u043d\u043e\u0432\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443<\/p><\/blockquote>\n<p>\u0414\u043e \u043a\u043e\u043c\u043c\u0438\u0442\u0430<\/p>\n<p>  <\/p>\n<pre><code class=\"kotlin\">class CleanWrappingAndBraces {      fun condition() {         if (liveData != null) {             &lt;..&gt;         }         else {             &lt;..&gt;         }     }      fun catching() {         try {             &lt;..&gt;         }         catch (e: Exception) {             &lt;..&gt;         }     }      fun manyArguments(userId: Int, issuerCountryId: String, sendingCountryId: String, receivingCountryId: String) {      } }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043a\u043e\u043c\u043c\u0438\u0442\u0430<\/p>\n<p>  <\/p>\n<pre><code class=\"kotlin\">class CleanWrappingAndBraces {      fun condition() {         if (liveData != null) {             &lt;..&gt;         } else {             &lt;..&gt;         }     }      fun catching() {         try {             &lt;..&gt;         } catch (e: Exception) {             &lt;..&gt;         }     }      fun manyArguments(userId: Int, issuerCountryId: String,                     sendingCountryId: String,                     receivingCountryId: String) {  }<\/code><\/pre>\n<\/div><\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">Blank Lines<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<p>\u0420\u0435\u0433\u0443\u043b\u0438\u0440\u0443\u0435\u0442 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0438 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0443\u0441\u0442\u044b\u0445 \u0441\u0442\u0440\u043e\u0447\u0435\u043a \u0432 \u043a\u043e\u0434\u0435. (\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0432 Code Style, \u0432 \u043e\u0434\u043d\u043e\u0438\u043c\u0435\u043d\u043d\u043e\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435)<\/p>\n<p>  <\/p>\n<blockquote><p>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0443\u0434\u0430\u043b\u0438\u0442 \u043b\u0438\u0448\u043d\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u043e\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043e }, \u0430 \u0442\u0430\u043a\u0436\u0435 2 \u043b\u0438\u0448\u043d\u0438\u0445 \u043f\u0443\u0441\u0442\u044b\u0445 \u0441\u0442\u0440\u043e\u0447\u043a\u0438 \u043c\u0435\u0436\u0434\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438<\/p><\/blockquote>\n<p>\u0414\u043e \u043a\u043e\u043c\u043c\u0438\u0442\u0430<\/p>\n<p>  <\/p>\n<pre><code class=\"kotlin\">class CleanBlank {      fun foo() {      }      fun bar() {      }  }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043a\u043e\u043c\u043c\u0438\u0442\u0430<\/p>\n<p>  <\/p>\n<pre><code class=\"kotlin\">class CleanBlank {      fun foo() {      }      fun bar() {      }  }<\/code><\/pre>\n<\/div><\/div>\n<p>  <\/p>\n<h2 id=\"rearrange-code\">Rearrange code<\/h2>\n<p>  <\/p>\n<p>\u0420\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0432 \u0442\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043a\u043e\u0434-\u0441\u0442\u0430\u0439\u043b\u0443. \u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 XML \u0438 HTML \u0444\u0430\u0439\u043b\u0430\u0445. \u041d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u043d\u043e \u0432 Setting \u2192 Editor \u2192 CodeStyle \u2192 XML\/HTML \u2192 Arrangement<\/p>\n<p>  <\/p>\n<blockquote><p>\u0412\u043d\u0438\u043c\u0430\u043d\u0438\u0435! \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u043f\u0435\u0447\u0430\u043b\u044c\u043d\u044b\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u044f\u043c. Rearrange \u043c\u043e\u0436\u0435\u0442 \u0432\u043b\u0438\u044f\u0442\u044c \u043d\u0430 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0441\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u0435 \u0432 \u0444\u0430\u0439\u043b\u0430\u0445, \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043a \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044e. \u041f\u0440\u0438\u043c\u0435\u0440: \u0432 LinearLayout, \u043f\u0440\u0438 \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0435 \u043f\u043e \u0430\u043b\u0444\u0430\u0432\u0438\u0442\u043d\u043e\u043c\u0443 \u043f\u043e\u0440\u044f\u0434\u043a\u0443, \u044d\u043b\u0435\u043c\u0435\u043d\u0442 Button \u043c\u043e\u0436\u0435\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u0441\u0442\u0438\u0442\u0441\u044f \u0432\u044b\u0448\u0435 TextView, \u0445\u043e\u0442\u044f \u043f\u043e \u0434\u0438\u0437\u0430\u0439\u043d\u0443 \u0442\u0430\u043a\u043e\u0433\u043e \u0431\u044b\u0442\u044c \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e. \u0412\u044b\u0445\u043e\u0434 \u2014 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0422\u041e\u041b\u042c\u041a\u041e \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432<\/p><\/blockquote>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0421\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<blockquote><p>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 xmlns \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0438\u043b\u0438\u0441\u044c \u0432 \u0442\u0440\u0435\u0445 \u043f\u0435\u0440\u0432\u044b\u0445 \u0441\u0442\u0440\u043e\u0447\u043a\u0430\u0445 \u0438 \u0441\u0442\u0440\u043e\u0433\u043e \u043f\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0443, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u043c\u0443 \u0432 code-style(xmlns:android \u043d\u0430 \u043f\u0435\u0440\u0432\u043e\u0439 \u0441\u0442\u0440\u043e\u0447\u043a\u0435, \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 xmlns:&lt;&#8230;&gt; \u0432 \u0430\u043b\u0444\u0430\u0432\u0438\u0442\u043d\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435.<br \/>  \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, xmlns:tools \u0438 xmlns:app \u043d\u0435 \u0431\u044b\u043b\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u044b \u0434\u0430\u0436\u0435 \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u043d\u0435\u0442 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u0438\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f. \u042d\u0442\u043e \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e rearrange \u0432\u043b\u0438\u044f\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432<\/p><\/blockquote>\n<p>\u0414\u043e \u043a\u043e\u043c\u043c\u0438\u0442\u0430<\/p>\n<p>  <\/p>\n<pre><code class=\"kotlin\">&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt; &lt;LinearLayout xmlns:android=&quot;http:\/\/schemas.android.com\/apk\/res\/android&quot;     android:layout_width=&quot;match_parent&quot;     xmlns:tools=&quot;http:\/\/schemas.android.com\/tools&quot; android:layout_height=&quot;match_parent&quot;     android:orientation=&quot;vertical&quot; xmlns:app=&quot;http:\/\/schemas.android.com\/apk\/res-auto&quot;&gt;  &lt;\/LinearLayout&gt;<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043a\u043e\u043c\u043c\u0438\u0442\u0430<\/p>\n<p>  <\/p>\n<pre><code class=\"kotlin\">&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt; &lt;LinearLayout xmlns:android=&quot;http:\/\/schemas.android.com\/apk\/res\/android&quot;     xmlns:app=&quot;http:\/\/schemas.android.com\/apk\/res-auto&quot;     xmlns:tools=&quot;http:\/\/schemas.android.com\/tools&quot;     android:layout_width=&quot;match_parent&quot;     android:layout_height=&quot;match_parent&quot;     android:orientation=&quot;vertical&quot;&gt;  &lt;\/LinearLayout&gt;<\/code><\/pre>\n<\/div><\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0421\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<blockquote><p>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0431\u043b\u043e\u043a \u0441 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430\u043c\u0438 android:padding \u0438\u0437\u043c\u0435\u043d\u0438\u0442 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 code-style. \u0422\u0430\u043a\u0436\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442 style \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0441\u044f \u0441\u0440\u0430\u0437\u0443 \u0437\u0430 android:id<\/p><\/blockquote>\n<p>\u0414\u043e \u043a\u043e\u043c\u043c\u0438\u0442\u0430<\/p>\n<p>  <\/p>\n<pre><code class=\"kotlin\">&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt; &lt;LinearLayout xmlns:android=&quot;http:\/\/schemas.android.com\/apk\/res\/android&quot;     xmlns:tools=&quot;http:\/\/schemas.android.com\/tools&quot;     android:layout_width=&quot;match_parent&quot;     android:layout_height=&quot;match_parent&quot;     android:orientation=&quot;vertical&quot;&gt;      &lt;ImageView         android:id=&quot;@+id\/imageView&quot;         android:layout_width=&quot;match_parent&quot;         android:layout_height=&quot;wrap_content&quot;         android:paddingTop=&quot;8dp&quot;         android:paddingBottom=&quot;8dp&quot;         android:paddingLeft=&quot;8dp&quot;         android:paddingRight=&quot;8dp&quot;         tools:srcCompat=&quot;@tools:sample\/avatars&quot; \/&gt;      &lt;TextView         style=&quot;@style\/TextAppearance.MaterialComponents.Body1&quot;         android:id=&quot;@+id\/title&quot;         android:layout_width=&quot;match_parent&quot;         android:layout_height=&quot;wrap_content&quot;         android:text=&quot;Hello World&quot; \/&gt;  &lt;\/LinearLayout&gt;<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043a\u043e\u043c\u043c\u0438\u0442\u0430<\/p>\n<p>  <\/p>\n<pre><code class=\"kotlin\">&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt; &lt;LinearLayout xmlns:android=&quot;http:\/\/schemas.android.com\/apk\/res\/android&quot;     xmlns:tools=&quot;http:\/\/schemas.android.com\/tools&quot;     android:layout_width=&quot;match_parent&quot;     android:layout_height=&quot;match_parent&quot;     android:orientation=&quot;vertical&quot;&gt;      &lt;ImageView         android:id=&quot;@+id\/imageView&quot;         android:layout_width=&quot;match_parent&quot;         android:layout_height=&quot;wrap_content&quot;         android:paddingLeft=&quot;8dp&quot;         android:paddingTop=&quot;8dp&quot;         android:paddingRight=&quot;8dp&quot;         android:paddingBottom=&quot;8dp&quot;         tools:srcCompat=&quot;@tools:sample\/avatars&quot; \/&gt;      &lt;TextView         android:id=&quot;@+id\/title&quot;         style=&quot;@style\/TextAppearance.MaterialComponents.Body1&quot;         android:layout_width=&quot;match_parent&quot;         android:layout_height=&quot;wrap_content&quot;         android:text=&quot;Hello World&quot; \/&gt;  &lt;\/LinearLayout&gt;<\/code><\/pre>\n<\/div><\/div>\n<p>  <\/p>\n<h2 id=\"optimize-import\">Optimize import<\/h2>\n<p>  <\/p>\n<p>\u0421\u043b\u0435\u0434\u0438\u0442 \u0437\u0430 \u0447\u0438\u0441\u0442\u043e\u0442\u043e\u0439 \u0431\u043b\u043e\u043a\u0430 \u0438\u043c\u043f\u043e\u0440\u0442\u043e\u0432 \u0438 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u0432 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0432\u0438\u0434, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 code style. \u0421\u0430\u043c\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e ctrl+shift+alt+L \u0441 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u043c optimize import.<\/p>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043d\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0438\u043c\u043f\u043e\u0440\u0442\u043e\u0432<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<blockquote><p>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043f\u0440\u0438 optimize imports import java.util.* \u0431\u0443\u0434\u0435\u0442 \u0443\u0434\u0430\u043b\u0435\u043d, \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0435\u0442 \u043f\u043e\u043b\u0435\u0439 \u0438\u043b\u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u043d\u0443\u0436\u0434\u0430\u044e\u0449\u0438\u0445\u0441\u044f \u0432 \u043d\u0435\u043c<\/p><\/blockquote>\n<p>\u0414\u043e \u043a\u043e\u043c\u043c\u0438\u0442\u0430<\/p>\n<p>  <\/p>\n<pre><code class=\"kotlin\">import android.content.Context import android.widget.Button import java.util.*  class RemoveUnused(context: Context) {      val button = Button(context) }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043a\u043e\u043c\u043c\u0438\u0442\u0430<\/p>\n<p>  <\/p>\n<pre><code class=\"kotlin\">import android.content.Context import android.widget.Button  class RemoveUnused(context: Context) {      val button = Button(context) }<\/code><\/pre>\n<\/div><\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0438\u043c\u043f\u043e\u0440\u0442\u043e\u0432<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<p>\u0415\u0441\u043b\u0438 <strong>n<\/strong> \u0438\u043b\u0438 \u0431\u043e\u043b\u0435\u0435 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430, \u0442\u043e \u0442\u0430\u043a\u043e\u0439 \u0438\u043c\u043f\u043e\u0440\u0442 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043c\u0435\u043d\u0435\u043d \u0438\u043c\u043f\u043e\u0440\u0442\u043e\u043c \u0432\u0441\u0435\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430.<br \/>  \u0415\u0441\u043b\u0438 <strong>m<\/strong> \u0438\u043b\u0438 \u0431\u043e\u043b\u0435\u0435 enum \u0438\u043b\u0438 java static \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430, \u0442\u043e \u0442\u0430\u043a\u043e\u0439 \u0438\u043c\u043f\u043e\u0440\u0442 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043c\u0435\u043d\u0435\u043d \u043d\u0430 \u0438\u043c\u043f\u043e\u0440\u0442 \u0432\u0441\u0435\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430<\/p>\n<p>  <\/p>\n<p>\u041e\u0431\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u0437\u0430\u0434\u0430\u044e\u0442\u0441\u044f \u0432 Settings \u2192 Editor \u2192 Code Style \u2192 Kotlin \u2192 Imports<\/p>\n<p>  <\/p>\n<blockquote><p>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0438\u043c\u043f\u043e\u0440\u0442\u044b \u0438\u0437 \u043f\u0430\u043a\u0435\u0442\u0430 android.widget \u0431\u0443\u0434\u0443\u0442 \u0437\u0430\u043c\u0435\u043d\u0435\u043d\u044b \u043d\u0430 android.widget.*<\/p><\/blockquote>\n<p>\u0414\u043e \u043a\u043e\u043c\u043c\u0438\u0442\u0430<\/p>\n<p>  <\/p>\n<pre><code class=\"kotlin\">import android.content.Context import android.widget.Button import android.widget.ImageButton import android.widget.ImageView import android.widget.TextView import android.widget.RatingBar import java.util.*  class MergeImport(context: Context) {      &lt;..&gt; }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043a\u043e\u043c\u043c\u0438\u0442\u0430<\/p>\n<p>  <\/p>\n<pre><code class=\"kotlin\">import android.content.Context import android.widget.* import java.util.*  class MergeImport(context: Context) {      &lt;..&gt; }<\/code><\/pre>\n<p>  <\/p>\n<blockquote><p>\u0412 \u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u0441\u0442\u043e\u0438\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043d\u0435 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0442\u044c \u0438\u043c\u043f\u043e\u0440\u0442\u044b(m = 0, n=0), \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u043d\u044b\u0435 \u0438\u043c\u043f\u043e\u0440\u0442\u044b(\u0438\u043c\u043f\u043e\u0440\u0442 \u043f\u0430\u043a\u0435\u0442\u0430) \u0431\u0443\u0434\u0443\u0442 \u0437\u0430\u043c\u0435\u043d\u0435\u043d\u044b \u0438\u043c\u043f\u043e\u0440\u0442\u043e\u043c \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430\/\u0444\u0443\u043d\u043a\u0446\u0438\u0438\/\u043f\u043e\u043b\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e.<br \/>  \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0438\u0436\u0435 import android.widget.<em> \u0438 import java.util.<\/em> \u0431\u0443\u0434\u0443\u0442 \u0443\u043f\u0440\u0430\u0437\u0434\u043d\u0435\u043d\u044b<\/p><\/blockquote>\n<p>\u0414\u043e \u043a\u043e\u043c\u043c\u0438\u0442\u0430<\/p>\n<p>  <\/p>\n<pre><code class=\"kotlin\">import android.content.Context import android.widget.* import java.util.*  class MergeImport(context: Context) {      &lt;..&gt;<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043a\u043e\u043c\u043c\u0438\u0442\u0430<\/p>\n<p>  <\/p>\n<pre><code class=\"kotlin\">import android.content.Context import android.widget.Button import android.widget.ImageButton import android.widget.ImageView import android.widget.TextView import android.widget.RatingBar import java.util.*  class MergeImport(context: Context) {      &lt;..&gt; }<\/code><\/pre>\n<\/div><\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0420\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e \u0430\u043b\u0444\u0430\u0432\u0438\u0442\u0443<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<blockquote><p>\u041f\u043e\u0441\u043b\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u0432\u0441\u0435 \u0438\u043c\u043f\u043e\u0440\u0442\u044b \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u0443\u044e\u0442\u0441\u044f, \u0438 \u0431\u0443\u0434\u0443\u0442 \u0443\u0434\u043e\u0431\u043d\u043e \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0442\u044c\u0441\u044f \u0432 \u0430\u043b\u0444\u0430\u0432\u0438\u0442\u043d\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435<\/p><\/blockquote>\n<p>\u0414\u043e \u043a\u043e\u043c\u043c\u0438\u0442\u0430<\/p>\n<p>  <\/p>\n<pre><code class=\"kotlin\">import android.content.Context import android.widget.Button import android.widget.ImageView import android.widget.TextView import java.util.* import android.widget.RatingBar  class SortImport(context: Context) {      &lt;..&gt; }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043a\u043e\u043c\u043c\u0438\u0442\u0430<\/p>\n<p>  <\/p>\n<pre><code class=\"kotlin\">import android.content.Context import android.widget.Button import android.widget.ImageView import android.widget.RatingBar import android.widget.TextView import java.util.*  class SortImport(context: Context) {      &lt;..&gt; }<\/code><\/pre>\n<\/div><\/div>\n<p>  <\/p>\n<h2 id=\"perform-code-analysis\">Perform code analysis<\/h2>\n<p>  <\/p>\n<p>\u041f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043d\u044b\u0435 \u043c\u0435\u0441\u0442\u0430. \u041d\u043e\u0441\u0438\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440 \u0438 \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u043c\u0435\u043d\u044f\u0435\u0442 \u043a\u043e\u0434. \u0421\u0430\u043c\u044b\u0435 \u0447\u0430\u0441\u0442\u044b\u0435 \u0441\u043b\u0443\u0447\u0430\u0438 \u2014 \u043d\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u0434\u0430, \u043f\u043e\u043c\u0435\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u043a\u0430\u043a Deprecated<\/p>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430 \u0441 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u044b\u043c\u0438 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u044f\u043c\u0438<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"kotlin\">fun TextView.format(message: String) {    val htmlText = Html.fromHtml(message) }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0435\u0440\u0435\u0434 \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u043c \u0441\u0442\u0443\u0434\u0438\u044f \u043f\u043e\u0434\u0441\u043a\u0430\u0436\u0435\u0442, \u0447\u0442\u043e \u0435\u0441\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u043a\u043e\u0434\u043e\u043c \u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442 \u0438\u0445 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u0435\u0435:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/qy\/o4\/ke\/qyo4keoa_fcybx1chcrjg031kj0.png\"\/><\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u0438 \u043d\u0430\u0436\u0430\u0442\u0438\u0438 \u043d\u0430 Review \u043f\u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u0441\u043f\u0438\u0441\u043e\u043a \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/qy\/o4\/ke\/qyo4keoa_fcybx1chcrjg031kj0.png\"\/><\/p>\n<\/div><\/div>\n<p>  <\/p>\n<h2 id=\"check-todo\">Check TODO<\/h2>\n<p>  <\/p>\n<p>\u041e\u0447\u0435\u043d\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u0430\u044f \u0433\u0430\u043b\u043e\u0447\u043a\u0430, \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043d\u0435 \u0437\u0430\u0431\u044b\u0442\u044c \u043e \u043d\u043e\u0432\u044b\u0445 TODO, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u0438 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u0438\u043c\u0435\u043d\u043d\u043e \u0432 \u044d\u0442\u043e\u043c \u043a\u043e\u043c\u043c\u0438\u0442\u0435. \u0411\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e, \u0441\u0442\u0443\u0434\u0438\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \/\/TODO, \u043d\u043e \u0438 \/\/FIXME, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043b\u044e\u0431\u044b\u0435 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 todo, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b \u0447\u0435\u0440\u0435\u0437 Setting \u2192 Editor \u2192 TODO.<\/p>\n<p>  <\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a todo, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0442\u0443\u0434\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c.<\/p>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0422\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0430 \u0441\u0442\u0443\u0434\u0438\u0438, \u0447\u0442\u043e \u0431\u044b\u043b \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d todo. \u041f\u0440\u0438 \u043d\u0430\u0436\u0430\u0442\u0438\u0438 \u043d\u0430 review \u043e\u043d \u043f\u043e\u043a\u0430\u0436\u0435\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u043d\u043e\u0432\u044b\u0445 todo \u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442 \u0438\u0445 \u043f\u0435\u0440\u0435\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/qy\/o4\/ke\/qyo4keoa_fcybx1chcrjg031kj0.png\"\/><\/p>\n<\/div><\/div>\n<p>  <\/p>\n<h2 id=\"clean-up\">Clean up<\/h2>\n<p>  <\/p>\n<p>\u041e\u0447\u0435\u043d\u044c \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043a\u043e\u0434 \u0432 \u0447\u0438\u0441\u0442\u043e\u0442\u0435. \u0423\u0434\u0430\u043b\u044f\u0435\u0442 \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u044b\u0439 \u043a\u043e\u0434 (\u0441\u043c. \u043f\u0440\u0438\u043c\u0435\u0440\u044b), \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u0442 deprecated \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e Actions \u2192 Code cleanup. \u0414\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u043d\u043e \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u044d\u0442\u0438\u043c \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438 \u043e\u043f\u0430\u0441\u043d\u043e\u0439.<\/p>\n<p>  <\/p>\n<p>\u0418\u0437 \u0437\u0430\u043c\u0435\u0447\u0435\u043d\u043d\u044b\u0445 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0435\u0439 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u0434\u0432\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u0437\u0430\u043c\u0435\u043d\u0430 deprecated \u043c\u0435\u0442\u043e\u0434\u043e\u0432 (\u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043d\u0438\u0436\u0435) <\/li>\n<li>\u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u0443\u044e \u0437\u0430\u043c\u0435\u043d\u0443 \u0432\u044b\u0437\u043e\u0432\u0430 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 view \u0432 \u043f\u0440\u0435\u0437\u0435\u043d\u0442\u0435\u0440\u0435 \u0432 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u043b\u0438\u0447\u043d\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u0435\u0432<\/li>\n<\/ul>\n<p>  <\/p>\n<blockquote><p>! \u041e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0435\u0440\u0435\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0438\u0439\u0441\u044f \u043a\u043e\u043c\u043c\u0438\u0442, \u0435\u0441\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u0434\u0430\u043d\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e!<\/p><\/blockquote>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">Redutant code<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<blockquote><p>\u041f\u043e\u0441\u043b\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0443\u0434\u0430\u043b\u044f\u0442\u0441\u044f \u044d\u043b\u0432\u0438\u0441-\u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b, \u0442.\u043a. \u0431\u044b\u043b\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u044b \u043a non-nullable \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c<\/p><\/blockquote>\n<p>\u0414\u043e \u043a\u043e\u043c\u043c\u0438\u0442\u0430<\/p>\n<p>  <\/p>\n<pre><code class=\"kotlin\">data class User(val firstName: String, val secondName: String)  val user = User(&quot;\u0412\u0430\u0441\u0438\u043b\u0438\u0439&quot;, &quot;\u041f\u0443\u043f\u043a\u0438\u043d&quot;)  fun getUserFullName(): String {     val firstName = user?.firstName     val secondName = user.secondName ?: return firstName      return &quot;$firstName $secondName&quot; }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043a\u043e\u043c\u043c\u0438\u0442\u0430<\/p>\n<p>  <\/p>\n<pre><code class=\"kotlin\">data class User(val firstName: String, val secondName: String)  val user = User(&quot;\u0412\u0430\u0441\u0438\u043b\u0438\u0439&quot;, &quot;\u041f\u0443\u043f\u043a\u0438\u043d&quot;)  fun getUserFullName(): String {     val firstName = user.firstName     val secondName = user.secondName      return &quot;$firstName $secondName&quot; }<\/code><\/pre>\n<p>  <\/p>\n<blockquote><p>\u041f\u043e\u0441\u043b\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0443\u0434\u0430\u043b\u0438\u0442\u0441\u044f \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 public, \u0442.\u043a. \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043b\u0438\u0448\u043d\u0438\u0439<\/p><\/blockquote>\n<p>\u0414\u043e \u043a\u043e\u043c\u043c\u0438\u0442\u0430<\/p>\n<p>  <\/p>\n<pre><code class=\"kotlin\">data class User(val firstName: String, val secondName: String)  val user = User(&quot;\u0412\u0430\u0441\u0438\u043b\u0438\u0439&quot;, &quot;\u041f\u0443\u043f\u043a\u0438\u043d&quot;)  public fun getUserFullName(): String {     val firstName = user.firstName     val secondName = user.secondName      return &quot;$firstName $secondName&quot; }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043a\u043e\u043c\u043c\u0438\u0442\u0430<\/p>\n<p>  <\/p>\n<pre><code class=\"kotlin\">data class User(val firstName: String, val secondName: String)  val user = User(&quot;\u0412\u0430\u0441\u0438\u043b\u0438\u0439&quot;, &quot;\u041f\u0443\u043f\u043a\u0438\u043d&quot;)  fun getUserFullName(): String {     val firstName = user.firstName     val secondName = user.secondName      return &quot;$firstName $secondName&quot; }<\/code><\/pre>\n<p>  <\/p>\n<blockquote><p>\u041f\u043e\u0441\u043b\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0443\u0434\u0430\u043b\u0438\u0442\u0441\u044f \u0432\u044b\u0437\u043e\u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430<\/p><\/blockquote>\n<p>\u0414\u043e \u043a\u043e\u043c\u043c\u0438\u0442\u0430<\/p>\n<p>  <\/p>\n<pre><code class=\"kotlin\">class ExecutionClass(val exec: () -&gt; Unit)  val exec = ExecutionClass() {     doIt() }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043a\u043e\u043c\u043c\u0438\u0442\u0430<\/p>\n<p>  <\/p>\n<pre><code class=\"kotlin\">class ExecutionClass(val exec: () -&gt; Unit)  val exec = ExecutionClass {     doIt() }<\/code><\/pre>\n<\/div><\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">Deprecated \u043a\u043e\u0434<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<p>\u0415\u0441\u043b\u0438 \u0432 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 deprecated \u0443\u043a\u0430\u0437\u0430\u043d ReplaceWith(), \u0442\u043e \u043f\u0440\u0438 cleanup \u0441\u0442\u0430\u0440\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0438 \u043a\u043b\u0430\u0441\u0441\u044b \u0431\u0443\u0434\u0443\u0442 \u0437\u0430\u043c\u0435\u043d\u0435\u043d\u044b \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u044d\u0442\u043e\u0439 \u043f\u043e\u043c\u0435\u0442\u043a\u043e\u0439. \u041d\u0430\u0434\u043e \u0431\u044b\u0442\u044c \u043e\u0447\u0435\u043d\u044c \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0441 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u044d\u0442\u043e\u0439 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438, \u0442\u0430\u043a \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432\u0441\u0435 \u043e\u0447\u0435\u043d\u044c \u0431\u0430\u043d\u0430\u043b\u044c\u043d\u043e \u2014 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0441\u0442\u0430\u0440\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0440\u043e\u0432\u043d\u043e \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0431\u044b\u043b\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u043e \u0432 ReplaceWith(). \u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043d\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442 \u0434\u0430\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043b\u0438 \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u0434. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u043d\u043e\u0432\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430\/\u043c\u0435\u0442\u043e\u0434\u0430 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u043a\u043e\u0434\u0430. \u0418 \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0442\u0430\u043a\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f\/\u043a\u043b\u0430\u0441\u0441 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0443 \u043d\u0435\u0435 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u0430\u044f \u0441\u0438\u0433\u043d\u0430\u0442\u0443\u0440\u0430(\u0447\u0442\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0442\u0430\u043a\u0436\u0435 \u041d\u0415 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442), \u0442\u043e \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0435, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0431\u044b\u043b\u043e \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043e\u0434\u043d\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043d\u0430 \u0434\u0440\u0443\u0433\u0443\u044e, \u043d\u043e \u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f. \u041a\u043e\u0434 \u0432 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f, \u043d\u043e \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c<\/p>\n<p>  <\/p>\n<blockquote><p>\u0417\u0430\u043c\u0435\u043d\u0438\u0442 \u0441\u0442\u0430\u0440\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0438 \u043a\u043b\u0430\u0441\u0441 \u043d\u0430 \u043d\u043e\u0432\u044b\u0435<\/p><\/blockquote>\n<p>\u0414\u043e \u043a\u043e\u043c\u043c\u0438\u0442\u0430<\/p>\n<p>  <\/p>\n<pre><code class=\"kotlin\">@Deprecated(&quot;\u0411\u0443\u0434\u0435\u0442 \u0443\u0434\u0430\u043b\u0435\u043d&quot;, ReplaceWith(&quot;newMethod()&quot;)) fun oldMethod() = Unit  fun newMethod() = Unit  @Deprecated(&quot;\u0411\u0443\u0434\u0435\u0442 \u0443\u0434\u0430\u043b\u0435\u043d&quot;, ReplaceWith(&quot;NewClass&quot;)) class OldClass  class NewClass  class GetDeprecatedCodeUseCase(val clazz: OldClass) {      init {         val initData = oldMethod()     } }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043a\u043e\u043c\u043c\u0438\u0442\u0430<\/p>\n<p>  <\/p>\n<pre><code class=\"kotlin\">@Deprecated(&quot;\u0411\u0443\u0434\u0435\u0442 \u0443\u0434\u0430\u043b\u0435\u043d&quot;, ReplaceWith(&quot;newMethod()&quot;)) fun oldMethod() = Unit  fun newMethod() = Unit  @Deprecated(&quot;\u0411\u0443\u0434\u0435\u0442 \u0443\u0434\u0430\u043b\u0435\u043d&quot;, ReplaceWith(&quot;NewClass&quot;)) class OldClass  class NewClass  class GetDeprecatedCodeUseCase(val clazz: NewClass) {      init {         val initData = newMethod()     } }<\/code><\/pre>\n<\/div><\/div>\n<p>  <\/p>\n<h1 id=\"vyvody-i-rekomendaciya\">\u0412\u044b\u0432\u043e\u0434\u044b \u0438 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u044f<\/h1>\n<p>  <\/p>\n<p>\u041f\u043e\u043c\u043e\u0449\u043d\u0438\u043a\u0438, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 Android Studio \u043c\u043e\u0433\u0443\u0442 \u0437\u0434\u043e\u0440\u043e\u0432\u043e \u043e\u0431\u043b\u0435\u0433\u0447\u0438\u0442\u044c \u0436\u0438\u0437\u043d\u044c \u0432\u0430\u043c \u0438 \u0432\u0430\u0448\u0438\u043c \u043a\u043e\u043b\u043b\u0435\u0433\u0430\u043c. \u0414\u0430, \u0432\u0441\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0438 \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u043f\u0435\u0440\u0435\u0434 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u043e\u0439 \u043d\u0430 \u043a\u043e\u043c\u043c\u0438\u0442, \u043d\u043e \u0432\u0441\u0435 \u0436\u0435 \u043d\u0435 \u0438\u043c\u0435\u044f \u043f\u0440\u0438\u0432\u044b\u0447\u043a\u0438 \u0442\u0430\u043a \u0434\u0435\u043b\u0430\u0442\u044c, \u043b\u0435\u0433\u043a\u043e \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0439 \u043a\u043e\u0434 \u0434\u0430\u043b\u044c\u0448\u0435. \u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043c\u043e\u0436\u0435\u0442 \u043e\u0441\u0432\u043e\u0431\u043e\u0434\u0438\u0442\u044c \u0432\u0430\u0441 \u043e\u0442 \u043c\u044b\u0441\u043b\u0435\u0439 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u043d\u0430\u0434\u043e \u0441\u043b\u0435\u0434\u0438\u0442\u044c \u0437\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u0437\u0430\u043f\u044f\u0442\u043e\u0439 \u0438 \u043a\u0430\u0436\u0434\u044b\u043c \u043f\u0440\u043e\u0431\u0435\u043b\u043e\u043c.<\/p>\n<p>  <\/p>\n<p>\u0418\u0437 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0445 \u0432\u044b\u0448\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u043e\u0432:<\/p>\n<p>  <\/p>\n<p><strong>Optimize import<\/strong> \u0438 <strong>Reformat code<\/strong> \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u0435\u0437\u0431\u043e\u044f\u0437\u043d\u0435\u043d\u043d\u043e. \u041e\u043d\u0438 \u0432\u043b\u0438\u044f\u044e\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u044f\u0432\u043d\u044b\u0435 \u043e\u0433\u0440\u0435\u0445\u0438.<\/p>\n<p>  <\/p>\n<p><strong>Rearrange <\/strong>\u0438 <strong>Clean up<\/strong> \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u043e. \u0414\u0430, \u043e\u043d\u0438 \u0432 \u0446\u0435\u043b\u043e\u043c \u043c\u043e\u0433\u0443\u0442 \u0445\u043e\u0440\u043e\u0448\u043e \u043f\u043e\u043c\u043e\u0447\u044c \u0438 \u0432\u044b\u043b\u043e\u0432\u0438\u0442\u044c \u0443\u0436\u0435 \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u0441\u0435\u0440\u044c\u0435\u0437\u043d\u0435\u0435, \u043d\u043e \u043f\u0440\u0438 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 (Rearrange) \u0438\u043b\u0438 \u043d\u0435\u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u043e\u043c \u043a\u043e\u0434\u0435 (Clean up) \u043f\u043e\u043c\u043e\u0449\u043d\u0438\u043a\u0438 \u043c\u043e\u0433\u0443\u0442 \u0441\u0438\u043b\u044c\u043d\u043e \u043e\u0448\u0438\u0431\u0438\u0442\u044c\u0441\u044f<\/p>\n<p>  <\/p>\n<p><strong>Check TODO<\/strong> \u0438 <strong>Perform code analysis<\/strong> \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u0435\u0437\u0431\u043e\u044f\u0437\u043d\u0435\u043d\u043d\u043e. \u041e\u043d\u0438 \u043d\u0438\u043a\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043d\u0435 \u0432\u043b\u0438\u044f\u044e\u0442 \u043d\u0430 \u043a\u043e\u0434, \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u0430\u044e\u0442 \u043d\u0430\u0437\u043e\u0439\u043b\u0438\u0432\u044b\u0435 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438. \u0414\u0430, \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0432\u0441\u0435 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u043e \u043d\u0430 TODO \u0438 Deprecated \u043a\u043e\u0434\u0435, \u0442\u043e \u043e\u0442\u0431\u043e\u044f \u043e\u0442 \u043d\u0438\u0445 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442, \u0438 \u043e\u043d\u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u0431\u0443\u0434\u0443\u0442 \u043c\u043e\u0437\u043e\u043b\u0438\u0442\u044c \u0433\u043b\u0430\u0437\u0430. \u041d\u043e \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0447\u0438\u0441\u0442\u044b\u0439 \u043a\u043e\u0434 \u0438 \u0442\u0430\u043a\u0438\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b \u0441\u0442\u0430\u0440\u0430\u0435\u0442\u0435\u0441\u044c \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0442\u043e \u043f\u043e\u043c\u043e\u0449\u043d\u0438\u043a\u0438 \u0431\u0443\u0434\u0443\u0442 \u0434\u0430\u0432\u0430\u0442\u044c \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u0439 \u0448\u0430\u043d\u0441 \u043f\u0435\u0440\u0435\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043a\u043e\u0434, \u0433\u0434\u0435 \u0432\u044b \u043c\u043e\u0433\u043b\u0438 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0443\u043f\u0443\u0449\u0435\u043d\u0438\u0435.<\/p>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/522758\/\"> https:\/\/habr.com\/ru\/post\/522758\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/522758\/\">\n<p>\u0420\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0433\u0438\u0442\u043e\u043c \u0432 Android Studio, \u043a\u0430\u043a \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u043c\u043e\u0436\u043d\u043e \u0434\u0432\u0443\u043c\u044f \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438.<\/p>\n<p>  <\/p>\n<p>\u041f\u0435\u0440\u0432\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0441\u043e\u043b\u044c. \u041f\u043b\u044e\u0441\u043e\u043c \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u043e\u0441\u0442\u044c. GUI \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043b\u0430\u0433\u0430\u0442\u044c \u0438 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0437\u0430\u0432\u0438\u0441\u043d\u0443\u0442\u044c \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 rebase \u0442\u0430\u043a, \u0447\u0442\u043e abort\/continue\/\u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 \u0434\u0440\u0443\u0433\u0443\u044e \u0432\u0435\u0442\u043a\u0443 \u043d\u0435 \u043f\u043e\u043c\u043e\u0436\u0435\u0442. \u041a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0432\u0430\u043c \u0432 \u043f\u043e\u043c\u043e\u0449\u044c, \u043e\u043d\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0435\u0437\u043e\u0442\u043a\u0430\u0437\u043d\u044b.<\/p>\n<p>  <\/p>\n<p>\u0412\u0442\u043e\u0440\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c GUI, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0439 Android Studio. \u041f\u043b\u044e\u0441\u044b \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b \u2014 \u043c\u0435\u043d\u044c\u0448\u0438\u0439 \u043f\u043e\u0440\u043e\u0433 \u0432\u0445\u043e\u0434\u0430, \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u0432\u043e\u043e\u0431\u0449\u0435 \u043c\u043e\u0436\u043d\u043e \u0434\u0435\u043b\u0430\u0442\u044c. \u0410 \u0442\u0430\u043a\u0436\u0435 \u0435\u0441\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043f\u043b\u044e\u0448\u043a\u0438 \u043e\u0442 \u0441\u0430\u043c\u043e\u0439 \u0441\u0442\u0443\u0434\u0438\u0438 \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0433\u0438\u0442\u043e\u043c. \u041e\u0431 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u043d\u0438\u0445 \u0438 \u043f\u043e\u0439\u0434\u0435\u0442 \u0440\u0435\u0447\u044c. \u041a\u0441\u0442\u0430\u0442\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f GUI, \u0442\u043e\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0432 \u043f\u043e\u043a\u043e\u0435 \u043c\u044b\u0448\u043a\u0443 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c hotkey<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-311226","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/311226","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=311226"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/311226\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=311226"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=311226"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=311226"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}