Skip to content

Commit

Permalink
Refactored all the zipper stuff into its own package
Browse files Browse the repository at this point in the history
  • Loading branch information
djspiewak committed Jan 8, 2012
1 parent 9338efb commit 31ab20a
Show file tree
Hide file tree
Showing 25 changed files with 36 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/main/scala/com/codecommit/antixml/Group.scala
Expand Up @@ -30,6 +30,7 @@ package com.codecommit
package antixml package antixml


import util._ import util._
import zipper._


import scala.annotation.unchecked.uncheckedVariance import scala.annotation.unchecked.uncheckedVariance
import scala.annotation.tailrec import scala.annotation.tailrec
Expand Down
4 changes: 3 additions & 1 deletion src/main/scala/com/codecommit/antixml/Selectable.scala
Expand Up @@ -29,10 +29,12 @@
package com.codecommit package com.codecommit
package antixml package antixml


import zipper._

import scala.collection.generic.{CanBuildFrom, HasNewBuilder} import scala.collection.generic.{CanBuildFrom, HasNewBuilder}
import scala.collection.immutable.VectorBuilder import scala.collection.immutable.VectorBuilder


import com.codecommit.antixml.CanBuildFromWithZipper.ElemsWithContextVisible import CanBuildFromWithZipper.ElemsWithContextVisible
import com.codecommit.antixml.util.VectorCase import com.codecommit.antixml.util.VectorCase


trait Selectable[+A <: Node] { trait Selectable[+A <: Node] {
Expand Down
Expand Up @@ -28,6 +28,8 @@


package com.codecommit.antixml package com.codecommit.antixml


import zipper._

import com.codecommit.antixml.util.VectorCase import com.codecommit.antixml.util.VectorCase
import scala.annotation.tailrec import scala.annotation.tailrec
import scala.collection.{immutable, mutable, IndexedSeqLike, GenTraversableOnce} import scala.collection.{immutable, mutable, IndexedSeqLike, GenTraversableOnce}
Expand Down
Expand Up @@ -27,6 +27,7 @@
*/ */


package com.codecommit.antixml package com.codecommit.antixml
package zipper


import scala.collection.GenTraversableOnce import scala.collection.GenTraversableOnce
import scala.collection.mutable.Builder import scala.collection.mutable.Builder
Expand Down
Expand Up @@ -27,6 +27,7 @@
*/ */


package com.codecommit.antixml package com.codecommit.antixml
package zipper


import util.VectorCase import util.VectorCase


Expand Down
@@ -1,4 +1,6 @@
package com.codecommit.antixml package com.codecommit.antixml
package zipper

import scala.annotation.tailrec import scala.annotation.tailrec


/** /**
Expand Down
@@ -1,7 +1,7 @@
package com.codecommit.antixml package com.codecommit.antixml
package zipper


import scala.annotation.tailrec import scala.annotation.tailrec
import PathTransformer._
import PathFetcher._ import PathFetcher._


/** Transforms [[com.codecommit.antixml.ZipperPath]]s with predefined functions. /** Transforms [[com.codecommit.antixml.ZipperPath]]s with predefined functions.
Expand All @@ -13,6 +13,8 @@ import PathFetcher._
* @param source The source for the transformed paths. * @param source The source for the transformed paths.
*/ */
private[antixml] case class PathTransformer(source: Group[Node]) { private[antixml] case class PathTransformer(source: Group[Node]) {
import PathTransformer._

//TODO this whole class is probably quite slow, ZipperPath is not optimized for modifications //TODO this whole class is probably quite slow, ZipperPath is not optimized for modifications




Expand Down
2 changes: 2 additions & 0 deletions src/main/scala/com/codecommit/antixml/zipper/ZipperAxes.scala
@@ -1,4 +1,6 @@
package com.codecommit.antixml package com.codecommit.antixml
package zipper

import scala.annotation.tailrec import scala.annotation.tailrec


/** /**
Expand Down
@@ -1,4 +1,5 @@
package com.codecommit.antixml package com.codecommit.antixml
package zipper


import Zipper._ import Zipper._
import CanBuildFromWithZipper.ElemsWithContextVisible import CanBuildFromWithZipper.ElemsWithContextVisible
Expand Down
Expand Up @@ -27,6 +27,7 @@
*/ */


package com.codecommit.antixml package com.codecommit.antixml
package zipper


import util.{VectorCase} import util.{VectorCase}
import scala.annotation.tailrec import scala.annotation.tailrec
Expand Down
@@ -1,4 +1,5 @@
package com.codecommit.antixml package com.codecommit.antixml
package zipper


import Zipper._ import Zipper._
import ZipperHoleMapper._ import ZipperHoleMapper._
Expand Down
@@ -1,4 +1,5 @@
package com.codecommit.antixml package com.codecommit.antixml
package zipper


import Zipper._ import Zipper._
import ZipperHoleShifting._ import ZipperHoleShifting._
Expand Down
Expand Up @@ -27,6 +27,7 @@
*/ */


package com.codecommit.antixml package com.codecommit.antixml
package zipper


import scala.collection.immutable.IndexedSeq import scala.collection.immutable.IndexedSeq


Expand Down
Expand Up @@ -27,6 +27,7 @@
*/ */


package com.codecommit.antixml package com.codecommit.antixml
package zipper


import util.VectorCase import util.VectorCase
import scala.collection.immutable.IndexedSeq import scala.collection.immutable.IndexedSeq
Expand Down
Expand Up @@ -27,6 +27,7 @@
*/ */


package com.codecommit.antixml package com.codecommit.antixml
package zipper


import scala.collection.{IndexedSeqOptimized,Seq, LinearSeq} import scala.collection.{IndexedSeqOptimized,Seq, LinearSeq}
import scala.collection.generic.CanBuildFrom import scala.collection.generic.CanBuildFrom
Expand Down
@@ -1,4 +1,5 @@
package com.codecommit.antixml package com.codecommit.antixml
package zipper


import Zipper._ import Zipper._
import ZipperHoleMapper._ import ZipperHoleMapper._
Expand Down
Expand Up @@ -31,6 +31,8 @@ package com.codecommit.antixml
import scala.collection.generic.CanBuildFrom import scala.collection.generic.CanBuildFrom
import scala.collection.mutable.Builder import scala.collection.mutable.Builder


import zipper._

package object performance { package object performance {


def simpleNameOf(n: org.w3c.dom.Node) = def simpleNameOf(n: org.w3c.dom.Node) =
Expand Down
Expand Up @@ -27,10 +27,11 @@
*/ */


package com.codecommit.antixml package com.codecommit.antixml
package zipper


import org.specs2.mutable._ import org.specs2.mutable._
import com.codecommit.antixml.PathCreator._ import PathCreator._
import com.codecommit.antixml.Zipper._ import Zipper._
import XML._ import XML._
import scala.math.Ordering import scala.math.Ordering


Expand Down
@@ -1,4 +1,5 @@
package com.codecommit.antixml package com.codecommit.antixml
package zipper


import org.specs2.mutable._ import org.specs2.mutable._
import org.specs2.matcher.DataTables import org.specs2.matcher.DataTables
Expand Down
@@ -1,4 +1,5 @@
package com.codecommit.antixml package com.codecommit.antixml
package zipper


import org.specs2.mutable._ import org.specs2.mutable._
import org.specs2.matcher.DataTables import org.specs2.matcher.DataTables
Expand Down
@@ -1,4 +1,5 @@
package com.codecommit.antixml package com.codecommit.antixml
package zipper


import org.specs2.mutable._ import org.specs2.mutable._
import XML._ import XML._
Expand Down
Expand Up @@ -27,6 +27,7 @@
*/ */


package com.codecommit.antixml package com.codecommit.antixml
package zipper


import org.specs2.mutable._ import org.specs2.mutable._
import org.specs2.ScalaCheck import org.specs2.ScalaCheck
Expand Down
Expand Up @@ -27,9 +27,10 @@
*/ */


package com.codecommit.antixml package com.codecommit.antixml
package zipper


import org.specs2.mutable._ import org.specs2.mutable._
import com.codecommit.antixml.ZipperMergeStrategy._ import ZipperMergeStrategy._
import XML._ import XML._


class ZipperMergeStrategySpecs extends SpecificationWithJUnit { class ZipperMergeStrategySpecs extends SpecificationWithJUnit {
Expand Down
Expand Up @@ -27,6 +27,7 @@
*/ */


package com.codecommit.antixml package com.codecommit.antixml
package zipper


import org.specs2.mutable._ import org.specs2.mutable._
import org.specs2.ScalaCheck import org.specs2.ScalaCheck
Expand Down
Expand Up @@ -27,6 +27,7 @@
*/ */


package com.codecommit.antixml package com.codecommit.antixml
package zipper


import org.specs2.mutable._ import org.specs2.mutable._
import org.specs2.ScalaCheck import org.specs2.ScalaCheck
Expand Down

0 comments on commit 31ab20a

Please sign in to comment.