Adds numbers to word in getArgs, Removes whitespace after braces
This commit is contained in:
parent
743be1a6e0
commit
7bedb44b55
@ -21,7 +21,7 @@ def nl(snip):
|
|||||||
snip.rv += " "
|
snip.rv += " "
|
||||||
def getArgs(group):
|
def getArgs(group):
|
||||||
import re
|
import re
|
||||||
word = re.compile('[a-zA-Z><.]+ \w+')
|
word = re.compile('[a-zA-Z0-9><.]+ \w+')
|
||||||
return [i.split(" ") for i in word.findall(group) ]
|
return [i.split(" ") for i in word.findall(group) ]
|
||||||
|
|
||||||
def camel(word):
|
def camel(word):
|
||||||
@ -123,8 +123,8 @@ for i in args:
|
|||||||
snip.rv += "\n\tpublic void set" + camel(i[1]) + "(" + i[0] + " " + i[1] + ") {\n" + "\
|
snip.rv += "\n\tpublic void set" + camel(i[1]) + "(" + i[0] + " " + i[1] + ") {\n" + "\
|
||||||
\tthis." + i[1] + " = " + i[1] + ";\n\t}\n"
|
\tthis." + i[1] + " = " + i[1] + ";\n\t}\n"
|
||||||
|
|
||||||
snip.rv += "\n\tpublic " + i[0] + " get" + camel(i[1]) + "() {\
|
snip.rv += "\n\tpublic " + i[0] + " get" + camel(i[1]) + "() {\n\
|
||||||
\n\t\treturn " + i[1] + ";\n\t}\n"
|
\t\treturn " + i[1] + ";\n\t}\n"
|
||||||
`
|
`
|
||||||
}
|
}
|
||||||
endsnippet
|
endsnippet
|
||||||
|
Loading…
x
Reference in New Issue
Block a user