From 87ee6b5c8dfca4fbb3475dc5157ff7a82a115521 Mon Sep 17 00:00:00 2001 From: breandan Date: Wed, 9 Dec 2015 10:12:40 -0500 Subject: [PATCH] Add Kotlin code sample --- kotlin_demo/kotlin_demo.iml | 12 +++++++ kotlin_demo/resources/META-INF/plugin.xml | 38 +++++++++++++++++++++++ kotlin_demo/src/HelloAction.kt | 11 +++++++ 3 files changed, 61 insertions(+) create mode 100644 kotlin_demo/kotlin_demo.iml create mode 100644 kotlin_demo/resources/META-INF/plugin.xml create mode 100644 kotlin_demo/src/HelloAction.kt diff --git a/kotlin_demo/kotlin_demo.iml b/kotlin_demo/kotlin_demo.iml new file mode 100644 index 000000000..3700dfbf1 --- /dev/null +++ b/kotlin_demo/kotlin_demo.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/kotlin_demo/resources/META-INF/plugin.xml b/kotlin_demo/resources/META-INF/plugin.xml new file mode 100644 index 000000000..a61f95cc8 --- /dev/null +++ b/kotlin_demo/resources/META-INF/plugin.xml @@ -0,0 +1,38 @@ + + org.jetbrains + kotlin_demo + 1.0 + YourCompany + + + most HTML tags may be used + ]]> + + + most HTML tags may be used + ]]> + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/kotlin_demo/src/HelloAction.kt b/kotlin_demo/src/HelloAction.kt new file mode 100644 index 000000000..d861598a6 --- /dev/null +++ b/kotlin_demo/src/HelloAction.kt @@ -0,0 +1,11 @@ +import com.intellij.openapi.actionSystem.AnAction +import com.intellij.openapi.actionSystem.AnActionEvent +import com.intellij.openapi.actionSystem.PlatformDataKeys +import com.intellij.openapi.ui.Messages + +class HelloAction : AnAction("Hello") { + override fun actionPerformed(event: AnActionEvent) { + val project = event.getData(PlatformDataKeys.PROJECT) + Messages.showMessageDialog(project, "Hello from Kotlin!", "Greeting", Messages.getInformationIcon()) + } +} \ No newline at end of file