/Mikes_IDEA_extensions

IntelliJ IDEA: missing parts.

Primary LanguageKotlinApache License 2.0Apache-2.0

Mike's IDEA extensions

Some great inspections, quickfixes, tools. Well, only inspections at the moment.

Java inspections

  • BigDecimal instantiation can be replaced with constant by stokito
  • BigDecimal.compareTo(ZERO) can be replaced with signum() by stokito

UAST (Java + Kotlin) inspections

  • Atomic can be replaced with volatile
  • Allocation should be cached (Enum.values(), new Gson(), ...)

Kotlin inspections

  • Heavyweight property delegation
  • Declaration name is Java keyword
  • Inline function leaks anonymous declaration
  • Function won't be inlined; noinline callable references are a bit more expensive than noinline lambdas; function cannot be inlined if it is a receiver of an extension function

Android inspections

  • <include layout="?themeAttribute"> requires Marshmallow
  • <view class="@resource or ?themeAttribute"> is not supported
  • <drawable android:tint and android:tintMode> require Lollipop
  • @TargetApi should be replaced with @RequiresApi
  • Use of reflective ObjectAnimator/PropertyValuesHolder

Tooltips/hints

  • Upcast to interface, e. g.
    putExtra(list as Serializable) (Java Only)
  • Method override from superclass, e. g.
    @Override from Runnable,
    override Runnable fun run()

Plugin page on JetBrains marketplace