Permalink
Browse files

Adjust to rebase on top of a9b221

  • Loading branch information...
1 parent 7e590de commit 2b2abb3dad6ef3afcd59284e82dcafad1336514d @eed3si9n committed Jul 7, 2016
View
27 cli/src/main/scala/scalaxb/compiler/Module.scala
@@ -31,30 +31,9 @@ import java.io.{File, PrintWriter, Reader, BufferedReader}
import scala.collection.mutable
import scala.collection.mutable.{ListBuffer, ListMap}
import ConfigEntry._
-import collection.{mutable, Map, Set}
+import collection.{mutable, Set}
import treehugger.forest.{Tree, treeToString}
-case class Config(packageNames: Map[Option[String], Option[String]] = Map(None -> None),
- classPrefix: Option[String] = None,
- classPostfix: Option[String] = None,
- paramPrefix: Option[String] = None,
- attributePrefix: Option[String] = None,
- outdir: File = new File("."),
- packageDir: Boolean = false,
- wrappedComplexTypes: List[String] = Nil,
- prependFamilyName: Boolean = false,
- seperateProtocol: Boolean = true,
- protocolFileName: String = "xmlprotocol.scala",
- protocolPackageName: Option[String] = None,
- defaultNamespace: Option[String] = None,
- generateRuntime: Boolean = true,
- contentsSizeLimit: Int = Int.MaxValue,
- sequenceChunkSize: Int = 10,
- namedAttributes: Boolean = false,
- laxAny: Boolean = false,
- async: Boolean = true,
- dispatchVersion: String = scalaxb.BuildInfo.defaultDispatchVersion)
-
object Snippet {
def apply(definition: Node): Snippet = Snippet(definition, Nil, Nil, Nil)
@@ -241,10 +220,10 @@ trait Module {
processNode(input, Config.default.update(PackageNames(Map(None -> Some(packageName)))))
def processNode(input: Node, config: Config): List[String] =
- infoNode(input, config)._2
+ infoNodes(input, config)._2
def processNodes(input: Seq[Node], packageName: String): List[String] =
- processNodes(input, Config(packageNames = Map(None -> Some(packageName))))
+ processNodes(input, Config.default.update(PackageNames(Map(None -> Some(packageName)))))
def processNodes(input: Seq[Node], config: Config): List[String] =
infoNodes(input, config)._2
View
2 cli/src/main/scala/scalaxb/compiler/xsd/Args.scala
@@ -169,7 +169,7 @@ trait Args extends Params {
else buildTypeName(symbol), selector,
toCardinality(elem.minOccurs, elem.maxOccurs), stackItem,
false, elem.defaultValue, elem.fixedValue, wrapForLongAll)
-
+
case symbol: ReferenceTypeSymbol =>
if (symbol.decl == null) sys.error("GenSource#buildArg: " + elem.toString + " Invalid type " + symbol.getClass.toString + ": " +
symbol.toString + " with null decl")
View
2 cli/src/main/scala/scalaxb/compiler/xsd2/Params.scala
@@ -55,7 +55,7 @@ trait Params { self: Namer with Lookup with Splitter =>
def toScalaCode(implicit targetNamespace: Option[URI], lookup: Lookup): String =
toTraitScalaCode(targetNamespace, lookup) + (
- if (occurrence == OptionalNotNillable && attribute) " = None"
+ if (occurrence == OptionalNotNillable() && attribute) " = None"
else "")
def toDataRecordMapAccessor(wrapper: String, generateImpl: Boolean)
View
2 cli/src/main/scala/scalaxb/compiler/xsd2/SchemaOps.scala
@@ -663,7 +663,7 @@ object ComplexTypeIteration {
decl.base match {
case x: TaggedSymbol => x: TaggedType[_]
case x: TaggedSimpleType => x: TaggedType[_]
- case x: TaggedType[XComplexType] => complexTypeToSimpleContentRoot(x)
+ case x: TaggedComplexType => complexTypeToSimpleContentRoot(x)
case _ => TaggedXsAnyType
}
}
View
20 cli/src/main/scala/scalaxb/compiler/xsd2/args.scala
@@ -168,17 +168,21 @@ trait Args { self: Namer with Lookup with Params with Symbols =>
val isCompositor = tagged match {
case x: TaggedWildCard => true
case x: TaggedKeyedGroup => true
- case elem: Tagged[XElement] =>
- if (!ignoreSubGroup && elem.isSubstitutionGroup) true
- else elem.typeStructure match {
- case x: TaggedSymbol =>
- x.value match {
- case XsAnySimpleType | XsAnyType => true
- case symbol: BuiltInSimpleTypeSymbol => false
+ case x: Tagged[_] =>
+ x.value match {
+ case elem0: XElement =>
+ val elem = x match { case x: Tagged[XElement] @unchecked => x }
+ if (!ignoreSubGroup && elem.isSubstitutionGroup) true
+ else elem.typeStructure match {
+ case x: TaggedSymbol =>
+ x.value match {
+ case XsAnySimpleType | XsAnyType => true
+ case symbol: BuiltInSimpleTypeSymbol => false
+ }
+ case _ => false
}
case _ => false
}
- case _ => false
}
val retval: Tree = occcurrence match {
View
4 cli/src/test/scala/EntitySpec_3.scala
@@ -1,5 +1,7 @@
package scalaxb.specs
+import scalaxb.compiler._
+import scalaxb.compiler.ConfigEntry._
import org.specs2._
object EntitySpec_3 extends Specification { def is = s2"""
@@ -129,7 +131,7 @@ object EntitySpec_3 extends Specification { def is = s2
}
lazy val importSources = module.processNodes(Seq(addressXML, importXML),
- scalaxb.compiler.Config(packageNames = Map(None -> Some("example"))))
+ Config.default.update(PackageNames(Map(None -> Some("example")))))
def derivation5 = {
println(importSources(0))
View
2 project/build.properties
@@ -1 +1 @@
-sbt.version=0.13.8
+sbt.version=0.13.11

0 comments on commit 2b2abb3

Please sign in to comment.