Tools

Kotlin Eclipse Plugin 0.2.0

Kotlin Eclipse Plugin 0.2.0

Today we are happy to present a new version of Kotlin plugin for Eclipse. This release includes the following features:

  • Update to Kotlin M12
  • Java to Kotlin converter
  • Navigation to Kotlin sources from Java
  • Kotlin syntax highlighting in Compare View

Kotlin M12

Starting from this release, Eclipse plugin supports Kotlin M12. All existing projects will start using it automatically and new projects will be configured to use it from the beginning. Please take a look at the list of changes and deprecations in the language, as some code will probably need to be updated.

Convert Java Code to Kotlin

In this release we continue to improve interaction between Java and Kotlin in Eclipse IDE.

Now it’s possible to try Kotlin in an existing project by converting Java files to Kotlin from IDE in the way our online demo can do it. Nice thing about conversion in the IDE is the ability to convert several files at once. Action is called Convert Java to Kotlin and can be found in the context menu in the Package Explorer view:

conversion

If the file created trough conversion happens to be the first Kotlin file in the project, the IDE will also configure the Kotlin Nature and suggest to add Kotlin runtime library to the class path.

There are some known issues with formatting of resulting code but this will be improved in one of next releases.

Navigate from Java Code to Kotlin

Now you can easily navigate from Java to Kotlin classes and functions with Open Declaration (Ctrl+Click or F3).

navigation

Highlighting for File Comparison

Finally, this update enables Kotlin syntax highlighting in the Compare view. This was immediately considered to be a major feature after the first code review of Kotlin code :)

 screenshot3

Feedback

Install this release by drag-and-drop’ing this button to Eclipse:

Drag to your running Eclipse workspace to install Kotlin Plugin for Eclipse

Your feedback and pull requests are welcome!

image description