1
0

diplomacy: take names from the outermost common node

This commit is contained in:
Wesley W. Terpstra 2016-10-14 16:32:39 -07:00 committed by mwachs5
parent fee67c4abf
commit a807c922d0

View File

@ -25,9 +25,10 @@ abstract class LazyModule
(m.invoke(p) eq this)
}.headOption.map(_.getName)
}
lazy val outerName = if (nodes.size != 1) None else nodes(0).gco.flatMap(_.lazyModule.valName)
def moduleName = className + valName.map("_" + _).getOrElse("")
def instanceName = valName.getOrElse(className)
def moduleName = className + valName.orElse(outerName).map("_" + _).getOrElse("")
def instanceName = valName.orElse(outerName).map(_ + "_").getOrElse("") + className
def name = valName.getOrElse(className)
def line = sourceLine(info)