mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-30 02:07:50 +08:00
15 lines
396 B
Java
15 lines
396 B
Java
import com.intellij.codeInsight.template.TemplateContextType;
|
|
import com.intellij.psi.PsiFile;
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
|
public class MarkdownContext extends TemplateContextType {
|
|
protected MarkdownContext() {
|
|
super("MARKDOWN", "Markdown");
|
|
}
|
|
|
|
@Override
|
|
public boolean isInContext(@NotNull PsiFile file, int offset) {
|
|
return file.getName().endsWith(".md");
|
|
}
|
|
}
|