New AppCode 2016.2 EAP brings Introduce Variable refactoring and argument placeholders for Swift!

Hi everyone,

New AppCode 2016.2 EAP is available for download with new great features on board! As usual, the patch update is also available if you are using previous 2016.2 EAP build.

Introduce Variable

This build brings one of the most important features from our roadmap – initial implementation of Introduce Variable refactoring for Swift. Let’s see how you can use it:

  • Select the expression you want to extract and press ⌘⌥V. AppCode will suggest the name automatically – you can use it or write your own:
    Step 1

  • By default AppCode will extract the constant using let. Select Declare with ‘var’ option to convert it to the variable:
    Step 2
  • You can also specify the type of extracted expression automatically using Specify type explicitly option:
    Step 3
  • In case there are several possible expressions to extract, choose the one you need from the list:
    Step 4
  • Choose if you want to replace all occurrences of the selected expression or only the single one:
    Step 5

Please, note, that some major issues related to this feature still exist (see subtasks in the base ticket). In case you find any other issue or have any suggestion, please log it as a bug-report or feature request in our tracker.

Argument placeholders

Completion for function parameter names with corresponding placeholders for arguments is one of the essential IDE features in iOS/OSX world. Starting with this build it is also available in AppCode for Swift language:

  • Argument placeholders and parameter names are now inserted automatically for any function or method including initializers:
  • You can navigate between parameters forward and back using Tab/Shift+Tab:

Some features related to argument placeholders such as completion for closures are in progress and we will try to deliver them before 2016.2 release.

Other notable improvements in this build include fixes for resolution and searching for methods annotated with @objc in Swift. Full release notes are available here.

That’s it! Download the build, try it right now and let us know what you think!

Your AppCode team
The Drive to Develop