Open JinoBetti opened 2 years ago
It would be even greater if the plugin will come with a predefined set of default templates for basic blocks like if
, switch
, note
, etc.
By the way, thank you so much guys for this plugin!
Feel free to copypaste yours. Like this:
<template name="Alice -> Bob" value="Alice -> Bob: Authentication Request Bob --> Alice: Authentication Response" description="A" toReformat="true" toShortenFQNames="true">
<context>
<option name="PUML" value="true" />
</context>
</template>
https://plugins.jetbrains.com/docs/intellij/template-support.html#export-the-live-template
@krasa Thank you very much for the context addition! 👍 Here are 4 of my live templates for PantUML Activity diagrams
<template name="action" value=":$SELECTION$;" description="Activity diagram. Action" toReformat="false" toShortenFQNames="true">
<context>
<option name="PUML" value="true" />
</context>
</template>
<template name="if" value="if (condition?) is (yes) then :true; else (no) :false; endif" description="Activity diagram. If statement" toReformat="false" toShortenFQNames="true">
<context>
<option name="PUML" value="true" />
</context>
</template>
<template name="note" value="note $START$ end note" description="Activity diagram. Note" toReformat="false" toShortenFQNames="true">
<variable name="START" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="PUML" value="true" />
</context>
</template>
<template name="while" value="while (data available?) :read data; endwhile" description="Activity diagram. While loop" toReformat="false" toShortenFQNames="true">
<context>
<option name="PUML" value="true" />
</context>
</template>
I like using live template to create diagrams more efficiently, and when you create live templates in intellij, you have to select the context in which the templates will appear. It would be great to be able to select the "Puml" context, for the live template to appear only in the PUML files (currently, I've selected the template "other" so that it will only appear in non java, non xml, non [...] files
Documentation about live templates if needed