{"id":298618,"date":"2022-11-17T16:54:30","date_gmt":"2022-11-17T15:54:30","guid":{"rendered":"https:\/\/blog.jetbrains.com\/?post_type=appcode&#038;p=298618"},"modified":"2022-11-17T16:54:32","modified_gmt":"2022-11-17T15:54:32","slug":"appcode-2022-3-eap-enhanced-inline-and-extract-refactorings","status":"publish","type":"appcode","link":"https:\/\/blog.jetbrains.com\/zh-hans\/appcode\/2022\/11\/appcode-2022-3-eap-enhanced-inline-and-extract-refactorings","title":{"rendered":"AppCode 2022.3 EAP: Enhanced Inline and Extract Refactorings"},"content":{"rendered":"<p>Hi everyone,<\/p>\n<p>A new AppCode 2022.3 EAP build (223.7571.46) is available for download from our <a href=\"https:\/\/www.jetbrains.com\/objc\/nextversion\" target=\"_blank\" rel=\"noopener\">website<\/a> or via the <a href=\"https:\/\/www.jetbrains.com\/toolbox-app\/\" target=\"_blank\" rel=\"noopener\">Toolbox App<\/a>. You can also update from the previous 2022.3 EAP build via a patch.<\/p>\n<p align=\"center\"><a class=\"jb-download-button\" href=\"https:\/\/www.jetbrains.com\/appcode\/nextversion\" target=\"_blank\" rel=\"noopener\"><i class=\"download-icon\"><\/i>DOWNLOAD APPCODE EAP<\/a><\/p>\n<h2 id=\"swift_inline_refactoring\">Swift <em>Inline<\/em> refactoring<\/h2>\n<p>A recently added Swift <a href=\"https:\/\/blog.jetbrains.com\/appcode\/2022\/10\/appcode-starts-the-2022-3-eap\/#swift_language_improvements\"><em>Inline<\/em> refactoring<\/a> got some improvements in this build:<\/p>\n<ul>\n<li>AppCode now warns users when conflicts are detected during the refactoring. Users can choose to continue or cancel the refactoring:<br \/>\n<img decoding=\"async\" alt=\"Warning while refactoring\" width=\"600\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2022\/11\/warn_user.png\"><\/li>\n<li>When refactoring functions with an effective single exit point, AppCode no longer creates a scope to jump to but uses a single variable to return the result of the function (<a href=\"https:\/\/youtrack.jetbrains.com\/issue\/OC-23171\" target=\"_blank\" rel=\"noopener\">OC-23171<\/a>).<\/li>\n<li>When inlining, AppCode provides an extra scope with the <code>do {}<\/code> block when necessary to keep the code correct (<a href=\"https:\/\/youtrack.jetbrains.com\/issue\/OC-23193\" target=\"_blank\" rel=\"noopener\">OC-23193<\/a>).<\/li>\n<li>AppCode now replaces all <code>self<\/code> expressions with the caller of the function when inlining (<a href=\"https:\/\/youtrack.jetbrains.com\/issue\/OC-23162\" target=\"_blank\" rel=\"noopener\">OC-23162<\/a>).<\/li>\n<\/ul>\n<h2 id=\"swift_extract_method_refactoring\">Swift <em>Extract Method<\/em> refactoring<\/h2>\n<p>Another refactoring that received our attention is <em>Extract Method<\/em>. The following fixes were implemented:<\/p>\n<ul>\n<li><em>Extract Method<\/em> no longer misses the <code>mutating<\/code> modifier (<a href=\"https:\/\/youtrack.jetbrains.com\/issue\/OC-20585\" target=\"_blank\" rel=\"noopener\">OC-20585<\/a>).<\/li>\n<li><em>Extract Method<\/em> takes into account the variable lifetime and scope (<a href=\"https:\/\/youtrack.jetbrains.com\/issue\/OC-22858\" target=\"_blank\" rel=\"noopener\">OC-22858<\/a>).<\/li>\n<li>The refactoring no longer fails in cases where the code you selected to extract starts from a conditional expression (<a href=\"https:\/\/youtrack.jetbrains.com\/issue\/OC-22707\" target=\"_blank\" rel=\"noopener\">OC-22707<\/a>).<\/li>\n<\/ul>\n<h2 id=\"new_code_analysis_checks\">New code analysis checks<\/h2>\n<p>New checks warn you about a redundant nullable type (<a href=\"https:\/\/youtrack.jetbrains.com\/issue\/OC-23216\" target=\"_blank\" rel=\"noopener\">OC-23216<\/a>) and a redundant closure (<a href=\"https:\/\/youtrack.jetbrains.com\/issue\/OC-23206\" target=\"_blank\" rel=\"noopener\">OC-23206<\/a>):<br \/>\n<img decoding=\"async\" alt=\"Redundant null\" width=\"600\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2022\/11\/redundant_null.png\"><\/p>\n<h2 id=\"kotlin_multiplatform_mobile_plugin_updates\">Kotlin Multiplatform Mobile plugin updates<\/h2>\n<ul>\n<li>Xcodeprojs is now only linked when no Apple Gradle DSL is present (<a href=\"https:\/\/youtrack.jetbrains.com\/issue\/KMA-547\" target=\"_blank\" rel=\"noopener\">KMA-547<\/a>).<\/li>\n<li>The plugin now supports moving\/copying files into and out of Xcode projects (<a href=\"https:\/\/youtrack.jetbrains.com\/issue\/KMA-456\" target=\"_blank\" rel=\"noopener\">KMA-456<\/a>).<\/li>\n<li>The cross-language class rename now works as expected (<a href=\"https:\/\/youtrack.jetbrains.com\/issue\/KMA-541\" target=\"_blank\" rel=\"noopener\">KMA-541<\/a>).<\/li>\n<li>We improved the debugger for the hybrid model (<a href=\"https:\/\/youtrack.jetbrains.com\/issue\/KMA-405\" target=\"_blank\" rel=\"noopener\">KMA-405<\/a>).<\/li>\n<\/ul>\n<p>The full release notes are available <a href=\"https:\/\/youtrack.jetbrains.com\/articles\/OC-A-223445220\" target=\"_blank\" rel=\"noopener\">here<\/a>.<\/p>\n<p>Your AppCode team<br \/>\nJetBrains<br \/>\n<em>The Drive to Develop<\/em><\/p>\n","protected":false},"author":266,"featured_media":283598,"comment_status":"closed","ping_status":"closed","template":"","categories":[826,89],"tags":[7086,600,6358,7108,91,195],"cross-post-tag":[],"acf":[],"_links":{"self":[{"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/appcode\/298618"}],"collection":[{"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/appcode"}],"about":[{"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/types\/appcode"}],"author":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/users\/266"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/comments?post=298618"}],"version-history":[{"count":10,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/appcode\/298618\/revisions"}],"predecessor-version":[{"id":298656,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/appcode\/298618\/revisions\/298656"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/media\/283598"}],"wp:attachment":[{"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/media?parent=298618"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/categories?post=298618"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/tags?post=298618"},{"taxonomy":"cross-post-tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/cross-post-tag?post=298618"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}