Skip to content

Instantly share code, notes, and snippets.

@oehme
Created November 28, 2014 14:39
Show Gist options
  • Save oehme/84f56a72cf9d3413aee0 to your computer and use it in GitHub Desktop.
Save oehme/84f56a72cf9d3413aee0 to your computer and use it in GitHub Desktop.
Loading the ResourceBundle in the Compiler
val propertyFile = cls.compilationUnit.filePath.parent.append(cls.simpleName + ".properties")
if (!propertyFile.exists) {
cls.addError('''Property file «propertyFile» does not exist''')
return
}
val resourceBundle = new PropertyResourceBundle(propertyFile.contentsAsStream)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment