Shiraji's Blog

Visualize Kotlin substringXxx Methods

I found very hard time to memorize the following methods.

  • substringAfter
  • substringAfterLast
  • substringBefore
  • substringBeforeLast

Here is the visuals that illustrate the differences between these methods.

What's Good About Kotlin in Android Development

これはKotlin Advent Calendar 2016の12/11の記事です。

8月23日にこんなつぶやきをして、今日まで溜めたAndroid開発をしていて、こう書くと簡単でキモチイイ!!!というKotlinの文法を紹介したいと思います。

(あくまで自分が気持ちいいってだけだからね!)

How to Contribute R.swift (for Japanese Android Engineer)

This entry is for Japanese speaker. Those who are interested to contribute R.swift, please refer to this doc

これはiOS Advent Calendar 2016の12/3の記事です。

Swiftでprintlnを書いてハマるレベルのエンジニアが一週間(実稼働時間 約8時間)でR.swiftにコントリビュートしたお話。(だったけど、メンテナさんが別プロジェクト始めちゃってまだマージされていない。-> この記事の翌日2016/12/04にマージされましたー!)

Swift開発している人にとっては常識な話が多数だと思いますが、Android開発やKotlin触っていて、Swiftもやってみたい!とかSwiftのライブラリ開発してみたい!という人向けです。R.swiftのコントリビュート方法として紹介していますが、他のライブラリも同じ感じなのではないかなーと思ってます。

Tips for Creating Intellij Plugin in Kotlin

This is the second blog post for “Tips of creating Intellij plugin”.

This entry is focus on tips for creating intellij plugin in Kotlin. (But I still believe it is useful for Java developers.)

For more basic tips, please read Tips for Creating Intellij Plugin

Topics

  • How to find parent
  • How to find children
  • How to find files

How to Kontribute (for Japanese)

This entry is for Japanese. For English speaker, please refer kotlin repo

最初に

kotlinにcontributeし始めました。ドキュメントに書いてない部分があったので、主に自分用になりますが、書いておきます。

この文章は2016/07に書かれたので、その後、contribute方法が変わっているかもしれません。

How to Create Intellij Custom Wizard

Japanese text is following.(日本語は英語の下です。)

Motivation

When I created Intellij custom wizard called gradle-intellij-plugin wizard, I read JetBrains official documentation. They explains how to support module types and how to add new steps. However, what I want to know is how to add custom fields, how to add custom files, and how to customize files based on custom fields.

There is no such documentation at this point, so I decided to write this entry for me.

Topics

  • How to add custom view
  • How to get the user input in ModuleWizardStep
  • How to create a file
  • How to change the file contents

Difference Between Generating Java and Generating Kotlin for Developing IntelliJ Plugin

Motivation

I am a maintainer of PermissionsDispatcher Plugin which generates Java and Kotlin for PermissionsDispatcher Since Kotlin is getting famous for Android developers, I thought IntelliJ plugins, which generate Android code, should support both Java and Kotlin. (By the way, Kotlin 1.0.2 now supports Android lint! This definitely will lead more developers use Kotlin!)

However, while I was developing this plugin, I found really hard to generate both Java and Kotlin code.

So, this blog post describes what are the differences between generating Java and generating Kotlin using IntelliJ plugin.

Tips for Creating Intellij Plugin

Summery

There are tips for creating intellij plugins

  • Logging
  • plugin.xml
  • Action

This is note for myself. I won’t add description if the sample is clear enough for me.