Introduce live templates for main without arguments #KT-27461 Fixed

This commit is contained in:
Mikhail Glukhikh
2018-10-16 10:52:34 +03:00
parent 1c761c7864
commit 0f94c0901f
14 changed files with 60 additions and 2 deletions
+18
View File
@@ -2,6 +2,15 @@
<templateSet group="Kotlin">
<template resource-bundle="org.jetbrains.kotlin.idea.KotlinBundle" key="livetemplate.description.main"
name="main" toReformat="true" toShortenFQNames="true"
value="fun main($ARGS$) {&#10; $END$&#10;}">
<variable name="ARGS" expression="kotlinMainArguments()" defaultValue="" alwaysStopAt="false" />
<context>
<option name="KOTLIN_TOPLEVEL" value="true" />
</context>
</template>
<template resource-bundle="org.jetbrains.kotlin.idea.KotlinBundle" key="livetemplate.description.main"
name="maina" toReformat="true" toShortenFQNames="true"
value="fun main(args: Array&lt;String&gt;) {&#10; $END$&#10;}">
<context>
<option name="KOTLIN_TOPLEVEL" value="true" />
@@ -209,6 +218,15 @@
<!-- Synonym for main -->
<template resource-bundle="org.jetbrains.kotlin.idea.KotlinBundle" key="livetemplate.description.main"
name="psvm" toReformat="true" toShortenFQNames="true"
value="fun main($ARGS$) {&#10; $END$&#10;}">
<variable name="ARGS" expression="kotlinMainArguments()" defaultValue="" alwaysStopAt="false" />
<context>
<option name="KOTLIN_TOPLEVEL" value="true" />
</context>
</template>
<template resource-bundle="org.jetbrains.kotlin.idea.KotlinBundle" key="livetemplate.description.main"
name="psvma" toReformat="true" toShortenFQNames="true"
value="fun main(args: Array&lt;String&gt;) {&#10; $END$&#10;}">
<context>
<option name="KOTLIN_TOPLEVEL" value="true" />