Skip to content

IntellIJ Live Template for ComponentMapper

Mykola Zekter edited this page Oct 2, 2015 · 3 revisions

Type less with IntellIJ IDEA

If you are using IntellIJ you can avoid a lot of typing! Create a live template called 'cm' with the following contents: protected ComponentMapper<$ELEMENT_TYPE$> m$ELEMENT_TYPE$;$END$ image

To use it, type cm <tab> in your System class.

image

Now you can simply type the component class and voila!

image

Alternative template

If you prefer your mappers to be named ComponentMapper<Type> <type>Mapper, e.g. ComponentMapper<Position> positionMapper, use the following template:

  • Abbreviation: amap
  • Description: creates a component mapper field
  • Template Text: private com.artemis.ComponentMapper<$COMPONENT$> $CAMEL_COMPONENT$Mapper;$END$
  • With the following variable definitions: variables
Clone this wiki locally