From d25a90b6f554e40e83acb27fa1882a4b14c9b6f2 Mon Sep 17 00:00:00 2001 From: Alexander Zolotov Date: Fri, 17 Mar 2017 22:51:41 +0300 Subject: [PATCH] Add javadoc for Template#inline --- .../intellij/codeInsight/template/Template.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/platform/lang-impl/src/com/intellij/codeInsight/template/Template.java b/platform/lang-impl/src/com/intellij/codeInsight/template/Template.java index e0f49cf5d932..d9476ccc1c18 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/template/Template.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/template/Template.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2016 JetBrains s.r.o. + * Copyright 2000-2017 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,11 +16,15 @@ package com.intellij.codeInsight.template; +import com.intellij.codeInsight.template.impl.TemplateImpl; import com.intellij.codeInsight.template.impl.Variable; +import com.intellij.util.PairProcessor; import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +import java.util.Map; + /** * Used to build and run a live template. * @see TemplateManager @@ -68,6 +72,14 @@ public abstract class Template { public abstract void setToIndent(boolean toIndent); + /** + * Inline templates do not insert text. They install editing segments (red rectangles) in existing text + * in document: from the `caret offset` to `caret offset + templateString length`. + * + * E.g. they might be useful for inplace rename. + * + * @see com.intellij.codeInsight.template.impl.TemplateState#start(TemplateImpl, PairProcessor, Map) + */ public abstract void setInline(boolean isInline); public abstract int getSegmentsCount();