Skip to content

Instantly share code, notes, and snippets.

@diversit
Created June 8, 2015 07:03
Show Gist options
  • Save diversit/8539f2bd578093f958ea to your computer and use it in GitHub Desktop.
Save diversit/8539f2bd578093f958ea to your computer and use it in GitHub Desktop.
IntelliJ Template creating Akka Actors best-practice
IntelliJ template for creating Akka actors:
--------START TEMPLATE---------
#if ((${PACKAGE_NAME} && ${PACKAGE_NAME} != ""))package ${PACKAGE_NAME} #end
import akka.actor.Actor.Receive
import akka.actor.{Props, Actor, ActorLogging}
trait ${NAME} {
}
class ${NAME}Actor extends Actor with ${NAME} with ActorLogging {
override def receive: Receive = ???
}
object ${NAME}Actor {
def props = Props[${NAME}Actor]
}
object ${NAME}Protocol {
}
--------END TEMPLATE----------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment