• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Extra Live Templates Re: KotlinLogs

 
Bartender
Posts: 1868
81
Android IntelliJ IDE MySQL Database Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I will not take credit for this, I'm simply copying from StackOverFlow post found here https://stackoverflow.com/a/46152625/7269701

Here is the step-by-step guide:

1) Copy and paste AndroidLog templates to Kotlin (Just select them and use CMD+C, CMD+V (or Ctrl+C, Ctrl+V)
Secondly, You have to adjust them manually: See "Log Part 1.jpg"

2) Change expression to: kotlinMethodName() remove ; from the end of the template, as you don't need it in Kotlin. See "Log Part 2.jpg"

Now your method name will be shown correctly.
------------------------------------------------------------
Alternatively create a XML file name "KotlinLog.xml" and place it in the config directory which can be found here on Windows systems "%USERPROFILE%\.AndroidStudio3.0\config\templates" for Android Studio 3.0.
Paste this code into the KotlinLog.xml

I suspect that Idea by IntelliJ/JetBrains can be handled the same way.
Log-Part-1.jpg
[Thumbnail for Log-Part-1.jpg]
Log-Part-2.jpg
[Thumbnail for Log-Part-2.jpg]
 
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic