Skip to content
Snippets Groups Projects
Commit bf408609 authored by Chrissi's avatar Chrissi
Browse files

modify the creation of add and remove methods for sync process

parent 2cb6b0d6
Branches
No related tags found
No related merge requests found
......@@ -36,7 +36,7 @@ class SyncEnhancingVisitor() extends SModelVisitor {
}
override def visit(sMethod: SMethod): Unit = {
extractSetterAttr(sMethod).foreach(attr => sMethod.augmentImplementation(SMethodStatement(s"+this $attr ()")))
extractSetterAttr(sMethod).foreach(attr => sMethod.augmentImplementation(SMethodStatement(s"+this $attr")))
}
override def visit(sType: SType): Unit = {
......@@ -60,11 +60,11 @@ class SyncEnhancingVisitor() extends SModelVisitor {
private def extractSetterAttr(sMethod: SMethod): Option[String] = {
sMethod.getName match {
case SyncEnhancingVisitor.Setter(attrName) =>
Option("set" + attrName)
Option("set" + attrName + " ()")
case SyncEnhancingVisitor.Adder(attrName) =>
Option("add" + attrName)
Option("add" + attrName + s" (${attrName.charAt(0).toLower})")
case SyncEnhancingVisitor.Remover(attrName) =>
Option("remove" + attrName)
Option("remove" + attrName + s" (${attrName.charAt(0).toLower})")
case _ =>
None
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment