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

Comments below can no longer be edited.

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

  1. Avatar

    David Whetstone says:

    June 22, 2016

    Awesome! The magic is coming back to AppCode. Nice work!

  2. Avatar

    Talles Borges says:

    June 22, 2016

    I have found a error when opening a .xcworkspace

    • Stanislav Dombrovsky

      Stanislav Dombrovsky says:

      June 22, 2016

      Have you tried to open the same workspace in Xcode? Will you be able to open it?

      • Avatar

        Talles Borges says:

        June 22, 2016

        Yes, in Xcode it works

      • Avatar

        Talles Borges says:

        June 22, 2016

        I do no why, but the file path is wrong in this version …

  3. Avatar

    Gauthier P. says:

    June 23, 2016

    Placeholder looks very nice ! Is it available in other IDE (in particular CLion) ? Would be awesome to have it everywhere 😀

  4. Avatar

    Dev says:

    June 27, 2016

    These new features are great. But, as you know, customers are never happy :-). Are there plans to work on the performance, or is the poor performance I’m seeing not a known problem? If I invoke code completion, it can take ~2 seconds for the popup to appear.

    • Stanislav Dombrovsky

      Stanislav Dombrovsky says:

      June 27, 2016

      We are working on performance right now and the main focus is to improve it before release. As usual, additional CPU snapshots for investigation are very welcome in our tracker.

  5. Avatar

    Alek Mlynek says:

    July 13, 2016

    Fantastic. Been looking for this, one of the features I miss from XCode. Thanks!

Discover more