mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-27 16:57:49 +08:00
New Live Template tutorial
This commit is contained in:
parent
d2f6fdd4a7
commit
c1bd6fa8e6
13
live_templates/live_templates.iml
Normal file
13
live_templates/live_templates.iml
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="PLUGIN_MODULE" version="4">
|
||||
<component name="DevKit.ModuleBuildProperties" url="file://$MODULE_DIR$/resources/META-INF/plugin.xml" />
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/resources" type="java-resource" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
35
live_templates/resources/META-INF/plugin.xml
Normal file
35
live_templates/resources/META-INF/plugin.xml
Normal file
@ -0,0 +1,35 @@
|
||||
<idea-plugin version="2">
|
||||
<id>com.your.company.unique.plugin.id</id>
|
||||
<name>Plugin display name here</name>
|
||||
<version>1.0</version>
|
||||
<vendor email="support@yourcompany.com" url="http://www.yourcompany.com">YourCompany</vendor>
|
||||
|
||||
<description><![CDATA[
|
||||
Enter short description for your plugin here.<br>
|
||||
<em>most HTML tags may be used</em>
|
||||
]]></description>
|
||||
|
||||
<change-notes><![CDATA[
|
||||
Add change notes here.<br>
|
||||
<em>most HTML tags may be used</em>
|
||||
]]>
|
||||
</change-notes>
|
||||
|
||||
<!-- please see http://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/build_number_ranges.html for description -->
|
||||
<idea-version since-build="141.0"/>
|
||||
|
||||
<!-- please see http://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/plugin_compatibility.html
|
||||
on how to target different products -->
|
||||
<!-- uncomment to enable plugin in all products
|
||||
<depends>com.intellij.modules.lang</depends>
|
||||
-->
|
||||
|
||||
<extensions defaultExtensionNs="com.intellij">
|
||||
<!-- Add your extensions here -->
|
||||
</extensions>
|
||||
|
||||
<actions>
|
||||
<!-- Add your actions here -->
|
||||
</actions>
|
||||
|
||||
</idea-plugin>
|
9
live_templates/resources/liveTemplates/Markdown.xml
Normal file
9
live_templates/resources/liveTemplates/Markdown.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<templateSet group="Markdown">
|
||||
<template name="[" value="[$TEXT$]($LINK$)$END$" description="New link reference." toReformat="false" toShortenFQNames="false">
|
||||
<variable name="TEXT" expression="" defaultValue="" alwaysStopAt="true" />
|
||||
<variable name="LINK" expression="complete()" defaultValue="" alwaysStopAt="true" />
|
||||
<context>
|
||||
<option name="MARKDOWN" value="true" />
|
||||
</context>
|
||||
</template>
|
||||
</templateSet>
|
7
live_templates/src/MarkdownContext.java
Normal file
7
live_templates/src/MarkdownContext.java
Normal file
@ -0,0 +1,7 @@
|
||||
import com.intellij.codeInsight.template.TemplateContextType;
|
||||
|
||||
/**
|
||||
* Created by breandan on 1/11/2016.
|
||||
*/
|
||||
public class MarkdownContext extends TemplateContextType {
|
||||
}
|
7
live_templates/src/MarkdownTemplateProvider.java
Normal file
7
live_templates/src/MarkdownTemplateProvider.java
Normal file
@ -0,0 +1,7 @@
|
||||
import com.intellij.codeInsight.template.impl.DefaultLiveTemplatesProvider;
|
||||
|
||||
/**
|
||||
* Created by breandan on 1/11/2016.
|
||||
*/
|
||||
public class MarkdownTemplateProvider implements DefaultLiveTemplatesProvider {
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user