Skip to content

CodeAssist 3.33.0

Choose a tag to compare

@tyron12233 tyron12233 released this 26 Oct 21:47
· 795 commits to main since this release

🚀 CodeAssist 3.33.0

TEMPLATES

  • Templates know where they fit. psvm appears among a class's members, sout at the start of a statement, and nothing pops up in comments or strings. psvm now shows up where you need it in Java.
  • Android templates: logt (a log tag named after your class), logd / logi / logw / loge (with the method name filled in), logm (logs the method and its parameters) and Toast. They add the imports they need.
  • Compose templates: comp and prev for new composables and previews, paddp and weight after a Modifier, and Surround with Row / Column / Box on a selection.
  • More from IntelliJ: main, prsf, St, soutm, soutp, itar, itli, ritar, toar, lazy for Java, and sout, soutv, ifn, inn, iter, exfun, exval, exvar, interface, singleton, anonymous, closure, void for Kotlin.
  • psf, psfi and psfs now write public static final, as in IntelliJ. Use prsf for private static final.
  • Multi-line templates line up with your code instead of starting at the left edge.
  • All the new templates are listed in Settings, where you can edit them like the others; templates can now use $METHOD_NAME$.

EDITOR

  • Smart indent like Android Studio. Typing . on a new line indents a method chain, Java continues an unfinished statement and steps back after its ;, and the line after a brace-less if returns under the if.
  • Multiline strings. Typing """ closes it, and Enter lays it out with the closing quotes on their own line (adding .trimIndent() in Kotlin).
  • Tab jumps past a closing bracket or quote you just typed, as in IntelliJ.
  • Typing ; at the end of a Java call puts it after the ), or moves past the ); that's already there.
  • Completing forEach, Column, application and friends offers both name(...) and name { }, like IntelliJ. The plain name(...) item no longer adds { } on its own: pick name {...} for the braces.
  • Closing a tab with unsaved changes asks first: Save, Don't Save or Cancel, with a Don't ask again option you can change later in Settings > Editor.
  • Reformat XML with Android Studio's rules: one attribute per line in layouts, tidy manifests and resources. Works with Reformat Code, on a selection, and with format-on-save. Code Style has a new XML tab, with options to sort attributes into Android Studio's order and add a space in empty tags.
  • Suppress a warning from the end of its actions menu, as in Android Studio: for just that line (//noinspection), the declaration, the class or the whole file (@Suppress, @SuppressWarnings or @SuppressLint, merged into one that's already there).
  • Suppressions already in your code now count too: @SuppressWarnings, @SuppressLint, lint ids like NewApi, and "all".

JAVA AND KOTLIN

  • this or an instance method used inside main (or any static code) is now flagged as an error.
  • Missing permissions (Android lint's MissingPermission): a call that needs a permission your app doesn't declare is flagged, and so is one that uses a dangerous permission (camera, location, contacts...) without checking it at run time. Permissions declared by your libraries and AARs count. Quick fixes add the <uses-permission> to AndroidManifest.xml or insert the permission check.
  • The "Avoid System.out for logging" warning is gone.
  • Java library constructors and methods show their parameter names in Kotlin's signature help.

PROJECTS

  • Import a project from a .zip, not just a .caproj. A project downloaded from GitHub works as is: CodeAssist finds the project inside the zip, and a Gradle project still lets you choose compatibility mode or convert. If the zip holds several projects, you pick one. You can also open a .zip with CodeAssist straight from your file manager.

FIXES

  • The caret no longer jumps across a parameter hint (like x:) when it appears as you type.
  • The problem popup from an error chip closes when you start typing.

FOR PLUGIN AUTHORS

  • Only the Kotlin compiler plugins bundled with CodeAssist run now (Compose, kotlinx.serialization, Parcelize). A plugin can no longer add its own compiler plugin at run time.

Also in this release: everything from 3.32.0 and 3.32.1

3.32.1 FIXES

  • Sharing an .apk from the file tree sends it as a plain file. Installing still works by tapping an APK you built, or with Run.

JAVA AND KOTLIN TOGETHER

  • Go to in Java files. Go to Declaration, Implementations, Type Declaration and Super Method now work in Java, including Ctrl/Cmd-click. They open other Java files, the Kotlin declaration behind a class, or library code. Kotlin files can also jump to Java source now.
  • Java sees Kotlin classes properly. Supertypes, generics (List<String> stays List<String>), lambda parameters, const val, lateinit fields, @file:JvmName and simple inferred types all come through, so mixed projects no longer show false errors in Java.
  • Kotlin sees Java classes properly. Inherited members, subclasses passed as their base type, package-private members, generic Java classes, nested classes and constructor checks all work.
  • Changes to a Java class reach the Kotlin files that use it right away, even before you save, and the other way round.
  • Configure Kotlin. A Java module that gets its first Kotlin file shows "Kotlin isn't configured for module ..." with a Configure Kotlin button that adds the standard library.

EDITOR

  • Completing a class name like String or System no longer adds () when it isn't a constructor call.

FIXES

  • The Run task picker scrolls, and its search box opens on the first tap.
  • An AI chat that was stopped in the middle of a tool can be continued again, including chats saved in that state.
  • Fewer "app not responding" freezes: ads start in the background, pressing Stop no longer waits on the build process, and a crash now closes the app instead of leaving it frozen.

NDK PLUGIN 1.2.0 (download CodeAssist-NDK-Plugin-3.33.0.apk below): unchanged.

Full changelog: https://github.com/tyron12233/CodeAssist/releases/tag/v3.33.0