Renamed 'expression' context to 'statement'.
This commit is contained in:
@@ -10,13 +10,13 @@
|
||||
name="sout" toReformat="true"
|
||||
ShortenFQNames="true" value="println($END$)">
|
||||
<context>
|
||||
<option name="KOTLIN_EXPRESSION" value="true" />
|
||||
<option name="KOTLIN_STATEMENT" value="true" />
|
||||
</context>
|
||||
</template>
|
||||
<template resource-bundle="org.jetbrains.jet.plugin.JetBundle" key="livetemplate.description.serr"
|
||||
name="serr" toReformat="true" toShortenFQNames="true" value="System.out?.println($END$)">
|
||||
<context>
|
||||
<option name="KOTLIN_EXPRESSION" value="true" />
|
||||
<option name="KOTLIN_STATEMENT" value="true" />
|
||||
</context>
|
||||
</template>
|
||||
</templateSet>
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
|
||||
<liveTemplateContext implementation="org.jetbrains.jet.plugin.liveTemplates.JetTemplateContextType$Generic"/>
|
||||
<liveTemplateContext implementation="org.jetbrains.jet.plugin.liveTemplates.JetTemplateContextType$Namespace"/>
|
||||
<liveTemplateContext implementation="org.jetbrains.jet.plugin.liveTemplates.JetTemplateContextType$Expression"/>
|
||||
<liveTemplateContext implementation="org.jetbrains.jet.plugin.liveTemplates.JetTemplateContextType$Statement"/>
|
||||
<defaultLiveTemplatesProvider implementation="org.jetbrains.jet.plugin.liveTemplates.JetLiveTemplatesProvider"/>
|
||||
|
||||
<annotator language="jet" implementationClass="org.jetbrains.jet.plugin.annotations.SoftKeywordsAnnotator"/>
|
||||
|
||||
@@ -26,7 +26,7 @@ public abstract class JetTemplateContextType extends TemplateContextType {
|
||||
if (PsiUtilBase.getLanguageAtOffset(file, offset).isKindOf(JetLanguage.INSTANCE)) {
|
||||
PsiElement element = file.findElementAt(offset);
|
||||
if (element instanceof PsiWhiteSpace) {
|
||||
|
||||
return false;
|
||||
}
|
||||
return element != null && isInContext(element);
|
||||
}
|
||||
@@ -66,9 +66,9 @@ public abstract class JetTemplateContextType extends TemplateContextType {
|
||||
}
|
||||
}
|
||||
|
||||
public static class Expression extends JetTemplateContextType {
|
||||
public Expression() {
|
||||
super("KOTLIN_EXPRESSION", "Expression", Generic.class);
|
||||
public static class Statement extends JetTemplateContextType {
|
||||
public Statement() {
|
||||
super("KOTLIN_STATEMENT", "Statement", Generic.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user