Explorar el Código

File renaming.

Piotr Jasiun hace 10 años
padre
commit
dc51b60f62
Se han modificado 26 ficheros con 268 adiciones y 236 borrados
  1. 0 123
      packages/ckeditor5-engine/src/treemodel/batch-base.js
  2. 116 20
      packages/ckeditor5-engine/src/treemodel/batch.js
  3. 2 1
      packages/ckeditor5-engine/src/treemodel/delta/attributedelta.js
  4. 22 0
      packages/ckeditor5-engine/src/treemodel/delta/basic-deltas.js
  5. 13 67
      packages/ckeditor5-engine/src/treemodel/delta/basic-transformations.js
  6. 1 1
      packages/ckeditor5-engine/src/treemodel/delta/insertdelta.js
  7. 1 1
      packages/ckeditor5-engine/src/treemodel/delta/mergedelta.js
  8. 1 1
      packages/ckeditor5-engine/src/treemodel/delta/movedelta.js
  9. 1 1
      packages/ckeditor5-engine/src/treemodel/delta/removedelta.js
  10. 1 1
      packages/ckeditor5-engine/src/treemodel/delta/splitdelta.js
  11. 56 6
      packages/ckeditor5-engine/src/treemodel/delta/transform.js
  12. 1 1
      packages/ckeditor5-engine/src/treemodel/delta/unwrapdelta.js
  13. 1 1
      packages/ckeditor5-engine/src/treemodel/delta/weakinsertdelta.js
  14. 1 1
      packages/ckeditor5-engine/src/treemodel/delta/wrapdelta.js
  15. 5 0
      packages/ckeditor5-engine/src/treemodel/document.js
  16. 5 1
      packages/ckeditor5-engine/tests/treemodel/batch.js
  17. 4 1
      packages/ckeditor5-engine/tests/treemodel/delta/transform/attributedelta.js
  18. 5 1
      packages/ckeditor5-engine/tests/treemodel/delta/transform/delta.js
  19. 4 1
      packages/ckeditor5-engine/tests/treemodel/delta/transform/insertdelta.js
  20. 4 1
      packages/ckeditor5-engine/tests/treemodel/delta/transform/mergedelta.js
  21. 4 1
      packages/ckeditor5-engine/tests/treemodel/delta/transform/movedelta.js
  22. 4 1
      packages/ckeditor5-engine/tests/treemodel/delta/transform/removedelta.js
  23. 4 1
      packages/ckeditor5-engine/tests/treemodel/delta/transform/splitdelta.js
  24. 4 1
      packages/ckeditor5-engine/tests/treemodel/delta/transform/unwrapdelta.js
  25. 4 1
      packages/ckeditor5-engine/tests/treemodel/delta/transform/weakinsertdelta.js
  26. 4 1
      packages/ckeditor5-engine/tests/treemodel/delta/transform/wrapdelta.js

+ 0 - 123
packages/ckeditor5-engine/src/treemodel/batch-base.js

@@ -1,123 +0,0 @@
-/**
- * @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
- * For licensing, see LICENSE.md.
- */
-
-'use strict';
-
-import CKEditorError from '../ckeditorerror.js';
-
-/**
- * The Batch class groups document changes (deltas). All deltas grouped in a single Batch can be
- * reverted together, so you can think about the Batch as a single undo step. If you want to extend one
- * undo step you can call another method on the same Batch object. If you want to create a separate undo step
- * you can create a new Batch.
- *
- * For example to create two separate undo steps you can call:
- *
- *		doc.batch().insert( firstPosition, 'foo' );
- *		doc.batch().insert( secondPosition, 'bar' );
- *
- * To create a single undo step:
- *
- *		const batch = doc.batch();
- *		batch.insert( firstPosition, 'foo' );
- *		batch.insert( secondPosition, 'bar' );
- *
- * Note that all document modification methods (insert, remove, split, etc.) are chainable so you can shorten code to:
- *
- *		doc.batch().insert( firstPosition, 'foo' ).insert( secondPosition, 'bar' );
- *
- * @memberOf core.treeModel
- */
-export default class Batch {
-	/**
-	 * Creates Batch instance. Not recommended to use directly, use {@link core.treeModel.Document#batch} instead.
-	 *
-	 * @param {core.treeModel.Document} doc Document which this Batch changes.
-	 */
-	constructor( doc ) {
-		/**
-		 * Document which this Batch changes.
-		 *
-		 * @member core.treeModel.Batch#doc
-		 * @readonly
-		 * @type {core.treeModel.Document}
-		 */
-		this.doc = doc;
-
-		/**
-		 * Array of deltas which compose Batch.
-		 *
-		 * @member core.treeModel.Batch#deltas
-		 * @readonly
-		 * @type {Array.<core.treeModel.delta.Delta>}
-		 */
-		this.deltas = [];
-	}
-
-	/**
-	 * Adds delta to the Batch instance. All modification methods (insert, remove, split, etc.) use this method
-	 * to add created deltas.
-	 *
-	 * @param {core.treeModel.delta.Delta} delta Delta to add.
-	 * @return {core.treeModel.delta.Delta} Added delta.
-	 */
-	addDelta( delta ) {
-		delta.batch = this;
-		this.deltas.push( delta );
-
-		return delta;
-	}
-}
-
-/**
- * Function to register Batch methods. To make code scalable Batch do not have modification
- * methods built in. They can be registered using this method.
- *
- * This method checks if there is no naming collision and throws `batch-register-taken` if the method name
- * is already taken.
- *
- * Besides that no magic happens here, the method is added to the `Batch` class prototype.
- *
- * For example:
- *
- *		Batch.register( 'insert', function( position, nodes ) {
- *			// You can use a class inherit from Delta if that class should handle OT in the special way.
- *			const delta = new Delta();
- *
- *			// Create operations which should be components of this delta.
- *			const operation = new InsertOperation( position, nodes, this.doc.version );
- *
- *			// Remember to apply every operation, no magic, you need to do it manually.
- *			this.doc.applyOperation( operation );
- *
- *			// Add operation to the delta.
- *			delta.addOperation( operation );
- *
- *			// Add delta to the Batch instance.
- *			this.addDelta( delta );
- *
- *			// Make this method chainable.
- *			return this;
- *		} );
- *
- * @method core.treeModel.Batch.register
- * @param {String} name Method name.
- * @param {Function} creator Method body.
- */
-export function register( name, creator ) {
-	if ( Batch.prototype[ name ] ) {
-		/**
-		 * This batch method name is already taken.
-		 *
-		 * @error batch-register-taken
-		 * @param {String} name
-		 */
-		throw new CKEditorError(
-			'batch-register-taken: This batch method name is already taken.',
-			{ name: name } );
-	}
-
-	Batch.prototype[ name ] = creator;
-}

+ 116 - 20
packages/ckeditor5-engine/src/treemodel/batch.js

@@ -5,23 +5,119 @@
 
 'use strict';
 
-// Batch is split into two files because of circular dependencies reasons.
-
-// Deltas require `register` method that require `Batch` class and is defined in batch-base.js.
-// We would like to group all deltas files in one place, so we would only have to include batch.js
-// which would already have all default deltas registered.
-
-// Import default suite of deltas so a feature have to include only Batch class file.
-import d1 from './delta/insertdelta.js';
-import d2 from './delta/weakinsertdelta.js';
-import d3 from './delta/movedelta.js';
-import d4 from './delta/removedelta.js';
-import d5 from './delta/attributedelta.js';
-import d6 from './delta/splitdelta.js';
-import d7 from './delta/mergedelta.js';
-import d8 from './delta/wrapdelta.js';
-import d9 from './delta/unwrapdelta.js';
-/*jshint unused: false*/
-
-import Batch from './batch-base.js';
-export default Batch;
+import CKEditorError from '../ckeditorerror.js';
+
+/**
+ * The Batch class groups document changes (deltas). All deltas grouped in a single Batch can be
+ * reverted together, so you can think about the Batch as a single undo step. If you want to extend one
+ * undo step you can call another method on the same Batch object. If you want to create a separate undo step
+ * you can create a new Batch.
+ *
+ * For example to create two separate undo steps you can call:
+ *
+ *		doc.batch().insert( firstPosition, 'foo' );
+ *		doc.batch().insert( secondPosition, 'bar' );
+ *
+ * To create a single undo step:
+ *
+ *		const batch = doc.batch();
+ *		batch.insert( firstPosition, 'foo' );
+ *		batch.insert( secondPosition, 'bar' );
+ *
+ * Note that all document modification methods (insert, remove, split, etc.) are chainable so you can shorten code to:
+ *
+ *		doc.batch().insert( firstPosition, 'foo' ).insert( secondPosition, 'bar' );
+ *
+ * @memberOf core.treeModel
+ */
+export default class Batch {
+	/**
+	 * Creates Batch instance. Not recommended to use directly, use {@link core.treeModel.Document#batch} instead.
+	 *
+	 * @param {core.treeModel.Document} doc Document which this Batch changes.
+	 */
+	constructor( doc ) {
+		/**
+		 * Document which this Batch changes.
+		 *
+		 * @member core.treeModel.Batch#doc
+		 * @readonly
+		 * @type {core.treeModel.Document}
+		 */
+		this.doc = doc;
+
+		/**
+		 * Array of deltas which compose Batch.
+		 *
+		 * @member core.treeModel.Batch#deltas
+		 * @readonly
+		 * @type {Array.<core.treeModel.delta.Delta>}
+		 */
+		this.deltas = [];
+	}
+
+	/**
+	 * Adds delta to the Batch instance. All modification methods (insert, remove, split, etc.) use this method
+	 * to add created deltas.
+	 *
+	 * @param {core.treeModel.delta.Delta} delta Delta to add.
+	 * @return {core.treeModel.delta.Delta} Added delta.
+	 */
+	addDelta( delta ) {
+		delta.batch = this;
+		this.deltas.push( delta );
+
+		return delta;
+	}
+}
+
+/**
+ * Function to register Batch methods. To make code scalable Batch do not have modification
+ * methods built in. They can be registered using this method.
+ *
+ * This method checks if there is no naming collision and throws `batch-register-taken` if the method name
+ * is already taken.
+ *
+ * Besides that no magic happens here, the method is added to the `Batch` class prototype.
+ *
+ * For example:
+ *
+ *		Batch.register( 'insert', function( position, nodes ) {
+ *			// You can use a class inherit from Delta if that class should handle OT in the special way.
+ *			const delta = new Delta();
+ *
+ *			// Create operations which should be components of this delta.
+ *			const operation = new InsertOperation( position, nodes, this.doc.version );
+ *
+ *			// Remember to apply every operation, no magic, you need to do it manually.
+ *			this.doc.applyOperation( operation );
+ *
+ *			// Add operation to the delta.
+ *			delta.addOperation( operation );
+ *
+ *			// Add delta to the Batch instance.
+ *			this.addDelta( delta );
+ *
+ *			// Make this method chainable.
+ *			return this;
+ *		} );
+ *
+ * @method core.treeModel.Batch.register
+ * @param {String} name Method name.
+ * @param {Function} creator Method body.
+ */
+export function register( name, creator ) {
+	if ( Batch.prototype[ name ] ) {
+		/**
+		 * This batch method name is already taken.
+		 *
+		 * @error batch-register-taken
+		 * @param {String} name
+		 */
+		throw new CKEditorError(
+			'batch-register-taken: This batch method name is already taken.',
+			{ name: name } );
+	}
+
+	Batch.prototype[ name ] = creator;
+}

+ 2 - 1
packages/ckeditor5-engine/src/treemodel/delta/attributedelta.js

@@ -4,8 +4,9 @@
  */
 
 'use strict';
+
 import Delta from './delta.js';
-import { register } from '../batch-base.js';
+import { register } from '../batch.js';
 import AttributeOperation from '../operation/attributeoperation.js';
 import Position from '../position.js';
 import Range from '../range.js';

+ 22 - 0
packages/ckeditor5-engine/src/treemodel/delta/basic-deltas.js

@@ -0,0 +1,22 @@
+/**
+ * @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
+ * For licensing, see LICENSE.md.
+ */
+
+'use strict';
+
+// Deltas require `register` method that require `Batch` class and is defined in batch-base.js.
+// We would like to group all deltas files in one place, so we would only have to include batch.js
+// which would already have all default deltas registered.
+
+// Import default suite of deltas so a feature have to include only Batch class file.
+import d1 from './insertdelta.js';
+import d2 from './weakinsertdelta.js';
+import d3 from './movedelta.js';
+import d4 from './removedelta.js';
+import d5 from './attributedelta.js';
+import d6 from './splitdelta.js';
+import d7 from './mergedelta.js';
+import d8 from './wrapdelta.js';
+import d9 from './unwrapdelta.js';
+/*jshint unused: false*/

+ 13 - 67
packages/ckeditor5-engine/src/treemodel/delta/transform/transform.js → packages/ckeditor5-engine/src/treemodel/delta/basic-transformations.js

@@ -5,77 +5,23 @@
 
 'use strict';
 
-import arrayUtils from '../../../lib/lodash/array.js';
-import { addTransformationCase, getTransformationCase, defaultTransform } from './transform-api.js';
+import { addTransformationCase, defaultTransform } from './transform.js';
 
-import Range from '../../range.js';
+import Range from '../range.js';
 
-import AttributeOperation from '../../operation/attributeoperation.js';
+import AttributeOperation from '../operation/attributeoperation.js';
 
-import Delta from '../delta.js';
-import AttributeDelta from '../attributedelta.js';
-import InsertDelta from '../insertdelta.js';
-import MergeDelta from '../mergedelta.js';
-import MoveDelta from '../movedelta.js';
-import SplitDelta from '../splitdelta.js';
-import WeakInsertDelta from '../weakinsertdelta.js';
-import WrapDelta from '../wrapdelta.js';
-import UnwrapDelta from '../unwrapdelta.js';
+import Delta from './delta.js';
+import AttributeDelta from './attributedelta.js';
+import InsertDelta from './insertdelta.js';
+import MergeDelta from './mergedelta.js';
+import MoveDelta from './movedelta.js';
+import SplitDelta from './splitdelta.js';
+import WeakInsertDelta from './weakinsertdelta.js';
+import WrapDelta from './wrapdelta.js';
+import UnwrapDelta from './unwrapdelta.js';
 
-import utils from '../../../utils.js';
-
-/**
- * @namespace core.treeModel.delta.transform
- */
-
-/**
- * Transforms given {@link core.treeModel.delta.Delta delta} by another {@link core.treeModel.delta.Delta delta} and
- * returns the result of that transformation as an array containing one or more {@link core.treeModel.delta.Delta delta}
- * instances.
- *
- * Delta transformations heavily base on {@link core.treeModel.operation.transform operational transformations}. Since
- * delta is a list of operations most situations can be handled thanks to operational transformation. Unfortunately,
- * deltas are more complicated than operations and have they semantic meaning, as they represent user's editing intentions.
- *
- * Sometimes, simple operational transformation on deltas' operations might result in some unexpected results. Those
- * results would be fine from OT point of view, but would not reflect user's intentions. Because of such conflicts
- * we need to handle transformations in special cases in a custom way.
- *
- * The function itself looks whether two given delta types have a special case function registered. If so, the deltas are
- * transformed using that function. If not, {@link core.treeModel.delta.defaultTransform default transformation algorithm}
- * is used.
- *
- * @see core.treeModel.operation.transform
- *
- * @external core.treeModel.delta.transform
- * @function core.treeModel.delta.transform.transform
- * @param {core.treeModel.delta.Delta} a Delta that will be transformed.
- * @param {core.treeModel.delta.Delta} b Delta to transform by.
- * @param {Boolean} isAMoreImportantThanB Flag indicating whether the delta which will be transformed (`a`) should be treated
- * as more important when resolving conflicts. Note that this flag is used only if provided deltas have same
- * {@link core.treeModel.delta.priorities priority}. If deltas have different priorities, their importance is resolved
- * automatically and overwrites this flag.
- * @returns {Array.<core.treeModel.delta.Delta>} Result of the transformation.
- */
-export default function transform( a, b, isAMoreImportantThanB ) {
-	const transformAlgorithm = getTransformationCase( a, b ) || defaultTransform;
-
-	const transformed = transformAlgorithm( a, b, isAMoreImportantThanB );
-	const baseVersion = arrayUtils.last( b.operations ).baseVersion;
-
-	return updateBaseVersion( baseVersion, transformed );
-}
-
-// Updates base versions of operations inside deltas (which are the results of delta transformation).
-function updateBaseVersion( baseVersion, deltas ) {
-	for ( let delta of deltas ) {
-		for ( let op of delta.operations ) {
-			op.baseVersion = ++baseVersion;
-		}
-	}
-
-	return deltas;
-}
+import utils from '../../utils.js';
 
 // Provide transformations for default deltas.
 

+ 1 - 1
packages/ckeditor5-engine/src/treemodel/delta/insertdelta.js

@@ -7,7 +7,7 @@
 
 import Delta from './delta.js';
 import RemoveDelta from './removedelta.js';
-import { register } from '../batch-base.js';
+import { register } from '../batch.js';
 import InsertOperation from '../operation/insertoperation.js';
 
 /**

+ 1 - 1
packages/ckeditor5-engine/src/treemodel/delta/mergedelta.js

@@ -7,7 +7,7 @@
 
 import Delta from './delta.js';
 import SplitDelta from './splitdelta.js';
-import { register } from '../batch-base.js';
+import { register } from '../batch.js';
 import Position from '../position.js';
 import Element from '../element.js';
 import RemoveOperation from '../operation/removeoperation.js';

+ 1 - 1
packages/ckeditor5-engine/src/treemodel/delta/movedelta.js

@@ -6,7 +6,7 @@
 'use strict';
 
 import Delta from './delta.js';
-import { register } from '../batch-base.js';
+import { register } from '../batch.js';
 import MoveOperation from '../operation/moveoperation.js';
 import Position from '../position.js';
 import Range from '../range.js';

+ 1 - 1
packages/ckeditor5-engine/src/treemodel/delta/removedelta.js

@@ -6,7 +6,7 @@
 'use strict';
 
 import MoveDelta from './movedelta.js';
-import { register } from '../batch-base.js';
+import { register } from '../batch.js';
 import RemoveOperation from '../operation/removeoperation.js';
 import Position from '../position.js';
 import Range from '../range.js';

+ 1 - 1
packages/ckeditor5-engine/src/treemodel/delta/splitdelta.js

@@ -6,7 +6,7 @@
 'use strict';
 
 import Delta from './delta.js';
-import { register } from '../batch-base.js';
+import { register } from '../batch.js';
 import Position from '../position.js';
 import Element from '../element.js';
 import InsertOperation from '../operation/insertoperation.js';

+ 56 - 6
packages/ckeditor5-engine/src/treemodel/delta/transform/transform-api.js → packages/ckeditor5-engine/src/treemodel/delta/transform.js

@@ -5,10 +5,60 @@
 
 'use strict';
 
-import OT from '../../operation/transform.js';
+import operationTransform from '../operation/transform.js';
+import arrayUtils from '../../lib/lodash/array.js';
 
 const specialCases = new Map();
 
+/**
+ * Transforms given {@link core.treeModel.delta.Delta delta} by another {@link core.treeModel.delta.Delta delta} and
+ * returns the result of that transformation as an array containing one or more {@link core.treeModel.delta.Delta delta}
+ * instances.
+ *
+ * Delta transformations heavily base on {@link core.treeModel.operation.transform operational transformations}. Since
+ * delta is a list of operations most situations can be handled thanks to operational transformation. Unfortunately,
+ * deltas are more complicated than operations and have they semantic meaning, as they represent user's editing intentions.
+ *
+ * Sometimes, simple operational transformation on deltas' operations might result in some unexpected results. Those
+ * results would be fine from OT point of view, but would not reflect user's intentions. Because of such conflicts
+ * we need to handle transformations in special cases in a custom way.
+ *
+ * The function itself looks whether two given delta types have a special case function registered. If so, the deltas are
+ * transformed using that function. If not, {@link core.treeModel.delta.defaultTransform default transformation algorithm}
+ * is used.
+ *
+ * @see core.treeModel.operation.transform
+ *
+ * @external core.treeModel.delta.transform
+ * @function core.treeModel.delta.transform.transform
+ * @param {core.treeModel.delta.Delta} a Delta that will be transformed.
+ * @param {core.treeModel.delta.Delta} b Delta to transform by.
+ * @param {Boolean} isAMoreImportantThanB Flag indicating whether the delta which will be transformed (`a`) should be treated
+ * as more important when resolving conflicts. Note that this flag is used only if provided deltas have same
+ * {@link core.treeModel.delta.priorities priority}. If deltas have different priorities, their importance is resolved
+ * automatically and overwrites this flag.
+ * @returns {Array.<core.treeModel.delta.Delta>} Result of the transformation.
+ */
+export default function transform( a, b, isAMoreImportantThanB ) {
+	const transformAlgorithm = getTransformationCase( a, b ) || defaultTransform;
+
+	const transformed = transformAlgorithm( a, b, isAMoreImportantThanB );
+	const baseVersion = arrayUtils.last( b.operations ).baseVersion;
+
+	return updateBaseVersion( baseVersion, transformed );
+}
+
+// Updates base versions of operations inside deltas (which are the results of delta transformation).
+function updateBaseVersion( baseVersion, deltas ) {
+	for ( let delta of deltas ) {
+		for ( let op of delta.operations ) {
+			op.baseVersion = ++baseVersion;
+		}
+	}
+
+	return deltas;
+}
+
 /**
  * The default delta transformation function. It is used for those deltas that are not in special case conflict.
  *
@@ -67,15 +117,15 @@ export function defaultTransform( a, b, isAMoreImportantThanB ) {
 				// This can be easier understood when operations sets to transform are represented by diamond diagrams:
 				// http://www.codecommit.com/blog/java/understanding-and-applying-operational-transformation
 
-				// Using push.apply because OT function is returning an array with one or multiple results.
-				Array.prototype.push.apply( newByOps, OT( opB, op, !isAMoreImportantThanB ) );
+				// Using push.apply because operationTransform function is returning an array with one or multiple results.
+				Array.prototype.push.apply( newByOps, operationTransform( opB, op, !isAMoreImportantThanB ) );
 
 				// Then, we transform operation from delta A by operation from delta B.
-				const results = OT( op, opB, isAMoreImportantThanB );
+				const results = operationTransform( op, opB, isAMoreImportantThanB );
 
 				// We replace currently processed operation from `ops` array by the results of transformation.
-				// Note, that we process single operation but the OT result might be an array, so we might
-				// splice-in more operations. We will process them further in next iterations. Right now we
+				// Note, that we process single operation but the operationTransform result might be an array, so we
+				// might splice-in more operations. We will process them further in next iterations. Right now we
 				// just save them in `ops` array and move `i` pointer by proper offset.
 				Array.prototype.splice.apply( ops, [ i, 1 ].concat( results ) );
 

+ 1 - 1
packages/ckeditor5-engine/src/treemodel/delta/unwrapdelta.js

@@ -7,7 +7,7 @@
 
 import Delta from './delta.js';
 import WrapDelta from './wrapdelta.js';
-import { register } from '../batch-base.js';
+import { register } from '../batch.js';
 import Position from '../position.js';
 import RemoveOperation from '../operation/removeoperation.js';
 import MoveOperation from '../operation/moveoperation.js';

+ 1 - 1
packages/ckeditor5-engine/src/treemodel/delta/weakinsertdelta.js

@@ -6,7 +6,7 @@
 'use strict';
 
 import InsertDelta from './insertdelta.js';
-import { register } from '../batch-base.js';
+import { register } from '../batch.js';
 import InsertOperation from '../operation/insertoperation.js';
 import NodeList from '../nodelist.js';
 

+ 1 - 1
packages/ckeditor5-engine/src/treemodel/delta/wrapdelta.js

@@ -7,7 +7,7 @@
 
 import Delta from './delta.js';
 import UnwrapDelta from './unwrapdelta.js';
-import { register } from '../batch-base.js';
+import { register } from '../batch.js';
 import Position from '../position.js';
 import Range from '../range.js';
 import Element from '../element.js';

+ 5 - 0
packages/ckeditor5-engine/src/treemodel/document.js

@@ -5,6 +5,11 @@
 
 'use strict';
 
+// Load all basic deltas and transformations, they register themselves, but they need to be imported somewhere.
+import deltas from './delta/basic-deltas.js';
+import transformations from './delta/basic-transformations.js';
+/*jshint unused: false*/
+
 import RootElement from './rootelement.js';
 import Batch from './batch.js';
 import Selection from './selection.js';

+ 5 - 1
packages/ckeditor5-engine/tests/treemodel/batch.js

@@ -6,8 +6,12 @@
 /* bender-tags: treemodel, delta */
 
 'use strict';
+
+import deltas from '/ckeditor5/core/treemodel/delta/basic-deltas.js';
+/*jshint unused: false*/
+
 import Batch from '/ckeditor5/core/treemodel/batch.js';
-import { register } from '/ckeditor5/core/treemodel/batch-base.js';
+import { register } from '/ckeditor5/core/treemodel/batch.js';
 import Delta from '/ckeditor5/core/treemodel/delta/delta.js';
 import CKEditorError from '/ckeditor5/core/ckeditorerror.js';
 

+ 4 - 1
packages/ckeditor5-engine/tests/treemodel/delta/transform/attributedelta.js

@@ -7,7 +7,10 @@
 
 'use strict';
 
-import transform from '/ckeditor5/core/treemodel/delta/transform/transform.js';
+import transformations from '/ckeditor5/core/treemodel/delta/basic-transformations.js';
+/*jshint unused: false*/
+
+import transform from '/ckeditor5/core/treemodel/delta/transform.js';
 
 import Text from '/ckeditor5/core/treemodel/text.js';
 import Position from '/ckeditor5/core/treemodel/position.js';

+ 5 - 1
packages/ckeditor5-engine/tests/treemodel/delta/transform/delta.js

@@ -7,7 +7,11 @@
 
 'use strict';
 
-import transform from '/ckeditor5/core/treemodel/delta/transform/transform.js';
+import transformations from '/ckeditor5/core/treemodel/delta/basic-transformations.js';
+/*jshint unused: false*/
+
+import transform from '/ckeditor5/core/treemodel/delta/transform.js';
+
 import Position from '/ckeditor5/core/treemodel/position.js';
 import MoveOperation from '/ckeditor5/core/treemodel/operation/moveoperation.js';
 import Delta from '/ckeditor5/core/treemodel/delta/delta.js';

+ 4 - 1
packages/ckeditor5-engine/tests/treemodel/delta/transform/insertdelta.js

@@ -7,7 +7,10 @@
 
 'use strict';
 
-import transform from '/ckeditor5/core/treemodel/delta/transform/transform.js';
+import transformations from '/ckeditor5/core/treemodel/delta/basic-transformations.js';
+/*jshint unused: false*/
+
+import transform from '/ckeditor5/core/treemodel/delta/transform.js';
 
 import Element from '/ckeditor5/core/treemodel/element.js';
 import Position from '/ckeditor5/core/treemodel/position.js';

+ 4 - 1
packages/ckeditor5-engine/tests/treemodel/delta/transform/mergedelta.js

@@ -7,7 +7,10 @@
 
 'use strict';
 
-import transform from '/ckeditor5/core/treemodel/delta/transform/transform.js';
+import transformations from '/ckeditor5/core/treemodel/delta/basic-transformations.js';
+/*jshint unused: false*/
+
+import transform from '/ckeditor5/core/treemodel/delta/transform.js';
 
 import Element from '/ckeditor5/core/treemodel/element.js';
 import Position from '/ckeditor5/core/treemodel/position.js';

+ 4 - 1
packages/ckeditor5-engine/tests/treemodel/delta/transform/movedelta.js

@@ -7,7 +7,10 @@
 
 'use strict';
 
-import transform from '/ckeditor5/core/treemodel/delta/transform/transform.js';
+import transformations from '/ckeditor5/core/treemodel/delta/basic-transformations.js';
+/*jshint unused: false*/
+
+import transform from '/ckeditor5/core/treemodel/delta/transform.js';
 
 import Position from '/ckeditor5/core/treemodel/position.js';
 import Range from '/ckeditor5/core/treemodel/range.js';

+ 4 - 1
packages/ckeditor5-engine/tests/treemodel/delta/transform/removedelta.js

@@ -7,7 +7,10 @@
 
 'use strict';
 
-import transform from '/ckeditor5/core/treemodel/delta/transform/transform.js';
+import transformations from '/ckeditor5/core/treemodel/delta/basic-transformations.js';
+/*jshint unused: false*/
+
+import transform from '/ckeditor5/core/treemodel/delta/transform.js';
 
 import Position from '/ckeditor5/core/treemodel/position.js';
 import Range from '/ckeditor5/core/treemodel/range.js';

+ 4 - 1
packages/ckeditor5-engine/tests/treemodel/delta/transform/splitdelta.js

@@ -7,7 +7,10 @@
 
 'use strict';
 
-import transform from '/ckeditor5/core/treemodel/delta/transform/transform.js';
+import transformations from '/ckeditor5/core/treemodel/delta/basic-transformations.js';
+/*jshint unused: false*/
+
+import transform from '/ckeditor5/core/treemodel/delta/transform.js';
 
 import Element from '/ckeditor5/core/treemodel/element.js';
 import Position from '/ckeditor5/core/treemodel/position.js';

+ 4 - 1
packages/ckeditor5-engine/tests/treemodel/delta/transform/unwrapdelta.js

@@ -7,7 +7,10 @@
 
 'use strict';
 
-import transform from '/ckeditor5/core/treemodel/delta/transform/transform.js';
+import transformations from '/ckeditor5/core/treemodel/delta/basic-transformations.js';
+/*jshint unused: false*/
+
+import transform from '/ckeditor5/core/treemodel/delta/transform.js';
 
 import Element from '/ckeditor5/core/treemodel/element.js';
 import Position from '/ckeditor5/core/treemodel/position.js';

+ 4 - 1
packages/ckeditor5-engine/tests/treemodel/delta/transform/weakinsertdelta.js

@@ -7,7 +7,10 @@
 
 'use strict';
 
-import transform from '/ckeditor5/core/treemodel/delta/transform/transform.js';
+import transformations from '/ckeditor5/core/treemodel/delta/basic-transformations.js';
+/*jshint unused: false*/
+
+import transform from '/ckeditor5/core/treemodel/delta/transform.js';
 
 import Text from '/ckeditor5/core/treemodel/text.js';
 import Position from '/ckeditor5/core/treemodel/position.js';

+ 4 - 1
packages/ckeditor5-engine/tests/treemodel/delta/transform/wrapdelta.js

@@ -7,7 +7,10 @@
 
 'use strict';
 
-import transform from '/ckeditor5/core/treemodel/delta/transform/transform.js';
+import transformations from '/ckeditor5/core/treemodel/delta/basic-transformations.js';
+/*jshint unused: false*/
+
+import transform from '/ckeditor5/core/treemodel/delta/transform.js';
 
 import Element from '/ckeditor5/core/treemodel/element.js';
 import Position from '/ckeditor5/core/treemodel/position.js';