πŸ“œ ⬆️ ⬇️

AppCode 2019.1: Swift 5, improved backlight, navigation and autocompletion, moving expressions and more

Hello!


A week ago we released AppCode 2019.1 - let's talk about changes in it. Under the cut a lot of new, useful, revised and updated.


Splash



Swift


Swift 5


All the new features of Swift 5 work correctly in AppCode 2019.1:



Rename


There was a problem with renaming overloaded methods and methods of the parent class - and now it does not exist.


Navigation to the definition


It would seem, what could be simpler and more elementary than the transition to the definition of a method or class? Standard, familiar action.


And everything is really so in Objective-C: when the object is initialized, the type name is separate, the initializer method itself is separate. Accordingly, if the cursor is on the type name, we proceed to the type definition, if on the initializer, to the definition of the initializer. But in Swift, everything becomes more complicated. The initializer merged with the type name together, and if you reproduce the behavior of Xcode, we lose the ability to go to the initializer. If we leave the behavior of AppCode 2018.3.x, we break the user's habit (β€œas in Xcode”, that is, the transition is not to the definition of the initializer, but to the definition of the type). For obvious reasons, users do not like this.


As a result, a median solution was worked out: the expression that initializes the object in Swift still consists of two parts. All that to parentheses is the type name, and everything inside is the initializer signature. Therefore, if the cursor is on the type name, proceed to the type definition, if inside the parentheses - to the initializer definition:


Go to Declaration


Both usage scenarios are saved, everyone is happy.


Moving expressions


While Xcode users select with mouse and copy-and-paste, AppCode users place the cursor on the expression and move it all with a slight touch of β‡§βŒ˜β†‘ / ↓ :


Move Statement


Works for cycles, functions, methods, classes, conditions, in general, for almost everything.


Multiline literals


How to turn a single-line literal into a multi-line? In AppCode, now just press ⏎ :


Multiline strings


Backlight, autocompletion, code analysis and all-all


The more correctly we build a tree of symbols that is used for highlighting, code analysis, navigation, and other IDE functions (even for displaying variables in the debugger), the better and more correctly the AppCode will work. In this release, we solved several fundamental problems that ruined the lives of users:



Objective-C / C / C ++


Colleagues from CLion added codeset naming styles for C / C ++, and we got them for Objective-C as well ( Preferences | Editor | Code Style | C/C++/Objective-C | Naming Convention) :


Naming convention


Run and debug


AppCode is now able to join processes running not only on the simulator, but also on the device ( β‡§βŒ˜A β†’ Attach to process ):


Attach to process


The ability to select the language and region of the application is added to the launch configuration settings:


Application language and region


Run to Cursor can be called up not only via βŒ₯F9 , but also by clicking on the line number in the editor:


Mute variables


Recalculation of variables during debugging can now be disabled using the Mute Variables action in the context menu:


Mute variables


Themes for IDE


The attentive reader has already noticed that all the screenshots in the post are made using the Dark Purple theme:


Dark purple theme


IDE themes can now be made independently , therefore, in the plugin repository, apart from a few themes made by us, you can already find several custom design options. And until May 3rd, you can not only make your own topic, but also take part in the contest we recently announced.


List of recently viewed / modified code sections


There are several useful actions for navigating to newly opened or changed places in the code:



Moving to the last edited section of code is generally difficult to overestimate, especially when editing a large file.


Now there is also a list of recently viewed / changed places Recent Locations ( β‡§βŒ˜E ):


Recent Locations


Here is such a release. All questions, suggestions and even bug reports write right here in the comments - we will be happy to answer!


AppCode command


')

Source: https://habr.com/ru/post/448462/


All Articles