yasnippet/extras/imported/objc-mode/Language Boilerplate/060 SubMethod (sm).yasnippet
2010-03-14 15:30:22 +00:00

11 lines
465 B
Plaintext

# -*- mode: snippet -*-
# key: sm
# contributor: Translated from TextMate Snippet
# name: Sub-method (Call Super)
## condition: "(source.objc | source.objc++) & meta.scope.implementation.objc - meta.function-with-body"
# --
- (${1:id})${2:method}${3::(${4:id})${5:${4/(NS([AEIOQUY])?(\w+).*)|(.)?.*/(?1:a(?2:n$2)$3:(?4:anArgument))/}}}
{
${1/^(void|IBAction)$|(.*)/(?2:$2 res = )/}[super ${2:method}${5/.+/:$0/}];$0${1/^(void|IBAction)$|(.*)/(?2:
return res;)/}
}