Scala: Method to convert to ecllipse notation