This is a collection of IntelliJ Live Templates and templates for the Custom Postfix Templates Plugin.
To use one of the Live Templates, copy the XML content into your clipboard, then paste (Ctrl-V / Cmd-V) it into the IntelliJ Live Templates settings dialog:
ast
AssertJ assertThat...
Expands to:
assertThat(<expression>)
.<is>(<end>);
ase
AssertJ assertThat.isEqualTo
Expands to:
assertThat(<expression>)
.isEqualTo(<end>);
asc
AssertJ assertThat.containsExactly
Expands to:
assertThat(<expression>)
.containsExactly(<end>);
tni
Throw Not Implemented
Expands to:
throw new UnsupportedOperationException("$METHOD_NAME$ is not implemented.");
java-general contains a few postfix template I like to use:
"applesauce".ast
Expands to:
assertThat("applesauce")
.<end>;
"applesauce".ase
Expands to:
assertThat("applesauce")
.isEqualTo(<end>);
List<String> fruit = List.of("Apple", "Banana");
fruit.asc
Expands to:
List<String> fruit = List.of("Apple", "Banana");
assertThat(fruit)
.containsExactly(<end>);
List<String> fruit = List.of("Apple", "Banana");
fruit.toMap
Expands to:
List<String> fruit = List.of("Apple", "Banana");
fruit.stream().collect(toMap(
e -> <key>,
e -> <value>
));
"Carrot".lof
Expands to:
List.of("Carrot")
In addition to these I also import Ted's Postfix Templates for the .nv
New Variable template.
Game.nv
Expands to:
Game <end> = new Game();