Permalink
Browse files

Refactored all the zipper stuff into its own package

  • Loading branch information...
djspiewak committed Jan 8, 2012
1 parent 9338efb commit 31ab20a011daaaf6a6c3bec85482e59ed63a1e4d
Showing with 36 additions and 5 deletions.
  1. +1 −0 src/main/scala/com/codecommit/antixml/Group.scala
  2. +3 −1 src/main/scala/com/codecommit/antixml/Selectable.scala
  3. +2 −0 src/main/scala/com/codecommit/antixml/{zipper → }/Zipper.scala
  4. +1 −0 src/main/scala/com/codecommit/antixml/zipper/CanBuildFromWithZipper.scala
  5. +1 −0 src/main/scala/com/codecommit/antixml/{ → zipper}/PathCreator.scala
  6. +2 −0 src/main/scala/com/codecommit/antixml/{ → zipper}/PathFetcher.scala
  7. +3 −1 src/main/scala/com/codecommit/antixml/{ → zipper}/PathTransformer.scala
  8. +2 −0 src/main/scala/com/codecommit/antixml/zipper/ZipperAxes.scala
  9. +1 −0 src/main/scala/com/codecommit/antixml/zipper/ZipperGroupOverrides.scala
  10. +1 −0 src/main/scala/com/codecommit/antixml/zipper/ZipperHoleMap.scala
  11. +1 −0 src/main/scala/com/codecommit/antixml/zipper/ZipperHoleMapper.scala
  12. +1 −0 src/main/scala/com/codecommit/antixml/zipper/ZipperHoleShifting.scala
  13. +1 −0 src/main/scala/com/codecommit/antixml/zipper/ZipperMergeContext.scala
  14. +1 −0 src/main/scala/com/codecommit/antixml/zipper/ZipperMergeStrategy.scala
  15. +1 −0 src/main/scala/com/codecommit/antixml/zipper/ZipperPath.scala
  16. +1 −0 src/main/scala/com/codecommit/antixml/{ → zipper}/ZipperUnselection.scala
  17. +2 −0 src/test/scala/com/codecommit/antixml/performance/package.scala
  18. +3 −2 src/test/scala/com/codecommit/antixml/{ → zipper}/PathCreatorSpecs.scala
  19. +1 −0 src/test/scala/com/codecommit/antixml/{ → zipper}/PathFetcherSpecs.scala
  20. +1 −0 src/test/scala/com/codecommit/antixml/{ → zipper}/PathTransformerSpecs.scala
  21. +1 −0 src/test/scala/com/codecommit/antixml/zipper/ZipperAxesSpecs.scala
  22. +1 −0 src/test/scala/com/codecommit/antixml/zipper/ZipperHoleMapSpecs.scala
  23. +2 −1 src/test/scala/com/codecommit/antixml/zipper/ZipperMergeStrategySpecs.scala
  24. +1 −0 src/test/scala/com/codecommit/antixml/zipper/ZipperPathSpecs.scala
  25. +1 −0 src/test/scala/com/codecommit/antixml/zipper/ZipperSpecs.scala
@@ -30,6 +30,7 @@ package com.codecommit
package antixml
import util._
+import zipper._
import scala.annotation.unchecked.uncheckedVariance
import scala.annotation.tailrec
@@ -29,10 +29,12 @@
package com.codecommit
package antixml
+import zipper._
+
import scala.collection.generic.{CanBuildFrom, HasNewBuilder}
import scala.collection.immutable.VectorBuilder
-import com.codecommit.antixml.CanBuildFromWithZipper.ElemsWithContextVisible
+import CanBuildFromWithZipper.ElemsWithContextVisible
import com.codecommit.antixml.util.VectorCase
trait Selectable[+A <: Node] {
@@ -28,6 +28,8 @@
package com.codecommit.antixml
+import zipper._
+
import com.codecommit.antixml.util.VectorCase
import scala.annotation.tailrec
import scala.collection.{immutable, mutable, IndexedSeqLike, GenTraversableOnce}
@@ -27,6 +27,7 @@
*/
package com.codecommit.antixml
+package zipper
import scala.collection.GenTraversableOnce
import scala.collection.mutable.Builder
@@ -27,6 +27,7 @@
*/
package com.codecommit.antixml
+package zipper
import util.VectorCase
@@ -1,4 +1,6 @@
package com.codecommit.antixml
+package zipper
+
import scala.annotation.tailrec
/**
@@ -1,7 +1,7 @@
package com.codecommit.antixml
+package zipper
import scala.annotation.tailrec
-import PathTransformer._
import PathFetcher._
/** Transforms [[com.codecommit.antixml.ZipperPath]]s with predefined functions.
@@ -13,6 +13,8 @@ import PathFetcher._
* @param source The source for the transformed paths.
*/
private[antixml] case class PathTransformer(source: Group[Node]) {
+ import PathTransformer._
+
//TODO this whole class is probably quite slow, ZipperPath is not optimized for modifications
@@ -1,4 +1,6 @@
package com.codecommit.antixml
+package zipper
+
import scala.annotation.tailrec
/**
@@ -1,4 +1,5 @@
package com.codecommit.antixml
+package zipper
import Zipper._
import CanBuildFromWithZipper.ElemsWithContextVisible
@@ -27,6 +27,7 @@
*/
package com.codecommit.antixml
+package zipper
import util.{VectorCase}
import scala.annotation.tailrec
@@ -1,4 +1,5 @@
package com.codecommit.antixml
+package zipper
import Zipper._
import ZipperHoleMapper._
@@ -1,4 +1,5 @@
package com.codecommit.antixml
+package zipper
import Zipper._
import ZipperHoleShifting._
@@ -27,6 +27,7 @@
*/
package com.codecommit.antixml
+package zipper
import scala.collection.immutable.IndexedSeq
@@ -27,6 +27,7 @@
*/
package com.codecommit.antixml
+package zipper
import util.VectorCase
import scala.collection.immutable.IndexedSeq
@@ -27,6 +27,7 @@
*/
package com.codecommit.antixml
+package zipper
import scala.collection.{IndexedSeqOptimized,Seq, LinearSeq}
import scala.collection.generic.CanBuildFrom
@@ -1,4 +1,5 @@
package com.codecommit.antixml
+package zipper
import Zipper._
import ZipperHoleMapper._
@@ -31,6 +31,8 @@ package com.codecommit.antixml
import scala.collection.generic.CanBuildFrom
import scala.collection.mutable.Builder
+import zipper._
+
package object performance {
def simpleNameOf(n: org.w3c.dom.Node) =
@@ -27,10 +27,11 @@
*/
package com.codecommit.antixml
+package zipper
import org.specs2.mutable._
-import com.codecommit.antixml.PathCreator._
-import com.codecommit.antixml.Zipper._
+import PathCreator._
+import Zipper._
import XML._
import scala.math.Ordering
@@ -1,4 +1,5 @@
package com.codecommit.antixml
+package zipper
import org.specs2.mutable._
import org.specs2.matcher.DataTables
@@ -1,4 +1,5 @@
package com.codecommit.antixml
+package zipper
import org.specs2.mutable._
import org.specs2.matcher.DataTables
@@ -1,4 +1,5 @@
package com.codecommit.antixml
+package zipper
import org.specs2.mutable._
import XML._
@@ -27,6 +27,7 @@
*/
package com.codecommit.antixml
+package zipper
import org.specs2.mutable._
import org.specs2.ScalaCheck
@@ -27,9 +27,10 @@
*/
package com.codecommit.antixml
+package zipper
import org.specs2.mutable._
-import com.codecommit.antixml.ZipperMergeStrategy._
+import ZipperMergeStrategy._
import XML._
class ZipperMergeStrategySpecs extends SpecificationWithJUnit {
@@ -27,6 +27,7 @@
*/
package com.codecommit.antixml
+package zipper
import org.specs2.mutable._
import org.specs2.ScalaCheck
@@ -27,6 +27,7 @@
*/
package com.codecommit.antixml
+package zipper
import org.specs2.mutable._
import org.specs2.ScalaCheck

0 comments on commit 31ab20a

Please sign in to comment.