8
0
Piotrek Koszuliński 9 лет назад
Родитель
Сommit
f9247ce3c7
68 измененных файлов с 934 добавлено и 929 удалено
  1. 1 1
      packages/ckeditor5-engine/src/core.jsdoc
  2. 1 1
      packages/ckeditor5-engine/src/dataprocessor.jsdoc
  3. 2 2
      packages/ckeditor5-engine/src/dataprocessor/basichtmlwriter.js
  4. 3 3
      packages/ckeditor5-engine/src/dataprocessor/dataprocessor.js
  5. 4 4
      packages/ckeditor5-engine/src/dataprocessor/htmldataprocessor.js
  6. 2 2
      packages/ckeditor5-engine/src/dataprocessor/htmlwriter.js
  7. 1 1
      packages/ckeditor5-engine/src/treecontroller.jsdoc
  8. 23 22
      packages/ckeditor5-engine/src/treecontroller/mapper.js
  9. 1 1
      packages/ckeditor5-engine/src/treemodel.jsdoc
  10. 8 8
      packages/ckeditor5-engine/src/treemodel/batch.js
  11. 9 9
      packages/ckeditor5-engine/src/treemodel/characterproxy.js
  12. 1 1
      packages/ckeditor5-engine/src/treemodel/delta.jsdoc
  13. 14 14
      packages/ckeditor5-engine/src/treemodel/delta/attributedelta.js
  14. 12 12
      packages/ckeditor5-engine/src/treemodel/delta/delta.js
  15. 10 10
      packages/ckeditor5-engine/src/treemodel/delta/insertdelta.js
  16. 10 10
      packages/ckeditor5-engine/src/treemodel/delta/mergedelta.js
  17. 13 13
      packages/ckeditor5-engine/src/treemodel/delta/movedelta.js
  18. 4 4
      packages/ckeditor5-engine/src/treemodel/delta/removedelta.js
  19. 9 9
      packages/ckeditor5-engine/src/treemodel/delta/splitdelta.js
  20. 22 22
      packages/ckeditor5-engine/src/treemodel/delta/transform.js
  21. 7 7
      packages/ckeditor5-engine/src/treemodel/delta/unwrapdelta.js
  22. 14 11
      packages/ckeditor5-engine/src/treemodel/delta/weakinsertdelta.js
  23. 10 10
      packages/ckeditor5-engine/src/treemodel/delta/wrapdelta.js
  24. 43 43
      packages/ckeditor5-engine/src/treemodel/document.js
  25. 16 16
      packages/ckeditor5-engine/src/treemodel/element.js
  26. 12 12
      packages/ckeditor5-engine/src/treemodel/history.js
  27. 3 3
      packages/ckeditor5-engine/src/treemodel/item.jsdoc
  28. 29 29
      packages/ckeditor5-engine/src/treemodel/liveposition.js
  29. 26 26
      packages/ckeditor5-engine/src/treemodel/liverange.js
  30. 9 9
      packages/ckeditor5-engine/src/treemodel/node.js
  31. 24 24
      packages/ckeditor5-engine/src/treemodel/nodelist.js
  32. 2 2
      packages/ckeditor5-engine/src/treemodel/operation.jsdoc
  33. 12 12
      packages/ckeditor5-engine/src/treemodel/operation/attributeoperation.js
  34. 10 10
      packages/ckeditor5-engine/src/treemodel/operation/insertoperation.js
  35. 11 11
      packages/ckeditor5-engine/src/treemodel/operation/moveoperation.js
  36. 5 5
      packages/ckeditor5-engine/src/treemodel/operation/nooperation.js
  37. 19 19
      packages/ckeditor5-engine/src/treemodel/operation/operation.js
  38. 6 6
      packages/ckeditor5-engine/src/treemodel/operation/reinsertoperation.js
  39. 6 6
      packages/ckeditor5-engine/src/treemodel/operation/removeoperation.js
  40. 16 16
      packages/ckeditor5-engine/src/treemodel/operation/rootattributeoperation.js
  41. 14 13
      packages/ckeditor5-engine/src/treemodel/operation/transform.js
  42. 38 38
      packages/ckeditor5-engine/src/treemodel/position.js
  43. 63 63
      packages/ckeditor5-engine/src/treemodel/range.js
  44. 5 5
      packages/ckeditor5-engine/src/treemodel/rootelement.js
  45. 21 21
      packages/ckeditor5-engine/src/treemodel/schema.js
  46. 42 42
      packages/ckeditor5-engine/src/treemodel/selection.js
  47. 4 4
      packages/ckeditor5-engine/src/treemodel/text.js
  48. 17 17
      packages/ckeditor5-engine/src/treemodel/textfragment.js
  49. 29 29
      packages/ckeditor5-engine/src/treemodel/treewalker.js
  50. 1 1
      packages/ckeditor5-engine/src/treeview.jsdoc
  51. 29 29
      packages/ckeditor5-engine/src/treeview/domconverter.js
  52. 25 25
      packages/ckeditor5-engine/src/treeview/element.js
  53. 21 21
      packages/ckeditor5-engine/src/treeview/node.js
  54. 1 1
      packages/ckeditor5-engine/src/treeview/observer.jsdoc
  55. 15 15
      packages/ckeditor5-engine/src/treeview/observer/domeventobserver.js
  56. 7 7
      packages/ckeditor5-engine/src/treeview/observer/focusobserver.js
  57. 29 29
      packages/ckeditor5-engine/src/treeview/observer/mutationobserver.js
  58. 12 12
      packages/ckeditor5-engine/src/treeview/observer/observer.js
  59. 8 8
      packages/ckeditor5-engine/src/treeview/position.js
  60. 12 12
      packages/ckeditor5-engine/src/treeview/range.js
  61. 17 17
      packages/ckeditor5-engine/src/treeview/renderer.js
  62. 6 6
      packages/ckeditor5-engine/src/treeview/text.js
  63. 24 24
      packages/ckeditor5-engine/src/treeview/treeview.js
  64. 55 55
      packages/ckeditor5-engine/src/treeview/writer.js
  65. 1 1
      packages/ckeditor5-engine/src/utils-diff.js
  66. 1 1
      packages/ckeditor5-engine/tests/treemodel/_utils/utils.js
  67. 1 1
      packages/ckeditor5-engine/tests/treemodel/operation/operation.js
  68. 6 6
      packages/ckeditor5-engine/tests/treeview/writer/_utils/utils.js

+ 1 - 1
packages/ckeditor5-engine/src/core.jsdoc

@@ -4,5 +4,5 @@
  */
 
 /**
- * @namespace core
+ * @namespace engine
  */

+ 1 - 1
packages/ckeditor5-engine/src/dataprocessor.jsdoc

@@ -4,5 +4,5 @@
  */
 
 /**
- * @namespace core.dataProcessor
+ * @namespace engine.dataProcessor
  */

+ 2 - 2
packages/ckeditor5-engine/src/dataprocessor/basichtmlwriter.js

@@ -9,8 +9,8 @@
  * Basic HTML writer, it uses the native `innerHTML` property for basic conversion
  * from DocumentFragment to an HTML string.
  *
- * @memberOf core.dataProcessor
- * @implements core.dataProcessor.HtmlWriter
+ * @memberOf engine.dataProcessor
+ * @implements engine.dataProcessor.HtmlWriter
  */
 export default class BasicHtmlWriter {
 	/**

+ 3 - 3
packages/ckeditor5-engine/src/dataprocessor/dataprocessor.js

@@ -8,13 +8,13 @@
  * Each data processor implements a certain format of the data. E.g. `MarkdownDataProcessor` will convert the data
  * (Markdown string) to a DocumentFragment and back.
  *
- * @interface core.dataProcessor.DataProcessor
+ * @interface engine.dataProcessor.DataProcessor
  */
 
 /**
  * Converts a DocumentFragment to data.
  *
- * @method core.dataProcessor.DataProcessor#toData
+ * @method engine.dataProcessor.DataProcessor#toData
  * @param {DocumentFragment} fragment DocumentFragment to be processed.
  * @returns {*}
  */
@@ -22,7 +22,7 @@
 /**
  * Converts data to a DocumentFragment.
  *
- * @method core.dataProcessor.DataProcessor#toDom
+ * @method engine.dataProcessor.DataProcessor#toDom
  * @param {*} data Data to be processed.
  * @returns {DocumentFragment}
  */

+ 4 - 4
packages/ckeditor5-engine/src/dataprocessor/htmldataprocessor.js

@@ -11,8 +11,8 @@ import BasicHtmlWriter from './basichtmlwriter.js';
  * HtmlDataProcessor class.
  * This data processor implementation uses HTML as input/output data.
  *
- * @memberOf core.dataProcessor
- * @implements core.dataProcessor.DataProcessor
+ * @memberOf engine.dataProcessor
+ * @implements engine.dataProcessor.DataProcessor
  */
 export default class HtmlDataProcessor {
 	/**
@@ -23,7 +23,7 @@ export default class HtmlDataProcessor {
 		 * DOMParser instance used to parse HTML string to HTMLDocument.
 		 *
 		 * @private
-		 * @member {DOMParser} core.dataProcessor.HtmlDataProcessor#_domParser
+		 * @member {DOMParser} engine.dataProcessor.HtmlDataProcessor#_domParser
 		 */
 		this._domParser = new DOMParser();
 
@@ -31,7 +31,7 @@ export default class HtmlDataProcessor {
 		 * BasicHtmlWriter instance used to convert DOM elements to HTML string.
 		 *
 		 * @private
-		 * @member {core.dataProcessor.BasicHtmlWriter} core.dataProcessor.HtmlDataProcessor#_htmlWriter
+		 * @member {engine.dataProcessor.BasicHtmlWriter} engine.dataProcessor.HtmlDataProcessor#_htmlWriter
 		 */
 		this._htmlWriter = new BasicHtmlWriter();
 	}

+ 2 - 2
packages/ckeditor5-engine/src/dataprocessor/htmlwriter.js

@@ -6,13 +6,13 @@
 /**
  * HTML writer interface.
  *
- * @interface core.dataProcessor.HtmlWriter
+ * @interface engine.dataProcessor.HtmlWriter
  */
 
 /**
  * Returns HTML string created from DocumentFragment.
  *
- * @method core.dataProcessor.HtmlWriter#getHtml
+ * @method engine.dataProcessor.HtmlWriter#getHtml
  * @param {DocumentFragment} fragment
  * @returns {String}
  */

+ 1 - 1
packages/ckeditor5-engine/src/treecontroller.jsdoc

@@ -4,5 +4,5 @@
  */
 
 /**
- * @namespace core.treeController
+ * @namespace engine.treeController
  */

+ 23 - 22
packages/ckeditor5-engine/src/treecontroller/mapper.js

@@ -10,12 +10,12 @@ import ViewPosition from '../treeview/position.js';
 import ViewText from '../treeview/text.js';
 
 /**
- * Maps elements and positions between {@link core.treeView.TreeView TreeView} and {@link core.treeModel TreeModel}.
+ * Maps elements and positions between {@link engine.treeView.TreeView TreeView} and {@link engine.treeModel TreeModel}.
  *
  * Mapper use binded elements to find corresponding elements and positions, so, to get proper results,
- * all Tree Model elements should be {@link core.treeController.Mapper#bindElements binded}.
+ * all Tree Model elements should be {@link engine.treeController.Mapper#bindElements binded}.
  *
- * @memberOf core.treeController
+ * @memberOf engine.treeController
  */
 export default class Mapper {
 	/**
@@ -26,7 +26,7 @@ export default class Mapper {
 		 * Model element to View element mapping.
 		 *
 		 * @private
-		 * @member {WeakMap} core.treeController.Mapper#_modelToViewMapping
+		 * @member {WeakMap} engine.treeController.Mapper#_modelToViewMapping
 		 */
 		this._modelToViewMapping = new WeakMap();
 
@@ -34,18 +34,19 @@ export default class Mapper {
 		 * View element to Model element mapping.
 		 *
 		 * @private
-		 * @member {WeakMap} core.treeController.Mapper#_viewToModelMapping
+		 * @member {WeakMap} engine.treeController.Mapper#_viewToModelMapping
 		 */
 		this._viewToModelMapping = new WeakMap();
 	}
 
 	/**
 	 * Marks model and view elements as corresponding. Corresponding elements can be retrieved by using
-	 * the {@link core.treeController.Mapper#toModelElement toModelElement} and {@link core.treeController.Mapper#toViewElement toViewElement}
-	 * methods. The information that elements are bound is also used to translate positions.
+	 * the {@link engine.treeController.Mapper#toModelElement toModelElement} and
+	 * {@link engine.treeController.Mapper#toViewElement toViewElement} methods.
+	 * The information that elements are bound is also used to translate positions.
 	 *
-	 * @param {core.treeModel.Element} modelElement Model element.
-	 * @param {core.treeView.Element} viewElement View element.
+	 * @param {engine.treeModel.Element} modelElement Model element.
+	 * @param {engine.treeView.Element} viewElement View element.
 	 */
 	bindElements( modelElement, viewElement ) {
 		this._modelToViewMapping.set( modelElement, viewElement );
@@ -55,8 +56,8 @@ export default class Mapper {
 	/**
 	 * Gets the corresponding model element.
 	 *
-	 * @param {core.treeView.Element} viewElement View element.
-	 * @returns {core.treeModel.Element|null} Corresponding model element or `null` if not found.
+	 * @param {engine.treeView.Element} viewElement View element.
+	 * @returns {engine.treeModel.Element|null} Corresponding model element or `null` if not found.
 	 */
 	toModelElement( viewElement ) {
 		return this._viewToModelMapping.get( viewElement );
@@ -65,8 +66,8 @@ export default class Mapper {
 	/**
 	 * Gets the corresponding view element.
 	 *
-	 * @param {core.treeModel.Element} modelElement Model element.
-	 * @returns {core.treeView.Element|null} Corresponding view element or `null` if not found.
+	 * @param {engine.treeModel.Element} modelElement Model element.
+	 * @returns {engine.treeView.Element|null} Corresponding view element or `null` if not found.
 	 */
 	toViewElement( modelElement ) {
 		return this._modelToViewMapping.get( modelElement );
@@ -75,8 +76,8 @@ export default class Mapper {
 	/**
 	 * Gets the corresponding model position.
 	 *
-	 * @param {core.treeView.Position} viewPosition View position.
-	 * @returns {core.treeModel.Position} Corresponding model position.
+	 * @param {engine.treeView.Position} viewPosition View position.
+	 * @returns {engine.treeModel.Position} Corresponding model position.
 	 */
 	toModelPosition( viewPosition ) {
 		let viewBlock = viewPosition.parent;
@@ -95,8 +96,8 @@ export default class Mapper {
 	/**
 	 * Gets the corresponding view position.
 	 *
-	 * @param {core.treeModel.Position} modelPosition Model position.
-	 * @returns {core.treeView.Position} Corresponding view position.
+	 * @param {engine.treeModel.Position} modelPosition Model position.
+	 * @returns {engine.treeView.Position} Corresponding view position.
 	 */
 	toViewPosition( modelPosition ) {
 		let viewContainer = this._modelToViewMapping.get( modelPosition.parent );
@@ -117,9 +118,9 @@ export default class Mapper {
 	 *		<p>foo<b>ba|r</b></p> // _toModelOffset( b, 2, b ) -> 2
 	 *
 	 * @private
-	 * @param {core.treeView.Element} viewParent Position parent.
+	 * @param {engine.treeView.Element} viewParent Position parent.
 	 * @param {Number} viewOffset Position offset.
-	 * @param {core.treeView.Element} viewBlock Block used as a base to calculate offset.
+	 * @param {engine.treeView.Element} viewBlock Block used as a base to calculate offset.
 	 * @returns {Number} Offset in the model.
 	 */
 	_toModelOffset( viewParent, viewOffset, viewBlock ) {
@@ -158,7 +159,7 @@ export default class Mapper {
 	 *		<p>foo</p>   -> 1 // Length the element which has corresponding model element is always 1.
 	 *
 	 * @private
-	 * @param {core.treeView.Element} viewNode View node.
+	 * @param {engine.treeView.Element} viewNode View node.
 	 * @returns {Number} Length of the node in the tree model.
 	 */
 	_getModelLength( viewNode ) {
@@ -201,9 +202,9 @@ export default class Mapper {
 	 *		<p>fo<b>ba|r</b>bom</p> -> expected offset: 2, actual offset: 2 -> position found
 	 *
 	 * @private
-	 * @param {core.treeView.Element} viewParent Tree view element in which we are looking for the position.
+	 * @param {engine.treeView.Element} viewParent Tree view element in which we are looking for the position.
 	 * @param {Number} expectedOffset Expected offset.
-	 * @returns {core.treeView.Position} Found position.
+	 * @returns {engine.treeView.Position} Found position.
 	 */
 	_findPositionIn( viewParent, expectedOffset ) {
 		// Last scanned view node.

+ 1 - 1
packages/ckeditor5-engine/src/treemodel.jsdoc

@@ -4,5 +4,5 @@
  */
 
 /**
- * @namespace core.treeModel
+ * @namespace engine.treeModel
  */

+ 8 - 8
packages/ckeditor5-engine/src/treemodel/batch.js

@@ -28,19 +28,19 @@ import CKEditorError from '../../utils/ckeditorerror.js';
  *
  *		doc.batch().insert( firstPosition, 'foo' ).insert( secondPosition, 'bar' );
  *
- * @memberOf core.treeModel
+ * @memberOf engine.treeModel
  */
 export default class Batch {
 	/**
-	 * Creates Batch instance. Not recommended to use directly, use {@link core.treeModel.Document#batch} instead.
+	 * Creates Batch instance. Not recommended to use directly, use {@link engine.treeModel.Document#batch} instead.
 	 *
-	 * @param {core.treeModel.Document} doc Document which this Batch changes.
+	 * @param {engine.treeModel.Document} doc Document which this Batch changes.
 	 */
 	constructor( doc ) {
 		/**
 		 * Document which this Batch changes.
 		 *
-		 * @member {core.treeModel.Document} core.treeModel.Batch#doc
+		 * @member {engine.treeModel.Document} engine.treeModel.Batch#doc
 		 * @readonly
 		 */
 		this.doc = doc;
@@ -48,7 +48,7 @@ export default class Batch {
 		/**
 		 * Array of deltas which compose Batch.
 		 *
-		 * @member {Array.<core.treeModel.delta.Delta>} core.treeModel.Batch#deltas
+		 * @member {Array.<engine.treeModel.delta.Delta>} engine.treeModel.Batch#deltas
 		 * @readonly
 		 */
 		this.deltas = [];
@@ -58,8 +58,8 @@ export default class Batch {
 	 * 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.
+	 * @param {engine.treeModel.delta.Delta} delta Delta to add.
+	 * @return {engine.treeModel.delta.Delta} Added delta.
 	 */
 	addDelta( delta ) {
 		delta.batch = this;
@@ -100,7 +100,7 @@ export default class Batch {
  *			return this;
  *		} );
  *
- * @method core.treeModel.Batch.register
+ * @method engine.treeModel.Batch.register
  * @param {String} name Method name.
  * @param {Function} creator Method body.
  */

+ 9 - 9
packages/ckeditor5-engine/src/treemodel/characterproxy.js

@@ -13,25 +13,25 @@ import Node from './node.js';
  * the actual nodes in tree model.
  *
  * Keep in mind that CharacterProxy is static, meaning that it won't change when tree model changes. For example, if you
- * have a {core.treeModel.Element element} `myEl` containing text `foobar` and then assign `let b = myEl.getChild( 3 )`
+ * have a {engine.treeModel.Element element} `myEl` containing text `foobar` and then assign `let b = myEl.getChild( 3 )`
  * and then remove all nodes from `myEl`, `b` will still have character `b`, parent `myEl` and offset `3`.
  *
  * CharacterProxy is created on the fly basing on tree model. It is not an explicit node in a tree model but
  * rather represents it. Because of this, it is not advised to store or compare instances of CharacterProxy class.
- * If you want to keep live reference to a point in a text, you should use {@link core.treeModel.LivePosition}.
+ * If you want to keep live reference to a point in a text, you should use {@link engine.treeModel.LivePosition}.
  *
  * You should never create an instance of this class by your own. When passing parameters to constructors,
- * use string literals or {@link core.treeModel.Text} instead.
+ * use string literals or {@link engine.treeModel.Text} instead.
  *
- * @memberOf core.treeModel
- * @extends core.treeModel.Node
+ * @memberOf engine.treeModel
+ * @extends engine.treeModel.Node
  */
 export default class CharacterProxy extends Node {
 	/**
 	 * Creates character node proxy.
 	 *
 	 * @protected
-	 * @param {core.treeModel.NodeListText} nodeListText Reference to a text object in a node list containing this character.
+	 * @param {engine.treeModel.NodeListText} nodeListText Reference to a text object in a node list containing this character.
 	 * @param {Number} index Index of the character in `nodeListText`.
 	 */
 	constructor( nodeListText, index ) {
@@ -41,7 +41,7 @@ export default class CharacterProxy extends Node {
 		 * Character represented by this proxy.
 		 *
 		 * @readonly
-		 * @member {String} core.treeModel.CharacterProxy#character
+		 * @member {String} engine.treeModel.CharacterProxy#character
 		 */
 		this.character = nodeListText.text.substr( index, 1 );
 
@@ -55,7 +55,7 @@ export default class CharacterProxy extends Node {
 		 *
 		 * @protected
 		 * @readonly
-		 * @member {core.treeModel.NodeListText} core.treeModel.CharacterProxy#_nodeListText
+		 * @member {engine.treeModel.NodeListText} engine.treeModel.CharacterProxy#_nodeListText
 		 */
 		this._nodeListText = nodeListText;
 
@@ -64,7 +64,7 @@ export default class CharacterProxy extends Node {
 		 *
 		 * @protected
 		 * @readonly
-		 * @member {Number} core.treeModel.CharacterProxy#_index
+		 * @member {Number} engine.treeModel.CharacterProxy#_index
 		 */
 		this._index = index;
 	}

+ 1 - 1
packages/ckeditor5-engine/src/treemodel/delta.jsdoc

@@ -4,5 +4,5 @@
  */
 
 /**
- * @namespace core.treeModel.delta
+ * @namespace engine.treeModel.delta
  */

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

@@ -15,12 +15,12 @@ import RootElement from '../rootelement.js';
 import Element from '../element.js';
 
 /**
- * To provide specific OT behavior and better collisions solving, change methods ({@link core.treeModel.Batch#setAttr}
- * and {@link core.treeModel.Batch#removeAttr}) use `AttributeDelta` class which inherits from the `Delta` class and may
+ * To provide specific OT behavior and better collisions solving, change methods ({@link engine.treeModel.Batch#setAttr}
+ * and {@link engine.treeModel.Batch#removeAttr}) use `AttributeDelta` class which inherits from the `Delta` class and may
  * overwrite some methods.
  *
- * @memberOf core.treeModel.delta
- * @extends core.treeModel.delta.Delta
+ * @memberOf engine.treeModel.delta
+ * @extends engine.treeModel.delta.Delta
  */
 export default class AttributeDelta extends Delta {
 	/**
@@ -44,7 +44,7 @@ export default class AttributeDelta extends Delta {
 	/**
 	 * The range on which delta operates or `null` if the delta has no operations.
 	 *
-	 * @type {core.treeModel.Range|null}
+	 * @type {engine.treeModel.Range|null}
 	 */
 	get range() {
 		// Check if it is cached.
@@ -66,7 +66,7 @@ export default class AttributeDelta extends Delta {
 	}
 
 	/**
-	 * @see core.treeModel.delta.Delta#_reverseDeltaClass
+	 * @see engine.treeModel.delta.Delta#_reverseDeltaClass
 	 * @private
 	 * @type {Object}
 	 */
@@ -80,12 +80,12 @@ export default class AttributeDelta extends Delta {
 }
 
 /**
- * To provide specific OT behavior and better collisions solving, change methods ({@link core.treeModel.Batch#setAttr}
- * and {@link core.treeModel.Batch#removeAttr}) use `RootAttributeDelta` class which inherits from the `Delta` class and may
+ * To provide specific OT behavior and better collisions solving, change methods ({@link engine.treeModel.Batch#setAttr}
+ * and {@link engine.treeModel.Batch#removeAttr}) use `RootAttributeDelta` class which inherits from the `Delta` class and may
  * overwrite some methods.
  *
- * @memberOf core.treeModel.delta
- * @extends core.treeModel.delta.Delta
+ * @memberOf engine.treeModel.delta
+ * @extends engine.treeModel.delta.Delta
  */
 export class RootAttributeDelta extends Delta {}
 
@@ -93,10 +93,10 @@ export class RootAttributeDelta extends Delta {}
  * Sets the value of the attribute of the node or on the range.
  *
  * @chainable
- * @method core.treeModel.Batch#setAttr
+ * @method engine.treeModel.Batch#setAttr
  * @param {String} key Attribute key.
  * @param {*} value Attribute new value.
- * @param {core.treeModel.Node|core.treeModel.Range} nodeOrRange Node or range on which the attribute will be set.
+ * @param {engine.treeModel.Node|engine.treeModel.Range} nodeOrRange Node or range on which the attribute will be set.
  */
 register( 'setAttr', function( key, value, nodeOrRange ) {
 	attribute( this, key, value, nodeOrRange );
@@ -108,9 +108,9 @@ register( 'setAttr', function( key, value, nodeOrRange ) {
  * Removes an attribute from the range.
  *
  * @chainable
- * @method core.treeModel.Batch#removeAttr
+ * @method engine.treeModel.Batch#removeAttr
  * @param {String} key Attribute key.
- * @param {core.treeModel.Node|core.treeModel.Range} nodeOrRange Node or range on which the attribute will be removed.
+ * @param {engine.treeModel.Node|engine.treeModel.Range} nodeOrRange Node or range on which the attribute will be removed.
  */
 register( 'removeAttr', function( key, nodeOrRange ) {
 	attribute( this, key, null, nodeOrRange );

+ 12 - 12
packages/ckeditor5-engine/src/treemodel/delta/delta.js

@@ -11,9 +11,9 @@
  * Delta is a single, from the user action point of view, change in the editable document, like insert, split or
  * rename element. Delta is composed of operations, which are unit changes needed to be done to execute user action.
  *
- * Multiple deltas are grouped into a single {@link core.treeModel.Batch}.
+ * Multiple deltas are grouped into a single {@link engine.treeModel.Batch}.
  *
- * @memberOf core.treeModel.delta
+ * @memberOf engine.treeModel.delta
  */
 export default class Delta {
 	/**
@@ -21,11 +21,11 @@ export default class Delta {
 	 */
 	constructor() {
 		/**
-		 * {@link core.treeModel.Batch} which delta is a part of. This property is null by default and set by the
-		 * {@link core.treeModel.Batch#addDelta} method.
+		 * {@link engine.treeModel.Batch} which delta is a part of. This property is null by default and set by the
+		 * {@link engine.treeModel.Batch#addDelta} method.
 		 *
 		 * @readonly
-		 * @member {core.treeModel.Batch} core.treeModel.delta.Delta#batch
+		 * @member {engine.treeModel.Batch} engine.treeModel.delta.Delta#batch
 		 */
 		this.batch = null;
 
@@ -33,7 +33,7 @@ export default class Delta {
 		 * Array of operations which compose delta.
 		 *
 		 * @readonly
-		 * @member {core.treeModel.operation.Operation[]} core.treeModel.delta.Delta#operations
+		 * @member {engine.treeModel.operation.Operation[]} engine.treeModel.delta.Delta#operations
 		 */
 		this.operations = [];
 	}
@@ -42,7 +42,7 @@ export default class Delta {
 	 * Returns delta base version which is equal to the base version of the first operation in delta. If there
 	 * are no operations in delta, returns `null`.
 	 *
-	 * @see core.treeModel.Document
+	 * @see engine.treeModel.Document
 	 * @type {Number|null}
 	 */
 	get baseVersion() {
@@ -66,7 +66,7 @@ export default class Delta {
 	/**
 	 * Add operation to the delta.
 	 *
-	 * @param {core.treeModel.operation.Operation} operation Operation instance.
+	 * @param {engine.treeModel.operation.Operation} operation Operation instance.
 	 */
 	addOperation( operation ) {
 		operation.delta = this;
@@ -78,7 +78,7 @@ export default class Delta {
 	/**
 	 * Creates and returns a delta that has the same parameters as this delta.
 	 *
-	 * @returns {core.treeModel.delta.Delta} Clone of this delta.
+	 * @returns {engine.treeModel.delta.Delta} Clone of this delta.
 	 */
 	clone() {
 		let delta = new this.constructor();
@@ -96,10 +96,10 @@ export default class Delta {
 	 * by the original delta.
 	 *
 	 * Keep in mind that tree model state may change since executing the original delta, so reverse delta may be "outdated".
-	 * In that case you will need to {@link core.treeModel.delta.transform} it by all deltas that were executed after
+	 * In that case you will need to {@link engine.treeModel.delta.transform} it by all deltas that were executed after
 	 * the original delta.
 	 *
-	 * @returns {core.treeModel.delta.Delta} Reversed delta.
+	 * @returns {engine.treeModel.delta.Delta} Reversed delta.
 	 */
 	getReversed() {
 		let delta = new this._reverseDeltaClass();
@@ -118,7 +118,7 @@ export default class Delta {
 	}
 
 	/**
-	 * Delta priority. Used in {@link core.treeModel.delta.transform delta transformations}. Delta with the higher
+	 * Delta priority. Used in {@link engine.treeModel.delta.transform delta transformations}. Delta with the higher
 	 * priority will be treated as more important when resolving transformation conflicts. If deltas have same
 	 * priority, other factors will be used to determine which delta is more important.
 	 *

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

@@ -12,16 +12,16 @@ import InsertOperation from '../operation/insertoperation.js';
 
 /**
  * @classdesc
- * To provide specific OT behavior and better collisions solving, the {@link core.treeModel.Batch#insert Batch#insert} method
+ * To provide specific OT behavior and better collisions solving, the {@link engine.treeModel.Batch#insert Batch#insert} method
  * uses the `InsertDelta` class which inherits from the `Delta` class and may overwrite some methods.
  *
- * @memberOf core.treeModel.delta
+ * @memberOf engine.treeModel.delta
  */
 export default class InsertDelta extends Delta {
 	/**
 	 * Position where the delta inserts nodes or `null` if there are no operations in the delta.
 	 *
-	 * @type {core.treeModel.Position|null}
+	 * @type {engine.treeModel.Position|null}
 	 */
 	get position() {
 		return this._insertOperation ? this._insertOperation.position : null;
@@ -30,7 +30,7 @@ export default class InsertDelta extends Delta {
 	/**
 	 * Node list containing all the nodes inserted by the delta or `null` if there are no operations in the delta.
 	 *
-	 * @type {core.treeModel.NodeList|null}
+	 * @type {engine.treeModel.NodeList|null}
 	 */
 	get nodeList() {
 		return this._insertOperation ? this._insertOperation.nodeList : null;
@@ -40,14 +40,14 @@ export default class InsertDelta extends Delta {
 	 * Insert operation that is saved in this delta or `null` if there are no operations in the delta.
 	 *
 	 * @protected
-	 * @type {core.treeModel.operation.InsertOperation|null}
+	 * @type {engine.treeModel.operation.InsertOperation|null}
 	 */
 	get _insertOperation() {
 		return this.operations[ 0 ] || null;
 	}
 
 	/**
-	 * @see core.treeModel.delta.Delta#_reverseDeltaClass
+	 * @see engine.treeModel.delta.Delta#_reverseDeltaClass
 	 * @private
 	 * @type {Object}
 	 */
@@ -64,10 +64,10 @@ export default class InsertDelta extends Delta {
  * Inserts a node or nodes at the given position.
  *
  * @chainable
- * @method core.treeModel.Batch#insert
- * @param {core.treeModel.Position} position Position of insertion.
- * @param {core.treeModel.NodeSet} nodes The list of nodes to be inserted.
- * List of nodes can be of any type accepted by the {@link core.treeModel.NodeList} constructor.
+ * @method engine.treeModel.Batch#insert
+ * @param {engine.treeModel.Position} position Position of insertion.
+ * @param {engine.treeModel.NodeSet} nodes The list of nodes to be inserted.
+ * List of nodes can be of any type accepted by the {@link engine.treeModel.NodeList} constructor.
  */
 register( 'insert', function( position, nodes ) {
 	const delta = new InsertDelta();

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

@@ -16,16 +16,16 @@ import CKEditorError from '../../../utils/ckeditorerror.js';
 
 /**
  * @classdesc
- * To provide specific OT behavior and better collisions solving, {@link core.treeModel.Batch#merge} method
+ * To provide specific OT behavior and better collisions solving, {@link engine.treeModel.Batch#merge} method
  * uses the `MergeDelta` class which inherits from the `Delta` class and may overwrite some methods.
  *
- * @memberOf core.treeModel.delta
+ * @memberOf engine.treeModel.delta
  */
 export default class MergeDelta extends Delta {
 	/**
 	 * Position between to merged nodes or `null` if the delta has no operations.
 	 *
-	 * @type {core.treeModel.Position|null}
+	 * @type {engine.treeModel.Position|null}
 	 */
 	get position() {
 		return this._removeOperation ? this._removeOperation.sourcePosition : null;
@@ -33,19 +33,19 @@ export default class MergeDelta extends Delta {
 
 	/**
 	 * Operation in this delta that removes the node after merge position (which will be empty at that point) or
-	 * `null` if the delta has no operations. Note, that after {@link core.treeModel.delta.transform transformation}
-	 * this might be an instance of {@link core.treeModel.operation.MoveOperation} instead of
-	 * {@link core.treeModel.operation.RemoveOperation}.
+	 * `null` if the delta has no operations. Note, that after {@link engine.treeModel.delta.transform transformation}
+	 * this might be an instance of {@link engine.treeModel.operation.MoveOperation} instead of
+	 * {@link engine.treeModel.operation.RemoveOperation}.
 	 *
 	 * @protected
-	 * @type {core.treeModel.operation.MoveOperation|null}
+	 * @type {engine.treeModel.operation.MoveOperation|null}
 	 */
 	get _removeOperation() {
 		return this.operations[ 1 ] || null;
 	}
 
 	/**
-	 * @see core.treeModel.delta.Delta#_reverseDeltaClass
+	 * @see engine.treeModel.delta.Delta#_reverseDeltaClass
 	 * @protected
 	 * @type {Object}
 	 */
@@ -61,8 +61,8 @@ export default class MergeDelta extends Delta {
  * `batch-merge-no-element-after` error will be thrown.
  *
  * @chainable
- * @method core.treeModel.Batch#merge
- * @param {core.treeModel.Position} position Position of merge.
+ * @method engine.treeModel.Batch#merge
+ * @param {engine.treeModel.Position} position Position of merge.
  */
 register( 'merge', function( position ) {
 	const delta = new MergeDelta();

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

@@ -14,10 +14,10 @@ import CKEditorError from '../../../utils/ckeditorerror.js';
 
 /**
  * @classdesc
- * To provide specific OT behavior and better collisions solving, {@link core.treeModel.Batch#move} method
+ * To provide specific OT behavior and better collisions solving, {@link engine.treeModel.Batch#move} method
  * uses the `MoveDelta` class which inherits from the `Delta` class and may overwrite some methods.
  *
- * @memberOf core.treeModel.delta
+ * @memberOf engine.treeModel.delta
  */
 export default class MoveDelta extends Delta {
 	/**
@@ -30,22 +30,22 @@ export default class MoveDelta extends Delta {
 	}
 
 	/**
-	 * {@link core.treeModel.delta.MoveDelta#_moveOperation Move operation}
-	 * {@link core.treeModel.operation.MoveOperation#sourcePosition source position} or `null` if there are
+	 * {@link engine.treeModel.delta.MoveDelta#_moveOperation Move operation}
+	 * {@link engine.treeModel.operation.MoveOperation#sourcePosition source position} or `null` if there are
 	 * no operations in the delta.
 	 *
-	 * @type {core.treeModel.Position|null}
+	 * @type {engine.treeModel.Position|null}
 	 */
 	get sourcePosition() {
 		return this._moveOperation ? this._moveOperation.sourcePosition : null;
 	}
 
 	/**
-	 * {@link core.treeModel.delta.MoveDelta#_moveOperation Move operation}
-	 * {@link core.treeModel.operation.MoveOperation#targetPosition target position} or `null` if there are
+	 * {@link engine.treeModel.delta.MoveDelta#_moveOperation Move operation}
+	 * {@link engine.treeModel.operation.MoveOperation#targetPosition target position} or `null` if there are
 	 * no operations in the delta.
 	 *
-	 * @type {core.treeModel.Position|null}
+	 * @type {engine.treeModel.Position|null}
 	 */
 	get targetPosition() {
 		return this._moveOperation ? this._moveOperation.targetPosition : null;
@@ -55,14 +55,14 @@ export default class MoveDelta extends Delta {
 	 * Move operation that is saved in this delta or `null` if there are no operations in the delta.
 	 *
 	 * @protected
-	 * @type {core.treeModel.operation.MoveOperation|null}
+	 * @type {engine.treeModel.operation.MoveOperation|null}
 	 */
 	get _moveOperation() {
 		return this.operations[ 0 ] || null;
 	}
 
 	/**
-	 * @see core.treeModel.delta.Delta#_reverseDeltaClass
+	 * @see engine.treeModel.delta.Delta#_reverseDeltaClass
 	 * @private
 	 * @type {Object}
 	 */
@@ -85,9 +85,9 @@ function addMoveOperation( batch, delta, sourcePosition, howMany, targetPosition
  * Moves given node or given range of nodes to target position.
  *
  * @chainable
- * @method core.treeModel.Batch#move
- * @param {core.treeModel.Node|core.treeModel.Range} nodeOrRange Node or range of nodes to move.
- * @param {core.treeModel.Position} targetPosition Position where moved nodes will be inserted.
+ * @method engine.treeModel.Batch#move
+ * @param {engine.treeModel.Node|engine.treeModel.Range} nodeOrRange Node or range of nodes to move.
+ * @param {engine.treeModel.Position} targetPosition Position where moved nodes will be inserted.
  */
 register( 'move', function( nodeOrRange, targetPosition ) {
 	const delta = new MoveDelta();

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

@@ -13,10 +13,10 @@ import Range from '../range.js';
 
 /**
  * @classdesc
- * To provide specific OT behavior and better collisions solving, {@link core.treeModel.Batch#remove} method
+ * To provide specific OT behavior and better collisions solving, {@link engine.treeModel.Batch#remove} method
  * uses the `RemoveDelta` class which inherits from the `Delta` class and may overwrite some methods.
  *
- * @memberOf core.treeModel.delta
+ * @memberOf engine.treeModel.delta
  */
 export default class RemoveDelta extends MoveDelta {}
 
@@ -30,8 +30,8 @@ function addRemoveOperation( batch, delta, position, howMany ) {
  * Removes given node or range of nodes.
  *
  * @chainable
- * @method core.treeModel.Batch#remove
- * @param {core.treeModel.Node|core.treeModel.Range} nodeOrRange Node or range of nodes to remove.
+ * @method engine.treeModel.Batch#remove
+ * @param {engine.treeModel.Node|engine.treeModel.Range} nodeOrRange Node or range of nodes to remove.
  */
 register( 'remove', function( nodeOrRange ) {
 	const delta = new RemoveDelta();

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

@@ -16,16 +16,16 @@ import MergeDelta from '../delta/mergedelta.js';
 
 /**
  * @classdesc
- * To provide specific OT behavior and better collisions solving, the {@link core.treeModel.Batch#split} method
+ * To provide specific OT behavior and better collisions solving, the {@link engine.treeModel.Batch#split} method
  * uses `SplitDelta` class which inherits from the `Delta` class and may overwrite some methods.
  *
- * @memberOf core.treeModel.delta
+ * @memberOf engine.treeModel.delta
  */
 export default class SplitDelta extends Delta {
 	/**
 	 * Position of split or `null` if there are no operations in the delta.
 	 *
-	 * @type {core.treeModel.Position|null}
+	 * @type {engine.treeModel.Position|null}
 	 */
 	get position() {
 		return this._moveOperation ? this._moveOperation.sourcePosition : null;
@@ -36,11 +36,11 @@ export default class SplitDelta extends Delta {
 	 * there are no operations in the delta.
 	 *
 	 * Most commonly this will be insert operation, as `SplitDelta` has to create a new node. If `SplitDelta` was created
-	 * through {@link core.treeModel.delta.MergeDelta MergeDelta} {@link core.treeModel.delta.Delta#getReversed reversing},
+	 * through {@link engine.treeModel.delta.MergeDelta MergeDelta} {@link engine.treeModel.delta.Delta#getReversed reversing},
 	 * this will be a reinsert operation, as we will want to "insert-back" the node that was removed by `MergeDelta`.
 	 *
 	 * @protected
-	 * @type {core.treeModel.operation.InsertOpertaion|core.treeModel.operation.ReinsertOperation|null}
+	 * @type {engine.treeModel.operation.InsertOpertaion|engine.treeModel.operation.ReinsertOperation|null}
 	 */
 	get _cloneOperation() {
 		return this.operations[ 0 ] || null;
@@ -51,14 +51,14 @@ export default class SplitDelta extends Delta {
 	 * or `null` if there are no operations in the delta.
 	 *
 	 * @protected
-	 * @type {core.treeModel.operation.MoveOperation|null}
+	 * @type {engine.treeModel.operation.MoveOperation|null}
 	 */
 	get _moveOperation() {
 		return this.operations[ 1 ] || null;
 	}
 
 	/**
-	 * @see core.treeModel.delta.Delta#_reverseDeltaClass
+	 * @see engine.treeModel.delta.Delta#_reverseDeltaClass
 	 * @private
 	 * @type {Object}
 	 */
@@ -78,8 +78,8 @@ export default class SplitDelta extends Delta {
  * you try to split the root element.
  *
  * @chainable
- * @method core.treeModel.Batch#split
- * @param {core.treeModel.Position} position Position of split.
+ * @method engine.treeModel.Batch#split
+ * @param {engine.treeModel.Position} position Position of split.
  */
 register( 'split', function( position ) {
 	const delta = new SplitDelta();

+ 22 - 22
packages/ckeditor5-engine/src/treemodel/delta/transform.js

@@ -11,11 +11,11 @@ import arrayUtils from '../../../utils/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}
+ * Transforms given {@link engine.treeModel.delta.Delta delta} by another {@link engine.treeModel.delta.Delta delta} and
+ * returns the result of that transformation as an array containing one or more {@link engine.treeModel.delta.Delta delta}
  * instances.
  *
- * Delta transformations heavily base on {@link core.treeModel.operation.transform operational transformations}. Since
+ * Delta transformations heavily base on {@link engine.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.
  *
@@ -24,20 +24,20 @@ const specialCases = new Map();
  * 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}
+ * transformed using that function. If not, {@link engine.treeModel.delta.defaultTransform default transformation algorithm}
  * is used.
  *
- * @see core.treeModel.operation.transform
+ * @see engine.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.
+ * @external engine.treeModel.delta.transform
+ * @function engine.treeModel.delta.transform.transform
+ * @param {engine.treeModel.delta.Delta} a Delta that will be transformed.
+ * @param {engine.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
+ * {@link engine.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.
+ * @returns {Array.<engine.treeModel.delta.Delta>} Result of the transformation.
  */
 export default function transform( a, b, isAMoreImportantThanB ) {
 	const transformAlgorithm = getTransformationCase( a, b ) || defaultTransform;
@@ -65,13 +65,13 @@ function updateBaseVersion( baseVersion, deltas ) {
  * This algorithm is similar to popular `dOPT` algorithm used in operational transformation, as we are in fact
  * transforming two sets of operations by each other.
  *
- * @param {core.treeModel.delta.Delta} a Delta that will be transformed.
- * @param {core.treeModel.delta.Delta} b Delta to transform by.
+ * @param {engine.treeModel.delta.Delta} a Delta that will be transformed.
+ * @param {engine.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
+ * {@link engine.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, that is an array with single delta instance.
+ * @returns {Array.<engine.treeModel.delta.Delta>} Result of the transformation, that is an array with single delta instance.
  */
 export function defaultTransform( a, b, isAMoreImportantThanB ) {
 	// First, resolve the flag real value.
@@ -164,8 +164,8 @@ export function defaultTransform( a, b, isAMoreImportantThanB ) {
  * @param {Function} A Delta constructor which instance will get transformed.
  * @param {Function} B Delta constructor which instance will be transformed by.
  * @param {Function} resolver A callback that will handle custom special case transformation for instances of given delta classes.
- * @external core.treeModel.delta.transform
- * @function core.treeModel.delta.transform.addTransformationCase
+ * @external engine.treeModel.delta.transform
+ * @function engine.treeModel.delta.transform.addTransformationCase
  */
 export function addTransformationCase( A, B, resolver ) {
 	let casesA = specialCases.get( A );
@@ -179,12 +179,12 @@ export function addTransformationCase( A, B, resolver ) {
 }
 
 /**
- * Gets a special case callback which was previously {@link core.treeModel.delta.transform.addTransformationCase added}.
+ * Gets a special case callback which was previously {@link engine.treeModel.delta.transform.addTransformationCase added}.
  *
- * @param {core.treeModel.delta.Delta} a Delta to transform.
- * @param {core.treeModel.delta.Delta} b Delta to be transformed by.
- * @external core.treeModel.delta.transform
- * @function core.treeModel.delta.transform.getTransformationCase
+ * @param {engine.treeModel.delta.Delta} a Delta to transform.
+ * @param {engine.treeModel.delta.Delta} b Delta to be transformed by.
+ * @external engine.treeModel.delta.transform
+ * @function engine.treeModel.delta.transform.getTransformationCase
  */
 export function getTransformationCase( a, b ) {
 	let casesA = specialCases.get( a.constructor );

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

@@ -15,16 +15,16 @@ import CKEditorError from '../../../utils/ckeditorerror.js';
 
 /**
  * @classdesc
- * To provide specific OT behavior and better collisions solving, {@link core.treeModel.Batch#merge} method
+ * To provide specific OT behavior and better collisions solving, {@link engine.treeModel.Batch#merge} method
  * uses the `UnwrapDelta` class which inherits from the `Delta` class and may overwrite some methods.
  *
- * @memberOf core.treeModel.delta
+ * @memberOf engine.treeModel.delta
  */
 export default class UnwrapDelta extends Delta {
 	/**
 	 * Position before unwrapped element or `null` if there are no operations in the delta.
 	 *
-	 * @type {core.treeModel.Position|null}
+	 * @type {engine.treeModel.Position|null}
 	 */
 	get position() {
 		return this._moveOperation ? this._moveOperation.targetPosition : null;
@@ -34,14 +34,14 @@ export default class UnwrapDelta extends Delta {
 	 * Operation in the delta that moves unwrapped nodes to their new parent or `null` if there are no operations in the delta.
 	 *
 	 * @protected
-	 * @type {core.treeModel.operation.MoveOperation|null}
+	 * @type {engine.treeModel.operation.MoveOperation|null}
 	 */
 	get _moveOperation() {
 		return this.operations[ 0 ] || null;
 	}
 
 	/**
-	 * @see core.treeModel.delta.Delta#_reverseDeltaClass
+	 * @see engine.treeModel.delta.Delta#_reverseDeltaClass
 	 * @private
 	 * @type {Object}
 	 */
@@ -59,8 +59,8 @@ export default class UnwrapDelta extends Delta {
  * error if you try to unwrap an element that does not have a parent.
  *
  * @chainable
- * @method core.treeModel.Batch#unwrap
- * @param {core.treeModel.Element} position Element to unwrap.
+ * @method engine.treeModel.Batch#unwrap
+ * @param {engine.treeModel.Element} position Element to unwrap.
  */
 register( 'unwrap', function( element ) {
 	if ( element.parent === null ) {

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

@@ -12,28 +12,31 @@ import NodeList from '../nodelist.js';
 
 /**
  * @classdesc
- * To provide specific OT behavior and better collisions solving, the {@link core.treeModel.Batch#insert} method
+ * To provide specific OT behavior and better collisions solving, the {@link engine.treeModel.Batch#insert} method
  * uses the `WeakInsertDelta` class which inherits from the `Delta` class and may overwrite some methods.
  *
- * @memberOf core.treeModel.delta
+ * @memberOf engine.treeModel.delta
  */
 export default class WeakInsertDelta extends InsertDelta {}
 
 /**
- * Inserts a node or nodes at the given position. {@link core.treeModel.Batch#weakInsert weakInsert} is commonly used for actions
+ * Inserts a node or nodes at the given position. {@link engine.treeModel.Batch#weakInsert weakInsert} is commonly used for actions
  * like typing or plain-text paste (without formatting). There are two differences between
- * {@link core.treeModel.Batch#insert insert} and {@link core.treeModel.Batch#weakInsert weakInsert}:
+ * {@link engine.treeModel.Batch#insert insert} and {@link engine.treeModel.Batch#weakInsert weakInsert}:
+ *
  * * When using `weakInsert`, inserted nodes will have same attributes as the current attributes of
- * {@link core.treeModel.Document#selection document selection}.
- * * Normal behavior is that inserting inside range changed by {@link core.treeModel.operation.AttributeOperation AttributeOperation} splits
+ * {@link engine.treeModel.Document#selection document selection}.
+ * * Normal behavior is that inserting inside range changed by
+ * {@link engine.treeModel.operation.AttributeOperation AttributeOperation} splits
  * the operation into two operations, which "omit" the inserted nodes. The correct behavior for `WeakInsertDelta` is that
- * {@link core.treeModel.operation.AttributeOperation AttributeOperation} does not "break" and also applies attributes for inserted nodes.
- * The above has to be reflected during {@link core.treeModel.operation.transform operational transformation}.
+ * {@link engine.treeModel.operation.AttributeOperation AttributeOperation} does not "break" and also
+ * applies attributes for inserted nodes.
+ * The above has to be reflected during {@link engine.treeModel.operation.transform operational transformation}.
  *
  * @chainable
- * @method core.treeModel.Batch#weakInsert
- * @param {core.treeModel.Position} position Position of insertion.
- * @param {core.treeModel.NodeSet} nodes The list of nodes to be inserted.
+ * @method engine.treeModel.Batch#weakInsert
+ * @param {engine.treeModel.Position} position Position of insertion.
+ * @param {engine.treeModel.NodeSet} nodes The list of nodes to be inserted.
  */
 register( 'weakInsert', function( position, nodes ) {
 	const delta = new WeakInsertDelta();

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

@@ -17,16 +17,16 @@ import CKEditorError from '../../../utils/ckeditorerror.js';
 
 /**
  * @classdesc
- * To provide specific OT behavior and better collisions solving, {@link core.treeModel.Batch#merge} method
+ * To provide specific OT behavior and better collisions solving, {@link engine.treeModel.Batch#merge} method
  * uses the `WrapDelta` class which inherits from the `Delta` class and may overwrite some methods.
  *
- * @memberOf core.treeModel.delta
+ * @memberOf engine.treeModel.delta
  */
 export default class WrapDelta extends Delta {
 	/**
 	 * Range to wrap or `null` if there are no operations in the delta.
 	 *
-	 * @type {core.treeModel.Range|null}
+	 * @type {engine.treeModel.Range|null}
 	 */
 	get range() {
 		let moveOp = this._moveOperation;
@@ -49,7 +49,7 @@ export default class WrapDelta extends Delta {
 	 * Operation that inserts wrapping element or `null` if there are no operations in the delta.
 	 *
 	 * @protected
-	 * @type {core.treeModel.operation.InsertOperation|core.treeModel.operation.ReinsertOperation}
+	 * @type {engine.treeModel.operation.InsertOperation|engine.treeModel.operation.ReinsertOperation}
 	 */
 	get _insertOperation() {
 		return this.operations[ 0 ] || null;
@@ -59,14 +59,14 @@ export default class WrapDelta extends Delta {
 	 * Operation that moves wrapped nodes to their new parent or `null` if there are no operations in the delta.
 	 *
 	 * @protected
-	 * @type {core.treeModel.operation.MoveOperation|null}
+	 * @type {engine.treeModel.operation.MoveOperation|null}
 	 */
 	get _moveOperation() {
 		return this.operations[ 1 ] || null;
 	}
 
 	/**
-	 * @see core.treeModel.delta.Delta#_reverseDeltaClass
+	 * @see engine.treeModel.delta.Delta#_reverseDeltaClass
 	 * @private
 	 * @type {Object}
 	 */
@@ -81,12 +81,12 @@ export default class WrapDelta extends Delta {
 
 /**
  * Wraps given range with given element or with a new element of specified name if string has been passed.
- * **Note:** given range should be a "flat range" (see {@link core.treeModel.Range#isFlat}). If not, error will be thrown.
+ * **Note:** given range should be a "flat range" (see {@link engine.treeModel.Range#isFlat}). If not, error will be thrown.
  *
  * @chainable
- * @method core.treeModel.Batch#wrap
- * @param {core.treeModel.Range} range Range to wrap.
- * @param {core.treeModel.Element|String} elementOrString Element or name of element to wrap the range with.
+ * @method engine.treeModel.Batch#wrap
+ * @param {engine.treeModel.Range} range Range to wrap.
+ * @param {engine.treeModel.Element|String} elementOrString Element or name of element to wrap the range with.
  */
 register( 'wrap', function( range, elementOrString ) {
 	if ( !range.isFlat ) {

+ 43 - 43
packages/ckeditor5-engine/src/treemodel/document.js

@@ -23,30 +23,30 @@ const graveyardSymbol = Symbol( 'graveyard' );
 
 /**
  * Document tree model describes all editable data in the editor. It may contain multiple
- * {@link core.treeModel.Document#roots root elements}, for example if the editor have multiple editable areas, each area will be
+ * {@link engine.treeModel.Document#roots root elements}, for example if the editor have multiple editable areas, each area will be
  * represented by the separate root.
  *
- * All changes in the document are done by {@link core.treeModel.operation.Operation operations}. To create operations in
- * the simple way use use the {@link core.treeModel.Batch} API, for example:
+ * All changes in the document are done by {@link engine.treeModel.operation.Operation operations}. To create operations in
+ * the simple way use use the {@link engine.treeModel.Batch} API, for example:
  *
  *		doc.batch().insert( position, nodes ).split( otherPosition );
  *
- * @see core.treeModel.Document#batch
+ * @see engine.treeModel.Document#batch
  *
- * @memberOf core.treeModel
+ * @memberOf engine.treeModel
  */
 export default class Document {
 	/**
-	 * Creates an empty document instance with no {@link core.treeModel.Document#roots} (other than graveyard).
+	 * Creates an empty document instance with no {@link engine.treeModel.Document#roots} (other than graveyard).
 	 */
 	constructor() {
 		/**
 		 * Document version. It starts from `0` and every operation increases the version number. It is used to ensure that
-		 * operations are applied on the proper document version. If the {@link core.treeModel.operation.Operation#baseVersion} will
+		 * operations are applied on the proper document version. If the {@link engine.treeModel.operation.Operation#baseVersion} will
 		 * not match document version the {@link document-applyOperation-wrong-version} error is thrown.
 		 *
 		 * @readonly
-		 * @member {Number} core.treeModel.Document#version
+		 * @member {Number} engine.treeModel.Document#version
 		 */
 		this.version = 0;
 
@@ -54,32 +54,32 @@ export default class Document {
 		 * Selection done on this document.
 		 *
 		 * @readonly
-		 * @member {core.treeModel.Selection} core.treeModel.Document#selection
+		 * @member {engine.treeModel.Selection} engine.treeModel.Document#selection
 		 */
 		this.selection = new Selection( this );
 
 		/**
 		 * Schema for this document.
 		 *
-		 * @member {core.treeModel.Schema} core.treeModel.Document#schema
+		 * @member {engine.treeModel.Schema} engine.treeModel.Document#schema
 		 */
 		this.schema = new Schema();
 
 		/**
-		 * Array of pending changes. See: {@link core.treeModel.Document#enqueueChanges}.
+		 * Array of pending changes. See: {@link engine.treeModel.Document#enqueueChanges}.
 		 *
 		 * @private
-		 * @member {Array.<Function>} core.treeModel.Document#_pendingChanges
+		 * @member {Array.<Function>} engine.treeModel.Document#_pendingChanges
 		 */
 		this._pendingChanges = [];
 
 		/**
-		 * List of roots that are owned and managed by this document. Use {@link core.treeModel.document#createRoot} and
-		 * {@link core.treeModel.document#getRoot} to manipulate it.
+		 * List of roots that are owned and managed by this document. Use {@link engine.treeModel.document#createRoot} and
+		 * {@link engine.treeModel.document#getRoot} to manipulate it.
 		 *
 		 * @readonly
 		 * @protected
-		 * @member {Map} core.treeModel.Document#roots
+		 * @member {Map} engine.treeModel.Document#roots
 		 */
 		this._roots = new Map();
 
@@ -99,7 +99,7 @@ export default class Document {
 		 * Document's history.
 		 *
 		 * @readonly
-		 * @member {core.treeModel.History} core.treeModel.Document#history
+		 * @member {engine.treeModel.History} engine.treeModel.Document#history
 		 */
 		this.history = new History();
 	}
@@ -108,14 +108,14 @@ export default class Document {
 	 * Graveyard tree root. Document always have a graveyard root, which stores removed nodes.
 	 *
 	 * @readonly
-	 * @type {core.treeModel.RootElement}
+	 * @type {engine.treeModel.RootElement}
 	 */
 	get graveyard() {
 		return this.getRoot( graveyardSymbol );
 	}
 
 	/**
-	 * Gets names of all roots (without the {@link core.treeModel.Document#graveyard}).
+	 * Gets names of all roots (without the {@link engine.treeModel.Document#graveyard}).
 	 *
 	 * @readonly
 	 * @type {Iterable.<String>}
@@ -126,11 +126,11 @@ export default class Document {
 
 	/**
 	 * This is the entry point for all document changes. All changes on the document are done using
-	 * {@link core.treeModel.operation.Operation operations}. To create operations in the simple way use the
-	 * {@link core.treeModel.Batch} API available via {@link core.treeModel.Document#batch} method.
+	 * {@link engine.treeModel.operation.Operation operations}. To create operations in the simple way use the
+	 * {@link engine.treeModel.Batch} API available via {@link engine.treeModel.Document#batch} method.
 	 *
-	 * @fires @link core.treeModel.Document#change
-	 * @param {core.treeModel.operation.Operation} operation Operation to be applied.
+	 * @fires @link engine.treeModel.Document#change
+	 * @param {engine.treeModel.operation.Operation} operation Operation to be applied.
 	 */
 	applyOperation( operation ) {
 		if ( operation.baseVersion !== this.version ) {
@@ -138,7 +138,7 @@ export default class Document {
 			 * Only operations with matching versions can be applied.
 			 *
 			 * @error document-applyOperation-wrong-version
-			 * @param {core.treeModel.operation.Operation} operation
+			 * @param {engine.treeModel.operation.Operation} operation
 			 */
 			throw new CKEditorError(
 				'document-applyOperation-wrong-version: Only operations with matching versions can be applied.',
@@ -156,9 +156,9 @@ export default class Document {
 	}
 
 	/**
-	 * Creates a {@link core.treeModel.Batch} instance which allows to change the document.
+	 * Creates a {@link engine.treeModel.Batch} instance which allows to change the document.
 	 *
-	 * @returns {core.treeModel.Batch} Batch instance.
+	 * @returns {engine.treeModel.Batch} Batch instance.
 	 */
 	batch() {
 		return new Batch( this );
@@ -169,7 +169,7 @@ export default class Document {
 	 *
 	 * @param {String|Symbol} rootName Unique root name.
 	 * @param {String} elementName Element name.
-	 * @returns {core.treeModel.RootElement} Created root.
+	 * @returns {engine.treeModel.RootElement} Created root.
 	 */
 	createRoot( rootName, elementName ) {
 		if ( this._roots.has( rootName ) ) {
@@ -177,7 +177,7 @@ export default class Document {
 			 * Root with specified name already exists.
 			 *
 			 * @error document-createRoot-name-exists
-			 * @param {core.treeModel.Document} doc
+			 * @param {engine.treeModel.Document} doc
 			 * @param {String} name
 			 */
 			throw new CKEditorError(
@@ -201,14 +201,14 @@ export default class Document {
 	}
 
 	/**
-	 * Enqueues document changes. Any changes to be done on document (mostly using {@link core.treeModel.Document#batch}
+	 * Enqueues document changes. Any changes to be done on document (mostly using {@link engine.treeModel.Document#batch}
 	 * should be placed in the queued callback. If no other plugin is changing document at the moment, the callback will be
 	 * called immediately. Otherwise it will wait for all previously queued changes to finish happening. This way
 	 * queued callback will not interrupt other callbacks.
 	 *
-	 * When all queued changes are done {@link core.treeModel.Document#changesDone} event is fired.
+	 * When all queued changes are done {@link engine.treeModel.Document#changesDone} event is fired.
 	 *
-	 * @fires @link core.treeModel.Document#changesDone
+	 * @fires @link engine.treeModel.Document#changesDone
 	 * @param {Function} callback Callback to enqueue.
 	 */
 	enqueueChanges( callback ) {
@@ -228,7 +228,7 @@ export default class Document {
 	 * Returns top-level root by its name.
 	 *
 	 * @param {String|Symbol} name Unique root name.
-	 * @returns {core.treeModel.RootElement} Root registered under given name.
+	 * @returns {engine.treeModel.RootElement} Root registered under given name.
 	 */
 	getRoot( name ) {
 		if ( !this._roots.has( name ) ) {
@@ -256,18 +256,18 @@ export default class Document {
 		const json = clone( this );
 
 		// Due to circular references we need to remove parent reference.
-		json.selection = '[core.treeModel.Selection]';
+		json.selection = '[engine.treeModel.Selection]';
 
 		return {};
 	}
 
 	/**
 	 * Returns default root for this document which is either the first root that was added to the the document using
-	 * {@link core.treeModel.Document#createRoot} or the {@link core.treeModel.Document#graveyard graveyard root} if
+	 * {@link engine.treeModel.Document#createRoot} or the {@link engine.treeModel.Document#graveyard graveyard root} if
 	 * no other roots were created.
 	 *
 	 * @protected
-	 * @returns {core.treeModel.RootElement} The default root for this document.
+	 * @returns {engine.treeModel.RootElement} The default root for this document.
 	 */
 	_getDefaultRoot() {
 		for ( let root of this._roots.values() ) {
@@ -294,27 +294,27 @@ export default class Document {
 	 * Change event is fired after the change is done. This means that any ranges or positions passed in
 	 * `changeInfo` are referencing nodes and paths in updated tree model.
 	 *
-	 * @event core.treeModel.Document#change
+	 * @event engine.treeModel.Document#change
 	 * @param {String} type Change type, possible option: `'insert'`, `'remove'`, `'reinsert'`, `'move'`, `'attribute'`.
 	 * @param {Object} changeInfo Additional information about the change.
-	 * @param {core.treeModel.Range} [changeInfo.range] Range containing changed nodes. Note that for `'remove'` the range will be in the
-	 * {@link core.treeModel.Document#graveyard graveyard root}. This is undefined for `'rootattribute'` type.
-	 * @param {core.treeModel.RootElement} [changeInfo.root] Root element which attributes got changed. This is defined
+	 * @param {engine.treeModel.Range} [changeInfo.range] Range containing changed nodes. Note that for `'remove'` the range will be in the
+	 * {@link engine.treeModel.Document#graveyard graveyard root}. This is undefined for `'rootattribute'` type.
+	 * @param {engine.treeModel.RootElement} [changeInfo.root] Root element which attributes got changed. This is defined
 	 * only for `'rootattribute'` type.
-	 * @param {core.treeModel.Position} [changeInfo.sourcePosition] Change source position. Exists for `'remove'`, `'reinsert'` and `'move'`.
-	 * Note that for 'reinsert' the source position will be in the {@link core.treeModel.Document#graveyard graveyard root}.
+	 * @param {engine.treeModel.Position} [changeInfo.sourcePosition] Change source position. Exists for `'remove'`, `'reinsert'` and `'move'`.
+	 * Note that for 'reinsert' the source position will be in the {@link engine.treeModel.Document#graveyard graveyard root}.
 	 * @param {String} [changeInfo.key] Only for `'attribute'` type. Key of changed / inserted / removed attribute.
 	 * @param {*} [changeInfo.oldValue] Only for `'attribute'` type. If the type is `'attribute'` and `oldValue`
 	 * is `undefined` it means that new attribute was inserted. Otherwise it contains changed or removed attribute value.
 	 * @param {*} [changeInfo.newValue] Only for `'attribute'` type. If the type is `'attribute'` and `newValue`
 	 * is `undefined` it means that attribute was removed. Otherwise it contains changed or inserted attribute value.
-	 * @param {core.treeModel.Batch} batch A batch of changes which this change is a part of.
+	 * @param {engine.treeModel.Batch} batch A batch of changes which this change is a part of.
 	 */
 
 	/**
-	 * Fired when all queued document changes are done. See {@link core.treeModel.Document#enqueueChanges}.
+	 * Fired when all queued document changes are done. See {@link engine.treeModel.Document#enqueueChanges}.
 	 *
-	 * @event core.treeModel.Document#changesDone
+	 * @event engine.treeModel.Document#changesDone
 	 */
 }
 

+ 16 - 16
packages/ckeditor5-engine/src/treemodel/element.js

@@ -12,7 +12,7 @@ import utils from '../../utils/utils.js';
 /**
  * Tree data model element.
  *
- * @memberOf core.treeModel
+ * @memberOf engine.treeModel
  */
 export default class Element extends Node {
 	/**
@@ -20,8 +20,8 @@ export default class Element extends Node {
 	 *
 	 * @param {String} name Node name.
 	 * @param {Iterable} attrs Iterable collection of attributes.
-	 * @param {core.treeModel.NodeSet} children List of nodes to be inserted
-	 * into created element. List of nodes can be of any type accepted by the {@link core.treeModel.NodeList} constructor.
+	 * @param {engine.treeModel.NodeSet} children List of nodes to be inserted
+	 * into created element. List of nodes can be of any type accepted by the {@link engine.treeModel.NodeList} constructor.
 	 */
 	constructor( name, attrs, children ) {
 		super( attrs );
@@ -30,7 +30,7 @@ export default class Element extends Node {
 		 * Element name.
 		 *
 		 * @readonly
-		 * @member {String} core.treeModel.Element#name
+		 * @member {String} engine.treeModel.Element#name
 		 */
 		this.name = name;
 
@@ -38,7 +38,7 @@ export default class Element extends Node {
 		 * List of children nodes.
 		 *
 		 * @protected
-		 * @member {core.treeModel.NodeList} core.treeModel.Element#_children
+		 * @member {engine.treeModel.NodeList} engine.treeModel.Element#_children
 		 */
 		this._children = new NodeList();
 
@@ -51,7 +51,7 @@ export default class Element extends Node {
 	 * Gets child at the given index.
 	 *
 	 * @param {Number} index Index of child.
-	 * @returns {core.treeModel.Node} Child node.
+	 * @returns {engine.treeModel.Node} Child node.
 	 */
 	getChild( index ) {
 		return this._children.get( index );
@@ -69,7 +69,7 @@ export default class Element extends Node {
 	/**
 	 * Gets index of the given child node.
 	 *
-	 * @param {core.treeModel.Node} node Child node.
+	 * @param {engine.treeModel.Node} node Child node.
 	 * @returns {Number} Index of the child node.
 	 */
 	getChildIndex( node ) {
@@ -77,13 +77,13 @@ export default class Element extends Node {
 	}
 
 	/**
-	 * {@link core.treeModel.Element#insert Inserts} a child node or a list of child nodes at the end of this node and sets
+	 * {@link engine.treeModel.Element#insert Inserts} a child node or a list of child nodes at the end of this node and sets
 	 * the parent of these nodes to this element.
 	 *
 	 * Note that the list of children can be modified only in elements not yet attached to the document.
-	 * All attached nodes should be modified using the {@link core.treeModel.operation.InsertOperation}.
+	 * All attached nodes should be modified using the {@link engine.treeModel.operation.InsertOperation}.
 	 *
-	 * @param {core.treeModel.NodeSet} nodes The list of nodes to be inserted.
+	 * @param {engine.treeModel.NodeSet} nodes The list of nodes to be inserted.
 	 */
 	appendChildren( nodes ) {
 		this.insertChildren( this.getChildCount(), nodes );
@@ -93,11 +93,11 @@ export default class Element extends Node {
 	 * Inserts a list of child nodes on the given index and sets the parent of these nodes to this element.
 	 *
 	 * Note that the list of children can be modified only in elements not yet attached to the document.
-	 * All attached nodes should be modified using the {@link core.treeModel.operation.InsertOperation}.
+	 * All attached nodes should be modified using the {@link engine.treeModel.operation.InsertOperation}.
 	 *
 	 * @param {Number} index Position where nodes should be inserted.
-	 * @param {core.treeModel.NodeSet} nodes The list of nodes to be inserted.
-	 * The list of nodes can be of any type accepted by the {@link core.treeModel.NodeList} constructor.
+	 * @param {engine.treeModel.NodeSet} nodes The list of nodes to be inserted.
+	 * The list of nodes can be of any type accepted by the {@link engine.treeModel.NodeList} constructor.
 	 */
 	insertChildren( index, nodes ) {
 		let nodeList = new NodeList( nodes );
@@ -113,11 +113,11 @@ export default class Element extends Node {
 	 * Removes number of child nodes starting at the given index and set the parent of these nodes to `null`.
 	 *
 	 * Note that the list of children can be modified only in elements not yet attached to the document.
-	 * All attached nodes should be modified using the {@link core.treeModel.operation.RemoveOperation}.
+	 * All attached nodes should be modified using the {@link engine.treeModel.operation.RemoveOperation}.
 	 *
 	 * @param {Number} index Position of the first node to remove.
 	 * @param {Number} [howMany=1] Number of nodes to remove.
-	 * @returns {core.treeModel.NodeList} The list of removed nodes.
+	 * @returns {engine.treeModel.NodeList} The list of removed nodes.
 	 */
 	removeChildren( index, howMany = 1 ) {
 		let nodeList = this._children.remove( index, howMany );
@@ -142,7 +142,7 @@ export default class Element extends Node {
 	/**
 	 * Removes all attributes from the element and sets given attributes.
 	 *
-	 * @param {Iterable|Object} attrs Iterable object containing attributes to be set. See {@link core.treeModel.Node#getAttributes}.
+	 * @param {Iterable|Object} attrs Iterable object containing attributes to be set. See {@link engine.treeModel.Node#getAttributes}.
 	 */
 	setAttributesTo( attrs ) {
 		this._attrs = utils.toMap( attrs );

+ 12 - 12
packages/ckeditor5-engine/src/treemodel/history.js

@@ -14,11 +14,11 @@ import transform from './delta/transform.js';
 import CKEditorError from '../../utils/ckeditorerror.js';
 
 /**
- * History keeps the track of all the deltas applied to the {@link core.treeModel.Document document} and provides
+ * History keeps the track of all the deltas applied to the {@link engine.treeModel.Document document} and provides
  * utility tools to operate on the history. Most of times history is needed to transform a delta that has wrong
- * {@link core.treeModel.delta.Delta#baseVersion} to a state where it can be applied to the document.
+ * {@link engine.treeModel.delta.Delta#baseVersion} to a state where it can be applied to the document.
  *
- * @memberOf core.treeModel
+ * @memberOf engine.treeModel
  */
 export default class History {
 	/**
@@ -29,16 +29,16 @@ export default class History {
 		 * Deltas added to the history.
 		 *
 		 * @private
-		 * @member {Array.<core.treeModel.delta.Delta>} core.treeModel.History#_deltas
+		 * @member {Array.<engine.treeModel.delta.Delta>} engine.treeModel.History#_deltas
 		 */
 		this._deltas = [];
 
 		/**
-		 * Helper structure that maps added delta's base version to the index in {@link core.treeModel.History#_deltas}
+		 * Helper structure that maps added delta's base version to the index in {@link engine.treeModel.History#_deltas}
 		 * at which the delta was added.
 		 *
 		 * @private
-		 * @member {Map} core.treeModel.History#_historyPoints
+		 * @member {Map} engine.treeModel.History#_historyPoints
 		 */
 		this._historyPoints = new Map();
 	}
@@ -58,7 +58,7 @@ export default class History {
 	/**
 	 * Adds an operation to the history.
 	 *
-	 * @param {core.treeModel.operation.Operation} operation Operation to add.
+	 * @param {engine.treeModel.operation.Operation} operation Operation to add.
 	 */
 	addOperation( operation ) {
 		const delta = operation.delta;
@@ -79,10 +79,10 @@ export default class History {
 	/**
 	 * Transforms out-dated delta by all deltas that were added to the history since the given delta's base version. In other
 	 * words, it makes the delta up-to-date with the history. The transformed delta(s) is (are) ready to be applied
-	 * to the {@link core.treeModel.Document document}.
+	 * to the {@link engine.treeModel.Document document}.
 	 *
-	 * @param {core.treeModel.delta.Delta} delta Delta to update.
-	 * @returns {Array.<core.treeModel.delta.Delta>} Result of transformation which is an array containing one or more deltas.
+	 * @param {engine.treeModel.delta.Delta} delta Delta to update.
+	 * @returns {Array.<engine.treeModel.delta.Delta>} Result of transformation which is an array containing one or more deltas.
 	 */
 	getTransformedDelta( delta ) {
 		if ( delta.baseVersion === this._nextHistoryPoint ) {
@@ -117,8 +117,8 @@ export default class History {
 	 * Transforms given delta by another given delta. Exposed for testing purposes.
 	 *
 	 * @protected
-	 * @param {core.treeModel.delta.Delta} toTransform Delta to be transformed.
-	 * @param {core.treeModel.delta.Delta} transformBy Delta to transform by.
+	 * @param {engine.treeModel.delta.Delta} toTransform Delta to be transformed.
+	 * @param {engine.treeModel.delta.Delta} transformBy Delta to transform by.
 	 */
 	static _transform( toTransform, transformBy ) {
 		return transform( toTransform, transformBy, false );

+ 3 - 3
packages/ckeditor5-engine/src/treemodel/item.jsdoc

@@ -4,7 +4,7 @@
  */
 
 /**
- * Item is a {@link core.treeModel.Node Node} or {core.treeModel.TextFragment TextFragment}.
+ * Item is a {@link engine.treeModel.Node Node} or {engine.treeModel.TextFragment TextFragment}.
  *
- * @typedef {core.treeModel.Node|core.treeModel.TextFragment} core.treeModel.Item
- */
+ * @typedef {engine.treeModel.Node|engine.treeModel.TextFragment} engine.treeModel.Item
+ */

+ 29 - 29
packages/ckeditor5-engine/src/treemodel/liveposition.js

@@ -13,20 +13,20 @@ import utils from '../../utils/utils.js';
 /**
  * LivePosition is a position in the Tree Model that updates itself as the tree changes. It may be used as a bookmark.
  * **Note:** Be very careful when dealing with LivePosition. Each LivePosition instance bind events that might
- * have to be unbound. Use {@link core.treeModel.LivePosition#detach} whenever you don't need LivePosition anymore.
+ * have to be unbound. Use {@link engine.treeModel.LivePosition#detach} whenever you don't need LivePosition anymore.
  *
- * @memberOf core.treeModel
- * @extends core.treeModel.Position
+ * @memberOf engine.treeModel
+ * @extends engine.treeModel.Position
  */
 export default class LivePosition extends Position {
 	/**
 	 * Creates a live position.
 	 *
-	 * @see core.treeModel.Position
-	 * @param {core.treeModel.RootElement} root
+	 * @see engine.treeModel.Position
+	 * @param {engine.treeModel.RootElement} root
 	 * @param {Array.<Number>} path
-	 * @param {core.treeModel.PositionStickiness} [stickiness] Defaults to `'STICKS_TO_NEXT'`. See
-	 *  {@link core.treeModel.LivePosition#stickiness}.
+	 * @param {engine.treeModel.PositionStickiness} [stickiness] Defaults to `'STICKS_TO_NEXT'`. See
+	 *  {@link engine.treeModel.LivePosition#stickiness}.
 	 */
 	constructor( root, path, stickiness ) {
 		super( root, path );
@@ -48,7 +48,7 @@ export default class LivePosition extends Position {
 		 * - | sticks to previous node: `<p>f|[oo]</p><p>b^ar</p>` => `<p>f|</p><p>booar</p>`
 		 * - | sticks to next node: `<p>f|[oo]</p><p>b^ar</p>` => `<p>f</p><p>b|ooar</p>`
 		 *
-		 * @member {core.treeModel.PositionStickiness} core.treeModel.LivePosition#stickiness
+		 * @member {engine.treeModel.PositionStickiness} engine.treeModel.LivePosition#stickiness
 		 */
 		this.stickiness = stickiness || 'STICKS_TO_NEXT';
 
@@ -66,44 +66,44 @@ export default class LivePosition extends Position {
 
 	/**
 	 * @static
-	 * @method core.treeModel.LivePosition.createAfter
-	 * @see core.treeModel.Position.createAfter
-	 * @param {core.treeModel.Node} node
-	 * @returns {core.treeModel.LivePosition}
+	 * @method engine.treeModel.LivePosition.createAfter
+	 * @see engine.treeModel.Position.createAfter
+	 * @param {engine.treeModel.Node} node
+	 * @returns {engine.treeModel.LivePosition}
 	 */
 
 	/**
 	 * @static
-	 * @method core.treeModel.LivePosition.createBefore
-	 * @see core.treeModel.Position.createBefore
-	 * @param {core.treeModel.Node} node
-	 * @returns {core.treeModel.LivePosition}
+	 * @method engine.treeModel.LivePosition.createBefore
+	 * @see engine.treeModel.Position.createBefore
+	 * @param {engine.treeModel.Node} node
+	 * @returns {engine.treeModel.LivePosition}
 	 */
 
 	/**
 	 * @static
-	 * @method core.treeModel.LivePosition.createFromParentAndOffset
-	 * @see core.treeModel.Position.createFromParentAndOffset
-	 * @param {core.treeModel.Element} parent
+	 * @method engine.treeModel.LivePosition.createFromParentAndOffset
+	 * @see engine.treeModel.Position.createFromParentAndOffset
+	 * @param {engine.treeModel.Element} parent
 	 * @param {Number} offset
-	 * @returns {core.treeModel.LivePosition}
+	 * @returns {engine.treeModel.LivePosition}
 	 */
 
 	/**
 	 * @static
-	 * @method core.treeModel.LivePosition.createFromPosition
-	 * @see core.treeModel.Position.createFromPosition
-	 * @param {core.treeModel.Position} position
-	 * @returns {core.treeModel.LivePosition}
+	 * @method engine.treeModel.LivePosition.createFromPosition
+	 * @see engine.treeModel.Position.createFromPosition
+	 * @param {engine.treeModel.Position} position
+	 * @returns {engine.treeModel.LivePosition}
 	 */
 }
 
 /**
- * Binds this LivePosition to the {@link core.treeModel.Document} that owns this position {@link core.treeModel.RootElement root}.
+ * Binds this LivePosition to the {@link engine.treeModel.Document} that owns this position {@link engine.treeModel.RootElement root}.
  *
  * @ignore
  * @private
- * @method core.treeModel.LivePosition.bindWithDocument
+ * @method engine.treeModel.LivePosition.bindWithDocument
  */
 function bindWithDocument() {
 	/*jshint validthis: true */
@@ -125,8 +125,8 @@ function bindWithDocument() {
  * @private
  * @method transform
  * @param {String} type Type of changes applied to the Tree Model.
- * @param {core.treeModel.Range} range Range containing the result of applied change.
- * @param {core.treeModel.Position} [position] Additional position parameter provided by some change events.
+ * @param {engine.treeModel.Range} range Range containing the result of applied change.
+ * @param {engine.treeModel.Position} [position] Additional position parameter provided by some change events.
  */
 function transform( type, range, position ) {
 	/*jshint validthis: true */
@@ -171,6 +171,6 @@ utils.mix( LivePosition, EmitterMixin );
  * Enum representing how position is "sticking" with their neighbour nodes.
  * Possible values: `'STICKS_TO_NEXT'`, `'STICKS_TO_PREVIOUS'`.
  *
- * @typedef {String} core.treeModel.PositionStickiness
+ * @typedef {String} engine.treeModel.PositionStickiness
  */
 

+ 26 - 26
packages/ckeditor5-engine/src/treemodel/liverange.js

@@ -13,18 +13,18 @@ import utils from '../../utils/utils.js';
 /**
  * LiveRange is a Range in the Tree Model that updates itself as the tree changes. It may be used as a bookmark.
  *
- * **Note:** Constructor creates it's own {@link core.treeModel.LivePosition} instances basing on passed values.
+ * **Note:** Constructor creates it's own {@link engine.treeModel.LivePosition} instances basing on passed values.
  *
  * **Note:** Be very careful when dealing with LiveRange. Each LiveRange instance bind events that might
- * have to be unbound. Use {@link core.treeModel.LiveRange#detach detach} whenever you don't need LiveRange anymore.
+ * have to be unbound. Use {@link engine.treeModel.LiveRange#detach detach} whenever you don't need LiveRange anymore.
  *
- * @memberOf core.treeModel
+ * @memberOf engine.treeModel
  */
 export default class LiveRange extends Range {
 	/**
 	 * Creates a live range.
 	 *
-	 * @see core.treeModel.Range
+	 * @see engine.treeModel.Range
 	 */
 	constructor( start, end ) {
 		super( start, end );
@@ -47,48 +47,48 @@ export default class LiveRange extends Range {
 	}
 
 	/**
-	 * @see core.treeModel.Range.createFromElement
+	 * @see engine.treeModel.Range.createFromElement
 	 * @static
-	 * @method core.treeModel.LiveRange.createFromElement
-	 * @param {core.treeModel.Element} element
-	 * @returns {core.treeModel.LiveRange}
+	 * @method engine.treeModel.LiveRange.createFromElement
+	 * @param {engine.treeModel.Element} element
+	 * @returns {engine.treeModel.LiveRange}
 	 */
 
 	/**
-	 * @see core.treeModel.Range.createFromPositionAndShift
+	 * @see engine.treeModel.Range.createFromPositionAndShift
 	 * @static
-	 * @method core.treeModel.LiveRange.createFromPositionAndShift
-	 * @param {core.treeModel.Position} position
+	 * @method engine.treeModel.LiveRange.createFromPositionAndShift
+	 * @param {engine.treeModel.Position} position
 	 * @param {Number} shift
-	 * @returns {core.treeModel.LiveRange}
+	 * @returns {engine.treeModel.LiveRange}
 	 */
 
 	/**
-	 * @see core.treeModel.Range.createFromParentsAndOffsets
+	 * @see engine.treeModel.Range.createFromParentsAndOffsets
 	 * @static
-	 * @method core.treeModel.LiveRange.createFromParentsAndOffsets
-	 * @param {core.treeModel.Element} startElement
+	 * @method engine.treeModel.LiveRange.createFromParentsAndOffsets
+	 * @param {engine.treeModel.Element} startElement
 	 * @param {Number} startOffset
-	 * @param {core.treeModel.Element} endElement
+	 * @param {engine.treeModel.Element} endElement
 	 * @param {Number} endOffset
-	 * @returns {core.treeModel.LiveRange}
+	 * @returns {engine.treeModel.LiveRange}
 	 */
 
 	/**
-	 * @see core.treeModel.Range.createFromRange
+	 * @see engine.treeModel.Range.createFromRange
 	 * @static
-	 * @method core.treeModel.LiveRange.createFromRange
-	 * @param {core.treeModel.Range} range
-	 * @returns {core.treeModel.LiveRange}
+	 * @method engine.treeModel.LiveRange.createFromRange
+	 * @param {engine.treeModel.Range} range
+	 * @returns {engine.treeModel.LiveRange}
 	 */
 }
 
 /**
- * Binds this LiveRange to the {@link core.treeModel.Document} that owns this range.
+ * Binds this LiveRange to the {@link engine.treeModel.Document} that owns this range.
  *
  * @ignore
  * @private
- * @method core.treeModel.LiveRange#bindWithDocument
+ * @method engine.treeModel.LiveRange#bindWithDocument
  */
 function bindWithDocument() {
 	/*jshint validthis: true */
@@ -104,7 +104,7 @@ function bindWithDocument() {
 }
 
 /**
- * LiveRange boundaries are instances of {@link core.treeModel.LivePosition}, so it is updated thanks to them. This method
+ * LiveRange boundaries are instances of {@link engine.treeModel.LivePosition}, so it is updated thanks to them. This method
  * additionally fixes the results of updating live positions taking into account that those live positions
  * are boundaries of a range. An example case for fixing live positions is end boundary is moved before start boundary.
  *
@@ -112,8 +112,8 @@ function bindWithDocument() {
  * @private
  * @method fixBoundaries
  * @param {String} type Type of changes applied to the Tree Model.
- * @param {core.treeModel.Range} range Range containing the result of applied change.
- * @param {core.treeModel.Position} [position] Additional position parameter provided by some change events.
+ * @param {engine.treeModel.Range} range Range containing the result of applied change.
+ * @param {engine.treeModel.Position} [position] Additional position parameter provided by some change events.
  */
 function fixBoundaries( type, range, position ) {
 	/* jshint validthis: true */

+ 9 - 9
packages/ckeditor5-engine/src/treemodel/node.js

@@ -12,7 +12,7 @@ import CKEditorError from '../../utils/ckeditorerror.js';
 /**
  * Tree model node. This is an abstract class for other classes representing different nodes in Tree Model.
  *
- * @memberOf core.treeModel
+ * @memberOf engine.treeModel
  */
 export default class Node {
 	/**
@@ -25,10 +25,10 @@ export default class Node {
 	 */
 	constructor( attrs ) {
 		/**
-		 * Parent element. Null by default. Set by {@link core.treeModel.Element#insertChildren}.
+		 * Parent element. Null by default. Set by {@link engine.treeModel.Element#insertChildren}.
 		 *
 		 * @readonly
-		 * @member {core.treeModel.Element|null} core.treeModel.Node#parent
+		 * @member {engine.treeModel.Element|null} engine.treeModel.Node#parent
 		 */
 		this.parent = null;
 
@@ -36,11 +36,11 @@ export default class Node {
 		 * List of attributes set on this node.
 		 *
 		 * **Note:** It is **important** that attributes of nodes already attached to the document must be changed
-		 * only by an {@link core.treeModel.operation.AttributeOperation}. Do not set attributes of such nodes
-		 * using {@link core.treeModel.Node} methods.
+		 * only by an {@link engine.treeModel.operation.AttributeOperation}. Do not set attributes of such nodes
+		 * using {@link engine.treeModel.Node} methods.
 		 *
 		 * @protected
-		 * @member {Map} core.treeModel.Node#_attrs
+		 * @member {Map} engine.treeModel.Node#_attrs
 		 */
 		this._attrs = utils.toMap( attrs );
 	}
@@ -68,7 +68,7 @@ export default class Node {
 	 * Nodes next sibling or `null` if it is the last child.
 	 *
 	 * @readonly
-	 * @type {core.treeModel.Node|null}
+	 * @type {engine.treeModel.Node|null}
 	 */
 	get nextSibling() {
 		const index = this.getIndex();
@@ -80,7 +80,7 @@ export default class Node {
 	 * Nodes previous sibling or null if it is the last child.
 	 *
 	 * @readonly
-	 * @type {core.treeModel.Node|null}
+	 * @type {engine.treeModel.Node|null}
 	 */
 	get previousSibling() {
 		const index = this.getIndex();
@@ -132,7 +132,7 @@ export default class Node {
 
 	/**
 	 * Gets path to the node. For example if the node is the second child of the first child of the root then the path
-	 * will be `[ 1, 2 ]`. This path can be used as a parameter of {@link core.treeModel.Position}.
+	 * will be `[ 1, 2 ]`. This path can be used as a parameter of {@link engine.treeModel.Position}.
 	 *
 	 * @returns {Number[]} The path.
 	 */

+ 24 - 24
packages/ckeditor5-engine/src/treemodel/nodelist.js

@@ -12,15 +12,15 @@ import clone from '../../utils/lib/lodash/clone.js';
 import CKEditorError from '../../utils/ckeditorerror.js';
 
 /**
- * This is a private helper-class for {@link core.treeModel.NodeList} text compression utility.
+ * This is a private helper-class for {@link engine.treeModel.NodeList} text compression utility.
  *
  * @protected
- * @memberOf core.treeModel
- * @extends core.treeModel.Text
+ * @memberOf engine.treeModel
+ * @extends engine.treeModel.Text
  */
 class NodeListText extends Text {
 	/**
-	 * @see core.treeModel.Text#constructor
+	 * @see engine.treeModel.Text#constructor
 	 * @protected
 	 * @constructor
 	 */
@@ -31,10 +31,10 @@ class NodeListText extends Text {
 	}
 
 	/**
-	 * Gets a character at given index and creates a {@link core.treeModel.CharacterProxy} out of it.
+	 * Gets a character at given index and creates a {@link engine.treeModel.CharacterProxy} out of it.
 	 *
 	 * @param {Number} index Character index.
-	 * @returns {core.treeModel.CharacterProxy}
+	 * @returns {engine.treeModel.CharacterProxy}
 	 */
 	getCharAt( index ) {
 		index = index && index >= 0 ? index : 0;
@@ -58,14 +58,14 @@ class NodeListText extends Text {
 
 /**
  * List of nodes. It is used to represent multiple nodes with a given order, for example children of
- * {@link core.treeModel.Element} object or nodes inserted using {@link core.treeModel.operation.InsertOperation}.
+ * {@link engine.treeModel.Element} object or nodes inserted using {@link engine.treeModel.operation.InsertOperation}.
  *
  * Thanks to the constructor, which accepts various arguments, this class lets you easily create desired list of nodes.
  *
- * Parameters passed to constructor are converted and internally kept as an array of {@link core.treeModel.Node}
- * and {@link core.treeModel.Text} instances.
+ * Parameters passed to constructor are converted and internally kept as an array of {@link engine.treeModel.Node}
+ * and {@link engine.treeModel.Text} instances.
  *
- * @memberOf core.treeModel
+ * @memberOf engine.treeModel
  */
 export default class NodeList {
 	/**
@@ -94,9 +94,9 @@ export default class NodeList {
 	 *		nodeListA === nodeListB // true
 	 *		nodeListB.length // 3
 	 *
-	 * @see core.treeModel.NodeSet
+	 * @see engine.treeModel.NodeSet
 	 *
-	 * @param {core.treeModel.NodeSet} nodes List of nodes.
+	 * @param {engine.treeModel.NodeSet} nodes List of nodes.
 	 * @constructor
 	 */
 	constructor( nodes ) {
@@ -109,7 +109,7 @@ export default class NodeList {
 		 * Internal array to store nodes.
 		 *
 		 * @protected
-		 * @member {Array} core.treeModel.NodeList#_nodes
+		 * @member {Array} engine.treeModel.NodeList#_nodes
 		 */
 		this._nodes = [];
 
@@ -119,7 +119,7 @@ export default class NodeList {
 		 * which occupy multiple slots in `_indexMap`.
 		 *
 		 * @private
-		 * @member {Array} core.treeModel.NodeList#_indexMap
+		 * @member {Array} engine.treeModel.NodeList#_indexMap
 		 */
 		this._indexMap = [];
 
@@ -196,7 +196,7 @@ export default class NodeList {
 	 * Returns node at the given index.
 	 *
 	 * @param {Number} index Node index.
-	 * @returns {core.treeModel.Node} Node at given index.
+	 * @returns {engine.treeModel.Node} Node at given index.
 	 */
 	get( index ) {
 		let realIndex = this._indexMap[ index ];
@@ -212,7 +212,7 @@ export default class NodeList {
 	/**
 	 * Search for the element in the node list.
 	 *
-	 * @param {core.treeModel.Node} node Node to find.
+	 * @param {engine.treeModel.Node} node Node to find.
 	 * @returns {Number} Position of the element in the list or -1 if not found.
 	 */
 	indexOf( node ) {
@@ -231,7 +231,7 @@ export default class NodeList {
 	 * Inserts nodes from the given node list into this node list at the given index.
 	 *
 	 * @param {Number} index Position where nodes should be inserted.
-	 * @param {core.treeModel.NodeList} nodeList List of nodes to insert.
+	 * @param {engine.treeModel.NodeList} nodeList List of nodes to insert.
 	 */
 	insert( index, nodeList ) {
 		if ( this._nodes.length === 0 ) {
@@ -271,7 +271,7 @@ export default class NodeList {
 	 *
 	 * @param {Number} index Position of the first node to remove.
 	 * @param {Number} number Number of nodes to remove.
-	 * @returns {core.treeModel.NodeList} List of removed nodes.
+	 * @returns {engine.treeModel.NodeList} List of removed nodes.
 	 */
 	remove( index, number ) {
 		if ( this._nodes.length === 0 ) {
@@ -441,13 +441,13 @@ export default class NodeList {
 }
 
 /**
- * Value that is convertible to an item kept in {@link core.treeModel.NodeList} or an iterable collection of such items.
- * In other words, this is anything that {@link core.treeModel.NodeList#constructor} is able to take and convert to node:
- * * {@link core.treeModel.Node} will be left as is
- * * {@link core.treeModel.Text} and {String} will be converted to a set of {@link core.treeModel.CharacterProxy}
- * * {@link core.treeModel.NodeList} will clone a node list (but not the nodes inside, so the new and passed list will
+ * Value that is convertible to an item kept in {@link engine.treeModel.NodeList} or an iterable collection of such items.
+ * In other words, this is anything that {@link engine.treeModel.NodeList#constructor} is able to take and convert to node:
+ * * {@link engine.treeModel.Node} will be left as is
+ * * {@link engine.treeModel.Text} and {String} will be converted to a set of {@link engine.treeModel.CharacterProxy}
+ * * {@link engine.treeModel.NodeList} will clone a node list (but not the nodes inside, so the new and passed list will
  * point to the same nodes.
  * * Iterable collection of above items will be iterated over and all items will be added to the node list.
  *
- * @typedef {core.treeModel.Node|core.treeModel.Text|String|core.treeModel.NodeList|Iterable} core.treeModel.NodeSet
+ * @typedef {engine.treeModel.Node|engine.treeModel.Text|String|engine.treeModel.NodeList|Iterable} engine.treeModel.NodeSet
  */

+ 2 - 2
packages/ckeditor5-engine/src/treemodel/operation.jsdoc

@@ -4,6 +4,6 @@
  */
 
 /**
- * Core &rarr; TreeModel &rarr; Operation namespace (`core.treeModel.operation`).
- * @namespace core.treeModel.operation
+ * Core &rarr; TreeModel &rarr; Operation namespace (`engine.treeModel.operation`).
+ * @namespace engine.treeModel.operation
  */

+ 12 - 12
packages/ckeditor5-engine/src/treemodel/operation/attributeoperation.js

@@ -13,8 +13,8 @@ import TextFragment from '../textfragment.js';
 /**
  * Operation to change nodes' attribute. Using this class you can add, remove or change value of the attribute.
  *
- * @memberOf core.treeModel.operation
- * @extends core.treeModel.operation.Operation
+ * @memberOf engine.treeModel.operation
+ * @extends engine.treeModel.operation.Operation
  */
 export default class AttributeOperation extends Operation {
 	/**
@@ -29,11 +29,11 @@ export default class AttributeOperation extends Operation {
 	 * If both new and old attributes are set, then the operation will change the attribute value. Note that both new and
 	 * old attributes have to have the same key and the old attribute must be present in all nodes in ranges.
 	 *
-	 * @param {core.treeModel.Range} range Range on which the operation should be applied.
+	 * @param {engine.treeModel.Range} range Range on which the operation should be applied.
 	 * @param {String} key Key of an attribute to change or remove.
 	 * @param {*} oldValue Old value of the attribute with given key or `null` if adding a new attribute.
 	 * @param {*} newValue New value to set for the attribute. If `null`, then the operation just removes the attribute.
-	 * @param {Number} baseVersion {@link core.treeModel.Document#version} on which the operation can be applied.
+	 * @param {Number} baseVersion {@link engine.treeModel.Document#version} on which the operation can be applied.
 	 */
 	constructor( range, key, oldValue, newValue, baseVersion ) {
 		super( baseVersion );
@@ -42,7 +42,7 @@ export default class AttributeOperation extends Operation {
 		 * Range on which operation should be applied.
 		 *
 		 * @readonly
-		 * @member {core.treeModel.Range} core.treeModel.operation.AttributeOperation#range
+		 * @member {engine.treeModel.Range} engine.treeModel.operation.AttributeOperation#range
 		 */
 		this.range = Range.createFromRange( range );
 
@@ -50,7 +50,7 @@ export default class AttributeOperation extends Operation {
 		 * Key of an attribute to change or remove.
 		 *
 		 * @readonly
-		 * @member {String} core.treeModel.operation.AttributeOperation#key
+		 * @member {String} engine.treeModel.operation.AttributeOperation#key
 		 */
 		this.key = key;
 
@@ -58,7 +58,7 @@ export default class AttributeOperation extends Operation {
 		 * Old value of the attribute with given key or `null` if adding a new attribute.
 		 *
 		 * @readonly
-		 * @member {*} core.treeModel.operation.AttributeOperation#oldValue
+		 * @member {*} engine.treeModel.operation.AttributeOperation#oldValue
 		 */
 		this.oldValue = oldValue;
 
@@ -66,7 +66,7 @@ export default class AttributeOperation extends Operation {
 		 * New value to set for the attribute. If `null`, then the operation just removes the attribute.
 		 *
 		 * @readonly
-		 * @member {*} core.treeModel.operation.AttributeOperation#newValue
+		 * @member {*} engine.treeModel.operation.AttributeOperation#newValue
 		 */
 		this.newValue = newValue;
 	}
@@ -76,14 +76,14 @@ export default class AttributeOperation extends Operation {
 	}
 
 	/**
-	 * @returns {core.treeModel.operation.AttributeOperation}
+	 * @returns {engine.treeModel.operation.AttributeOperation}
 	 */
 	clone() {
 		return new AttributeOperation( this.range, this.key, this.oldValue, this.newValue, this.baseVersion );
 	}
 
 	/**
-	 * @returns {core.treeModel.operation.AttributeOperation}
+	 * @returns {engine.treeModel.operation.AttributeOperation}
 	 */
 	getReversed() {
 		return new AttributeOperation( this.range, this.key, this.newValue, this.oldValue, this.baseVersion + 1 );
@@ -96,7 +96,7 @@ export default class AttributeOperation extends Operation {
 				 * The attribute which should be removed does not exists for the given node.
 				 *
 				 * @error operation-attribute-no-attr-to-remove
-				 * @param {core.treeModel.Item} item
+				 * @param {engine.treeModel.Item} item
 				 * @param {String} key
 				 * @param {*} value
 				 */
@@ -111,7 +111,7 @@ export default class AttributeOperation extends Operation {
 				 * The attribute with given key already exists for the given node.
 				 *
 				 * @error operation-attribute-attr-exists
-				 * @param {core.treeModel.Node} node
+				 * @param {engine.treeModel.Node} node
 				 * @param {String} key
 				 */
 				throw new CKEditorError(

+ 10 - 10
packages/ckeditor5-engine/src/treemodel/operation/insertoperation.js

@@ -14,17 +14,17 @@ import RemoveOperation from './removeoperation.js';
 /**
  * Operation to insert list of nodes on the given position in the tree data model.
  *
- * @memberOf core.treeModel.operation
- * @extends core.treeModel.operation.Operation
+ * @memberOf engine.treeModel.operation
+ * @extends engine.treeModel.operation.Operation
  */
 export default class InsertOperation extends Operation {
 	/**
 	 * Creates an insert operation.
 	 *
-	 * @param {core.treeModel.Position} position Position of insertion.
-	 * @param {core.treeModel.NodeSet} nodes The list of nodes to be inserted.
-	 * List of nodes can be any type accepted by the {@link core.treeModel.NodeList} constructor.
-	 * @param {Number} baseVersion {@link core.treeModel.Document#version} on which operation can be applied.
+	 * @param {engine.treeModel.Position} position Position of insertion.
+	 * @param {engine.treeModel.NodeSet} nodes The list of nodes to be inserted.
+	 * List of nodes can be any type accepted by the {@link engine.treeModel.NodeList} constructor.
+	 * @param {Number} baseVersion {@link engine.treeModel.Document#version} on which operation can be applied.
 	 */
 	constructor( position, nodes, baseVersion ) {
 		super( baseVersion );
@@ -33,7 +33,7 @@ export default class InsertOperation extends Operation {
 		 * Position of insertion.
 		 *
 		 * @readonly
-		 * @member {core.treeModel.Position} core.treeModel.operation.InsertOperation#position
+		 * @member {engine.treeModel.Position} engine.treeModel.operation.InsertOperation#position
 		 */
 		this.position = Position.createFromPosition( position );
 
@@ -41,7 +41,7 @@ export default class InsertOperation extends Operation {
 		 * List of nodes to insert.
 		 *
 		 * @readonly
-		 * @member {core.treeModel.NodeList} core.treeModel.operation.InsertOperation#nodeList
+		 * @member {engine.treeModel.NodeList} engine.treeModel.operation.InsertOperation#nodeList
 		 */
 		this.nodeList = new NodeList( nodes );
 	}
@@ -51,14 +51,14 @@ export default class InsertOperation extends Operation {
 	}
 
 	/**
-	 * @returns {core.treeModel.operation.InsertOperation}
+	 * @returns {engine.treeModel.operation.InsertOperation}
 	 */
 	clone() {
 		return new InsertOperation( this.position, this.nodeList, this.baseVersion );
 	}
 
 	/**
-	 * @returns {core.treeModel.operation.RemoveOperation}
+	 * @returns {engine.treeModel.operation.RemoveOperation}
 	 */
 	getReversed() {
 		return new RemoveOperation( this.position, this.nodeList.length, this.baseVersion + 1 );

+ 11 - 11
packages/ckeditor5-engine/src/treemodel/operation/moveoperation.js

@@ -14,17 +14,17 @@ import utils from '../../../utils/utils.js';
 /**
  * Operation to move list of subsequent nodes from one position in the document to another.
  *
- * @memberOf core.treeModel.operation
- * @extends core.treeModel.operation.Operation
+ * @memberOf engine.treeModel.operation
+ * @extends engine.treeModel.operation.Operation
  */
 export default class MoveOperation extends Operation {
 	/**
 	 * Creates a move operation.
 	 *
-	 * @param {core.treeModel.Position} sourcePosition Position before the first node to move.
+	 * @param {engine.treeModel.Position} sourcePosition Position before the first node to move.
 	 * @param {Number} howMany How many consecutive nodes to move, starting from `sourcePosition`.
-	 * @param {core.treeModel.Position} targetPosition Position where moved nodes will be inserted.
-	 * @param {Number} baseVersion {@link core.treeModel.Document#version} on which operation can be applied.
+	 * @param {engine.treeModel.Position} targetPosition Position where moved nodes will be inserted.
+	 * @param {Number} baseVersion {@link engine.treeModel.Document#version} on which operation can be applied.
 	 */
 	constructor( sourcePosition, howMany, targetPosition, baseVersion ) {
 		super( baseVersion );
@@ -32,27 +32,27 @@ export default class MoveOperation extends Operation {
 		/**
 		 * Source move position.
 		 *
-		 * @member {core.treeModel.Position} core.treeModel.operation.MoveOperation#sourcePosition
+		 * @member {engine.treeModel.Position} engine.treeModel.operation.MoveOperation#sourcePosition
 		 */
 		this.sourcePosition = Position.createFromPosition( sourcePosition );
 
 		/**
 		 * How many nodes to move.
 		 *
-		 * @member {Number} core.treeModel.operation.MoveOperation#howMany
+		 * @member {Number} engine.treeModel.operation.MoveOperation#howMany
 		 */
 		this.howMany = howMany;
 
 		/**
 		 * Target move position.
 		 *
-		 * @member {core.treeModel.Position} core.treeModel.operation.MoveOperation#targetPosition
+		 * @member {engine.treeModel.Position} engine.treeModel.operation.MoveOperation#targetPosition
 		 */
 		this.targetPosition = Position.createFromPosition( targetPosition );
 
 		/**
 		 * Defines whether `MoveOperation` is sticky. If `MoveOperation` is sticky, during
-		 * {@link core.treeModel.operation.transform operational transformation} if there will be an operation that
+		 * {@link engine.treeModel.operation.transform operational transformation} if there will be an operation that
 		 * inserts some nodes at the position equal to the boundary of this `MoveOperation`, that operation will
 		 * get their insertion path updated to the position where this `MoveOperation` moves the range.
 		 *
@@ -66,7 +66,7 @@ export default class MoveOperation extends Operation {
 	}
 
 	/**
-	 * @returns {core.treeModel.operation.MoveOperation}
+	 * @returns {engine.treeModel.operation.MoveOperation}
 	 */
 	clone() {
 		const op = new this.constructor( this.sourcePosition, this.howMany, this.targetPosition, this.baseVersion );
@@ -76,7 +76,7 @@ export default class MoveOperation extends Operation {
 	}
 
 	/**
-	 * @returns {core.treeModel.operation.MoveOperation}
+	 * @returns {engine.treeModel.operation.MoveOperation}
 	 */
 	getReversed() {
 		let newSourcePosition = this.targetPosition.getTransformedByDeletion( this.sourcePosition, this.howMany );

+ 5 - 5
packages/ckeditor5-engine/src/treemodel/operation/nooperation.js

@@ -13,22 +13,22 @@ import Operation from './operation.js';
  * It still has some parameters defined for transformation purposes.
  *
  * In most cases this operation is a result of transforming operations. When transformation returns
- * {@link core.treeModel.operation.NoOperation} it means that changes done by the transformed operation
+ * {@link engine.treeModel.operation.NoOperation} it means that changes done by the transformed operation
  * have already been applied.
  *
- * @memberOf core.treeModel.operation
- * @extends core.treeModel.operation.Operation
+ * @memberOf engine.treeModel.operation
+ * @extends engine.treeModel.operation.Operation
  */
 export default class NoOperation extends Operation {
 	/**
-	 * @returns {core.treeModel.operation.NoOperation}
+	 * @returns {engine.treeModel.operation.NoOperation}
 	 */
 	clone() {
 		return new NoOperation( this.baseVersion );
 	}
 
 	/**
-	 * @returns {core.treeModel.operation.NoOperation}
+	 * @returns {engine.treeModel.operation.NoOperation}
 	 */
 	getReversed() {
 		return new NoOperation( this.baseVersion + 1 );

+ 19 - 19
packages/ckeditor5-engine/src/treemodel/operation/operation.js

@@ -11,43 +11,43 @@ import clone from '../../../utils/lib/lodash/clone.js';
  * Abstract base operation class.
  *
  * @abstract
- * @memberOf core.treeModel.operation
+ * @memberOf engine.treeModel.operation
  */
 export default class Operation {
 	/**
 	 * Base operation constructor.
-	 * @param {Number} baseVersion {@link core.treeModel.Document#version} on which the operation can be applied.
+	 * @param {Number} baseVersion {@link engine.treeModel.Document#version} on which the operation can be applied.
 	 */
 	constructor( baseVersion ) {
 		/**
-		 * {@link core.treeModel.Document#version} on which operation can be applied. If you try to
-		 * {@link core.treeModel.Document#applyOperation apply} operation with different base version than the
-		 * {@link core.treeModel.Document#version document version} the {@link document-applyOperation-wrong-version}
+		 * {@link engine.treeModel.Document#version} on which operation can be applied. If you try to
+		 * {@link engine.treeModel.Document#applyOperation apply} operation with different base version than the
+		 * {@link engine.treeModel.Document#version document version} the {@link document-applyOperation-wrong-version}
 		 * error is thrown.
 		 *
-		 * @member {Number} core.treeModel.operation.Operation#baseVersion
+		 * @member {Number} engine.treeModel.operation.Operation#baseVersion
 		 */
 		this.baseVersion = baseVersion;
 
 		/**
 		 * Operation type.
 		 *
-		 * @member {String} core.treeModel.operation.Operation#type
+		 * @member {String} engine.treeModel.operation.Operation#type
 		 */
 
 		/**
-		 * {@link core.treeModel.Delta Delta} which the operation is a part of. This property is set by the
-		 * {@link core.treeModel.Delta delta} when the operations is added to it by the
-		 * {@link core.treeModel.Delta#addOperation} method.
+		 * {@link engine.treeModel.Delta Delta} which the operation is a part of. This property is set by the
+		 * {@link engine.treeModel.Delta delta} when the operations is added to it by the
+		 * {@link engine.treeModel.Delta#addOperation} method.
 		 *
-		 * @member {core.treeModel.Delta} core.treeModel.operation.Operation#delta
+		 * @member {engine.treeModel.Delta} engine.treeModel.operation.Operation#delta
 		 */
 
 		/**
 		 * Creates and returns an operation that has the same parameters as this operation.
 		 *
-		 * @method core.treeModel.operation.Operation#clone
-		 * @returns {core.treeModel.operation.Operation} Clone of this operation.
+		 * @method engine.treeModel.operation.Operation#clone
+		 * @returns {engine.treeModel.operation.Operation} Clone of this operation.
 		 */
 
 		/**
@@ -57,10 +57,10 @@ export default class Operation {
 		 *
 		 * Keep in mind that tree model state may change since executing the original operation,
 		 * so reverse operation will be "outdated". In that case you will need to
-		 * {@link core.treeModel.operation.transform} it by all operations that were executed after the original operation.
+		 * {@link engine.treeModel.operation.transform} it by all operations that were executed after the original operation.
 		 *
-		 * @method core.treeModel.operation.Operation#getReversed
-		 * @returns {core.treeModel.operation.Operation} Reversed operation.
+		 * @method engine.treeModel.operation.Operation#getReversed
+		 * @returns {engine.treeModel.operation.Operation} Reversed operation.
 		 */
 
 		/**
@@ -68,7 +68,7 @@ export default class Operation {
 		 * will be applied to the tree model.
 		 *
 		 * @protected
-		 * @method core.treeModel.operation.Operation#_execute
+		 * @method engine.treeModel.operation.Operation#_execute
 		 * @returns {Object} Object with additional information about the applied changes. Always has `range`
 		 * property containing changed nodes. May have additional properties depending on the operation type.
 		 */
@@ -77,14 +77,14 @@ export default class Operation {
 	/**
 	 * Custom toJSON method to solve child-parent circular dependencies.
 	 *
-	 * @method core.treeModel.operation.Operation#toJSON
+	 * @method engine.treeModel.operation.Operation#toJSON
 	 * @returns {Object} Clone of this object with the delta property replaced with string.
 	 */
 	toJSON() {
 		const json = clone( this );
 
 		// Due to circular references we need to remove parent reference.
-		json.delta = this.delta ? '[core.treeModel.Delta]' : null;
+		json.delta = this.delta ? '[engine.treeModel.Delta]' : null;
 
 		return json;
 	}

+ 6 - 6
packages/ckeditor5-engine/src/treemodel/operation/reinsertoperation.js

@@ -10,21 +10,21 @@ import RemoveOperation from './removeoperation.js';
 
 /**
  * Operation to reinsert previously removed nodes back to the non-graveyard root.
- * This is basically {@link core.treeModel.operation.MoveOperation} but it returns
- * {@link core.treeModel.operation.RemoveOperation} when reversed.
+ * This is basically {@link engine.treeModel.operation.MoveOperation} but it returns
+ * {@link engine.treeModel.operation.RemoveOperation} when reversed.
  *
  * With this class, we achieve two goals: by having separate classes it's easier to distinguish whether move
  * operation is actually a remove/reinsert operation and fire proper events. Also it
  * will be easier to expand if we need to change operation's behavior if it is remove/reinsert.
  *
- * @memberOf core.treeModel.operation
- * @extends core.treeModel.operation.Operation
+ * @memberOf engine.treeModel.operation
+ * @extends engine.treeModel.operation.Operation
  */
 export default class ReinsertOperation extends MoveOperation {
 	/**
 	 * Position where re-inserted node will be inserted.
 	 *
-	 * @type {core.treeModel.Position}
+	 * @type {engine.treeModel.Position}
 	 */
 	get position() {
 		return this.targetPosition;
@@ -39,7 +39,7 @@ export default class ReinsertOperation extends MoveOperation {
 	}
 
 	/**
-	 * @returns {core.treeModel.operation.RemoveOperation}
+	 * @returns {engine.treeModel.operation.RemoveOperation}
 	 */
 	getReversed() {
 		return new RemoveOperation( this.targetPosition, this.howMany, this.baseVersion + 1 );

+ 6 - 6
packages/ckeditor5-engine/src/treemodel/operation/removeoperation.js

@@ -12,17 +12,17 @@ import ReinsertOperation from './reinsertoperation.js';
 /**
  * Operation to remove a range of nodes.
  *
- * @memberOf core.treeModel.operation
- * @extends core.treeModel.operation.Operation
+ * @memberOf engine.treeModel.operation
+ * @extends engine.treeModel.operation.Operation
  */
 export default class RemoveOperation extends MoveOperation {
 	/**
 	 *
 	 * Creates a remove operation.
 	 *
-	 * @param {core.treeModel.Position} position Position before the first node to remove.
+	 * @param {engine.treeModel.Position} position Position before the first node to remove.
 	 * @param {Number} howMany How many nodes to remove.
-	 * @param {Number} baseVersion {@link core.treeModel.Document#version} on which operation can be applied.
+	 * @param {Number} baseVersion {@link engine.treeModel.Document#version} on which operation can be applied.
 	 */
 	constructor( position, howMany, baseVersion ) {
 		// Position in a graveyard where nodes were moved.
@@ -36,14 +36,14 @@ export default class RemoveOperation extends MoveOperation {
 	}
 
 	/**
-	 * @returns {core.treeModel.operation.ReinsertOperation}
+	 * @returns {engine.treeModel.operation.ReinsertOperation}
 	 */
 	getReversed() {
 		return new ReinsertOperation( this.targetPosition, this.howMany, this.sourcePosition, this.baseVersion + 1 );
 	}
 
 	/**
-	 * @returns {core.treeModel.operation.RemoveOperation}
+	 * @returns {engine.treeModel.operation.RemoveOperation}
 	 */
 	clone() {
 		return new RemoveOperation( this.sourcePosition, this.howMany, this.baseVersion );

+ 16 - 16
packages/ckeditor5-engine/src/treemodel/operation/rootattributeoperation.js

@@ -11,24 +11,24 @@ import CKEditorError from '../../../utils/ckeditorerror.js';
 /**
  * Operation to change root element's attribute. Using this class you can add, remove or change value of the attribute.
  *
- * This operation is needed, because root elements can't be changed through {@link core.treeModel.operation.AttributeOperation}.
- * It is because {@link core.treeModel.operation.AttributeOperation} requires a range to change and root element can't
- * be a part of range because every {@link core.treeModel.Position} has to be inside a root. {@link core.treeModel.Position}
+ * This operation is needed, because root elements can't be changed through {@link engine.treeModel.operation.AttributeOperation}.
+ * It is because {@link engine.treeModel.operation.AttributeOperation} requires a range to change and root element can't
+ * be a part of range because every {@link engine.treeModel.Position} has to be inside a root. {@link engine.treeModel.Position}
  * can't be created before a root element.
  *
- * @memberOf core.treeModel.operation
- * @extends core.treeModel.operation.Operation
+ * @memberOf engine.treeModel.operation
+ * @extends engine.treeModel.operation.Operation
  */
 export default class RootAttributeOperation extends Operation {
 	/**
 	 * Creates an operation that changes, removes or adds attributes on root element.
 	 *
-	 * @see core.treeModel.operation.AttributeOperation
-	 * @param {core.treeModel.RootElement} root Root element to change.
+	 * @see engine.treeModel.operation.AttributeOperation
+	 * @param {engine.treeModel.RootElement} root Root element to change.
 	 * @param {String} key Key of an attribute to change or remove.
 	 * @param {*} oldValue Old value of the attribute with given key or `null` if adding a new attribute.
 	 * @param {*} newValue New value to set for the attribute. If `null`, then the operation just removes the attribute.
-	 * @param {Number} baseVersion {@link core.treeModel.Document#version} on which the operation can be applied.
+	 * @param {Number} baseVersion {@link engine.treeModel.Document#version} on which the operation can be applied.
 	 */
 	constructor( root, key, oldValue, newValue, baseVersion ) {
 		super( baseVersion );
@@ -37,7 +37,7 @@ export default class RootAttributeOperation extends Operation {
 		 * Root element to change.
 		 *
 		 * @readonly
-		 * @member {core.treeModel.RootElement} core.treeModel.operation.RootAttributeOperation#root
+		 * @member {engine.treeModel.RootElement} engine.treeModel.operation.RootAttributeOperation#root
 		 */
 		this.root = root;
 
@@ -45,7 +45,7 @@ export default class RootAttributeOperation extends Operation {
 		 * Key of an attribute to change or remove.
 		 *
 		 * @readonly
-		 * @member {String} core.treeModel.operation.RootAttributeOperation#key
+		 * @member {String} engine.treeModel.operation.RootAttributeOperation#key
 		 */
 		this.key = key;
 
@@ -53,7 +53,7 @@ export default class RootAttributeOperation extends Operation {
 		 * Old value of the attribute with given key or `null` if adding a new attribute.
 		 *
 		 * @readonly
-		 * @member {*} core.treeModel.operation.RootAttributeOperation#oldValue
+		 * @member {*} engine.treeModel.operation.RootAttributeOperation#oldValue
 		 */
 		this.oldValue = oldValue;
 
@@ -61,7 +61,7 @@ export default class RootAttributeOperation extends Operation {
 		 * New value to set for the attribute. If `null`, then the operation just removes the attribute.
 		 *
 		 * @readonly
-		 * @member {*} core.treeModel.operation.RootAttributeOperation#newValue
+		 * @member {*} engine.treeModel.operation.RootAttributeOperation#newValue
 		 */
 		this.newValue = newValue;
 	}
@@ -71,14 +71,14 @@ export default class RootAttributeOperation extends Operation {
 	}
 
 	/**
-	 * @returns {core.treeModel.operation.RootAttributeOperation}
+	 * @returns {engine.treeModel.operation.RootAttributeOperation}
 	 */
 	clone() {
 		return new RootAttributeOperation( this.root, this.key, this.oldValue, this.newValue, this.baseVersion );
 	}
 
 	/**
-	 * @returns {core.treeModel.operation.RootAttributeOperation}
+	 * @returns {engine.treeModel.operation.RootAttributeOperation}
 	 */
 	getReversed() {
 		return new RootAttributeOperation( this.root, this.key, this.newValue, this.oldValue, this.baseVersion + 1 );
@@ -90,7 +90,7 @@ export default class RootAttributeOperation extends Operation {
 			 * The attribute which should be removed does not exists for the given node.
 			 *
 			 * @error operation-rootattribute-no-attr-to-remove
-			 * @param {core.treeModel.RootElement} root
+			 * @param {engine.treeModel.RootElement} root
 			 * @param {String} key
 			 * @param {*} value
 			 */
@@ -105,7 +105,7 @@ export default class RootAttributeOperation extends Operation {
 			 * The attribute with given key already exists for the given node.
 			 *
 			 * @error operation-rootattribute-attr-exists
-			 * @param {core.treeModel.RootElement} root
+			 * @param {engine.treeModel.RootElement} root
 			 * @param {String} key
 			 */
 			throw new CKEditorError(

+ 14 - 13
packages/ckeditor5-engine/src/treemodel/operation/transform.js

@@ -16,20 +16,21 @@ import isEqual from '../../../utils/lib/lodash/isEqual.js';
 import utils from '../../../utils/utils.js';
 
 /**
- * Transforms given {@link core.treeModel.operation.Operation operation} by another {@link core.treeModel.operation.Operation operation} and
- * returns the result of that transformation as an array containing one or more {@link core.treeModel.operation.Operation operation}
- * elements.
+ * Transforms given {@link engine.treeModel.operation.Operation operation} by another
+ * {@link engine.treeModel.operation.Operation operation} and
+ * returns the result of that transformation as an array containing one or more
+ * {@link engine.treeModel.operation.Operation operation} elements.
  *
- * Operations work on specified positions, passed to them when they are created. Whenever {@link core.treeModel.Document document}
+ * Operations work on specified positions, passed to them when they are created. Whenever {@link engine.treeModel.Document document}
  * changes, we have to reflect those modifications by updating or "transforming" operations which are not yet applied.
  * When an operation is transformed, its parameters may change based on the operation by which it is transformed.
  * If the transform-by operation applied any modifications to the Tree Data Model which affect positions or nodes
  * connected with transformed operation, those changes will be reflected in the parameters of the returned operation(s).
  *
- * Whenever the {@link core.treeModel.Document document} has different {@link core.treeModel.Document#baseVersion}
- * than the operation you want to {@link core.treeModel.Document#applyOperation apply}, you need to transform that
- * operation by all operations which were already applied to the {@link core.treeModel.Document document} and have greater
- * {@link core.treeModel.Document#baseVersion} than the operation being applied. Transform them in the same order as those
+ * Whenever the {@link engine.treeModel.Document document} has different {@link engine.treeModel.Document#baseVersion}
+ * than the operation you want to {@link engine.treeModel.Document#applyOperation apply}, you need to transform that
+ * operation by all operations which were already applied to the {@link engine.treeModel.Document document} and have greater
+ * {@link engine.treeModel.Document#baseVersion} than the operation being applied. Transform them in the same order as those
  * operations which were applied. This way all modifications done to the Tree Data Model will be reflected
  * in the operation parameters and the operation will "operate" on "up-to-date" version of the Tree Data Model.
  * This is mostly the case with Operational Transformations but it might be needed in particular features as well.
@@ -46,13 +47,13 @@ import utils from '../../../utils/utils.js';
  * `a` by `b` and also `b` by `a`. In both transformations the same operation has to be the important one. If we assume
  * that first or the second passed operation is always more important we won't be able to solve this case.
  *
- * @external core.treeModel.operation
- * @function core.treeModel.operation.transform
- * @param {core.treeModel.operation.Operation} a Operation that will be transformed.
- * @param {core.treeModel.operation.Operation} b Operation to transform by.
+ * @external engine.treeModel.operation
+ * @function engine.treeModel.operation.transform
+ * @param {engine.treeModel.operation.Operation} a Operation that will be transformed.
+ * @param {engine.treeModel.operation.Operation} b Operation to transform by.
  * @param {Boolean} isAMoreImportantThanB Flag indicating whether the operation which will be transformed (`a`) should be treated
  * as more important when resolving conflicts.
- * @returns {Array.<core.treeModel.operation.Operation>} Result of the transformation.
+ * @returns {Array.<engine.treeModel.operation.Operation>} Result of the transformation.
  */
 
 export default transform;

+ 38 - 38
packages/ckeditor5-engine/src/treemodel/position.js

@@ -14,13 +14,13 @@ import utils from '../../utils/utils.js';
  * Position in the tree. Position is always located before or after a node.
  * See {@link #path} property for more information.
  *
- * @memberOf core.treeModel
+ * @memberOf engine.treeModel
  */
 export default class Position {
 	/**
 	 * Creates a position.
 	 *
-	 * @param {core.treeModel.RootElement} root Root element for the path. Note that this element can not have a parent.
+	 * @param {engine.treeModel.RootElement} root Root element for the path. Note that this element can not have a parent.
 	 * @param {Array.<Number>} path Position path. Must contain at least one item. See {@link #path} property for more information.
 	 */
 	constructor( root, path ) {
@@ -37,7 +37,7 @@ export default class Position {
 		/**
 		 * Root element for the path. Note that this element can not have a parent.
 		 *
-		 * @member {core.treeModel.RootElement} core.treeModel.Position#root
+		 * @member {engine.treeModel.RootElement} engine.treeModel.Position#root
 		 */
 		this.root = root;
 
@@ -66,7 +66,7 @@ export default class Position {
 		 *        |- a   Before: [ 1, 1, 1 ] After: [ 1, 1, 2 ]
 		 *        |- r   Before: [ 1, 1, 2 ] After: [ 1, 1, 3 ]
 		 *
-		 * @member {Array.<Number>} core.treeModel.Position#path
+		 * @member {Array.<Number>} engine.treeModel.Position#path
 		 */
 		this.path = path;
 	}
@@ -75,7 +75,7 @@ export default class Position {
 	 * Node directly after the position.
 	 *
 	 * @readonly
-	 * @type {core.treeModel.Node}
+	 * @type {engine.treeModel.Node}
 	 */
 	get nodeAfter() {
 		return this.parent.getChild( this.offset ) || null;
@@ -114,7 +114,7 @@ export default class Position {
 	 * Parent element of the position. The position is located at {@link #offset} in this element.
 	 *
 	 * @readonly
-	 * @type {core.treeModel.Element}
+	 * @type {engine.treeModel.Element}
 	 */
 	get parent() {
 		let parent = this.root;
@@ -131,8 +131,8 @@ export default class Position {
 	/**
 	 * Checks whether this position is before or after given position.
 	 *
-	 * @param {core.treeModel.Position} otherPosition Position to compare with.
-	 * @returns {core.treeModel.PositionRelation}
+	 * @param {engine.treeModel.Position} otherPosition Position to compare with.
+	 * @returns {engine.treeModel.PositionRelation}
 	 */
 	compareWith( otherPosition ) {
 		if ( this.root != otherPosition.root ) {
@@ -161,7 +161,7 @@ export default class Position {
 	}
 
 	/**
-	 * Returns the path to the parent, which is the {@link core.treeModel.Position#path} without the last element.
+	 * Returns the path to the parent, which is the {@link engine.treeModel.Position#path} without the last element.
 	 *
 	 * This method returns the parent path even if the parent does not exists.
 	 *
@@ -175,7 +175,7 @@ export default class Position {
 	 * Returns a new instance of Position with offset incremented by `shift` value.
 	 *
 	 * @param {Number} shift How position offset should get changed. Accepts negative values.
-	 * @returns {core.treeModel.Position} Shifted position.
+	 * @returns {engine.treeModel.Position} Shifted position.
 	 */
 	getShiftedBy( shift ) {
 		let shifted = Position.createFromPosition( this );
@@ -191,9 +191,9 @@ export default class Position {
 	 * It may happen that this position is in a removed node. If that is the case, `null` is returned instead.
 	 *
 	 * @protected
-	 * @param {core.treeModel.Position} deletePosition Position before the first removed node.
+	 * @param {engine.treeModel.Position} deletePosition Position before the first removed node.
 	 * @param {Number} howMany How many nodes are removed.
-	 * @returns {core.treeModel.Position|null} Transformed position or `null`.
+	 * @returns {engine.treeModel.Position|null} Transformed position or `null`.
 	 */
 	getTransformedByDeletion( deletePosition, howMany ) {
 		let transformed = Position.createFromPosition( this );
@@ -239,12 +239,12 @@ export default class Position {
 	 * Returns this position after being updated by inserting `howMany` nodes at `insertPosition`.
 	 *
 	 * @protected
-	 * @param {core.treeModel.Position} insertPosition Position where nodes are inserted.
+	 * @param {engine.treeModel.Position} insertPosition Position where nodes are inserted.
 	 * @param {Number} howMany How many nodes are inserted.
 	 * @param {Boolean} insertBefore Flag indicating whether nodes are inserted before or after `insertPosition`.
 	 * This is important only when `insertPosition` and this position are same. If that is the case and the flag is
 	 * set to `true`, this position will get transformed. If the flag is set to `false`, it won't.
-	 * @returns {core.treeModel.Position} Transformed position.
+	 * @returns {engine.treeModel.Position} Transformed position.
 	 */
 	getTransformedByInsertion( insertPosition, howMany, insertBefore ) {
 		let transformed = Position.createFromPosition( this );
@@ -279,15 +279,15 @@ export default class Position {
 	 * Returns this position after being updated by moving `howMany` nodes from `sourcePosition` to `targetPosition`.
 	 *
 	 * @protected
-	 * @param {core.treeModel.Position} sourcePosition Position before the first element to move.
-	 * @param {core.treeModel.Position} targetPosition Position where moved elements will be inserted.
+	 * @param {engine.treeModel.Position} sourcePosition Position before the first element to move.
+	 * @param {engine.treeModel.Position} targetPosition Position where moved elements will be inserted.
 	 * @param {Number} howMany How many consecutive nodes to move, starting from `sourcePosition`.
 	 * @param {Boolean} insertBefore Flag indicating whether moved nodes are pasted before or after `insertPosition`.
 	 * This is important only when `targetPosition` and this position are same. If that is the case and the flag is
 	 * set to `true`, this position will get transformed by range insertion. If the flag is set to `false`, it won't.
 	 * @param {Boolean} [sticky] Flag indicating whether this position "sticks" to range, that is if it should be moved
 	 * with the moved range if it is equal to one of range's boundaries.
-	 * @returns {core.treeModel.Position} Transformed position.
+	 * @returns {engine.treeModel.Position} Transformed position.
 	 */
 	getTransformedByMove( sourcePosition, targetPosition, howMany, insertBefore, sticky ) {
 		// Moving a range removes nodes from their original position. We acknowledge this by proper transformation.
@@ -309,9 +309,9 @@ export default class Position {
 	/**
 	 * Checks whether this position is after given position.
 	 *
-	 * @see core.treeModel.Position#isBefore
+	 * @see engine.treeModel.Position#isBefore
 	 *
-	 * @param {core.treeModel.Position} otherPosition Position to compare with.
+	 * @param {engine.treeModel.Position} otherPosition Position to compare with.
 	 * @returns {Boolean} True if this position is after given position.
 	 */
 	isAfter( otherPosition ) {
@@ -346,7 +346,7 @@ export default class Position {
 	 *			// do A.
 	 *		}
 	 *
-	 * @param {core.treeModel.Position} otherPosition Position to compare with.
+	 * @param {engine.treeModel.Position} otherPosition Position to compare with.
 	 * @returns {Boolean} True if this position is before given position.
 	 */
 	isBefore( otherPosition ) {
@@ -356,7 +356,7 @@ export default class Position {
 	/**
 	 * Checks whether this position equals given position.
 	 *
-	 * @param {core.treeModel.Position} otherPosition Position to compare with.
+	 * @param {engine.treeModel.Position} otherPosition Position to compare with.
 	 * @returns {Boolean} True if positions are same.
 	 */
 	isEqual( otherPosition ) {
@@ -368,7 +368,7 @@ export default class Position {
 	 * or empty nodes in a range between them. Technically, those positions are not equal but in many cases
 	 * they are very similar or even indistinguishable when they touch.
 	 *
-	 * @param {core.treeModel.Position} otherPosition Position to compare with.
+	 * @param {engine.treeModel.Position} otherPosition Position to compare with.
 	 * @returns {Boolean} True if positions touch.
 	 */
 	isTouching( otherPosition ) {
@@ -419,10 +419,10 @@ export default class Position {
 	/**
 	 * Creates a new position after given node.
 	 *
-	 * @see {@link core.treeModel.TreeWalkerValue}
+	 * @see {@link engine.treeModel.TreeWalkerValue}
 	 *
-	 * @param {core.treeModel.Node} node Node the position should be directly after.
-	 * @returns {core.treeModel.Position}
+	 * @param {engine.treeModel.Node} node Node the position should be directly after.
+	 * @returns {engine.treeModel.Position}
 	 */
 	static createAfter( node ) {
 		if ( !node.parent ) {
@@ -430,7 +430,7 @@ export default class Position {
 			 * You can not make position after root.
 			 *
 			 * @error position-after-root
-			 * @param {core.treeModel.Node} root
+			 * @param {engine.treeModel.Node} root
 			 */
 			throw new CKEditorError( 'position-after-root: You can not make position after root.', { root: node } );
 		}
@@ -441,10 +441,10 @@ export default class Position {
 	/**
 	 * Creates a new position before the given node.
 	 *
-	 * @see {@link core.treeModel.TreeWalkerValue}
+	 * @see {@link engine.treeModel.TreeWalkerValue}
 	 *
-	 * @param {core.treeModel.node} node Node the position should be directly before.
-	 * @returns {core.treeModel.Position}
+	 * @param {engine.treeModel.node} node Node the position should be directly before.
+	 * @returns {engine.treeModel.Position}
 	 */
 	static createBefore( node ) {
 		if ( !node.parent ) {
@@ -452,7 +452,7 @@ export default class Position {
 			 * You can not make position before root.
 			 *
 			 * @error position-before-root
-			 * @param {core.treeModel.Node} root
+			 * @param {engine.treeModel.Node} root
 			 */
 			throw new CKEditorError( 'position-before-root: You can not make position before root.', { root: node } );
 		}
@@ -463,9 +463,9 @@ export default class Position {
 	/**
 	 * Creates a new position from the parent element and the offset in that element.
 	 *
-	 * @param {core.treeModel.Element} parent Position parent element.
+	 * @param {engine.treeModel.Element} parent Position parent element.
 	 * @param {Number} offset Position offset.
-	 * @returns {core.treeModel.Position}
+	 * @returns {engine.treeModel.Position}
 	 */
 	static createFromParentAndOffset( parent, offset ) {
 		const path = parent.getPath();
@@ -478,8 +478,8 @@ export default class Position {
 	/**
 	 * Creates and returns a new instance of Position, which is equal to passed position.
 	 *
-	 * @param {core.treeModel.Position} position Position to be cloned.
-	 * @returns {core.treeModel.Position}
+	 * @param {engine.treeModel.Position} position Position to be cloned.
+	 * @returns {engine.treeModel.Position}
 	 */
 	static createFromPosition( position ) {
 		return new this( position.root, position.path.slice() );
@@ -511,9 +511,9 @@ export default class Position {
 	 * Finally, the transformed position will point to `[ 1, 1, 4, 1 ]`.
 	 *
 	 * @protected
-	 * @param {core.treeModel.Position} source Beginning of the moved range.
-	 * @param {core.treeModel.Position} target Position where the range is moved.
-	 * @returns {core.treeModel.Position} Combined position.
+	 * @param {engine.treeModel.Position} source Beginning of the moved range.
+	 * @param {engine.treeModel.Position} target Position where the range is moved.
+	 * @returns {engine.treeModel.Position} Combined position.
 	 */
 	_getCombined( source, target ) {
 		const i = source.path.length - 1;
@@ -538,5 +538,5 @@ export default class Position {
  * A flag indicating whether this position is `'BEFORE'` or `'AFTER'` or `'SAME'` as given position.
  * If positions are in different roots `'DIFFERENT'` flag is returned.
  *
- * @typedef {String} core.treeModel.PositionRelation
+ * @typedef {String} engine.treeModel.PositionRelation
  */

+ 63 - 63
packages/ckeditor5-engine/src/treemodel/range.js

@@ -12,22 +12,22 @@ import utils from '../../utils/utils.js';
 /**
  * Range class. Range is iterable.
  *
- * @memberOf core.treeModel
+ * @memberOf engine.treeModel
  */
 export default class Range {
 	/**
 	 * Creates a range spanning from `start` position to `end` position.
-	 * **Note:** Constructor creates it's own {@link core.treeModel.Position} instances basing on passed values.
+	 * **Note:** Constructor creates it's own {@link engine.treeModel.Position} instances basing on passed values.
 	 *
-	 * @param {core.treeModel.Position} start Start position.
-	 * @param {core.treeModel.Position} end End position.
+	 * @param {engine.treeModel.Position} start Start position.
+	 * @param {engine.treeModel.Position} end End position.
 	 */
 	constructor( start, end ) {
 		/**
 		 * Start position.
 		 *
 		 * @readonly
-		 * @member {core.treeModel.Position} core.treeModel.Range#start
+		 * @member {engine.treeModel.Position} engine.treeModel.Range#start
 		 */
 		this.start = Position.createFromPosition( start );
 
@@ -35,7 +35,7 @@ export default class Range {
 		 * End position.
 		 *
 		 * @readonly
-		 * @member {core.treeModel.Position} core.treeModel.Range#end
+		 * @member {engine.treeModel.Position} engine.treeModel.Range#end
 		 */
 		this.end = Position.createFromPosition( end );
 	}
@@ -61,35 +61,35 @@ export default class Range {
 	/**
 	 * Range root element. Equals to the root of start position (which should be same as root of end position).
 	 *
-	 * @type {core.treeModel.RootElement}
+	 * @type {engine.treeModel.RootElement}
 	 */
 	get root() {
 		return this.start.root;
 	}
 
 	/**
-	 * Checks whether this contains given {@link core.treeModel.Position position}.
+	 * Checks whether this contains given {@link engine.treeModel.Position position}.
 	 *
-	 * @param {core.treeModel.Position} position Position to check.
-	 * @returns {Boolean} True if given {@link core.treeModel.Position position} is contained.
+	 * @param {engine.treeModel.Position} position Position to check.
+	 * @returns {Boolean} True if given {@link engine.treeModel.Position position} is contained.
 	 */
 	containsPosition( position ) {
 		return position.isAfter( this.start ) && position.isBefore( this.end );
 	}
 
 	/**
-	 * Checks whether this range contains given {@link core.treeModel.Range range}.
+	 * Checks whether this range contains given {@link engine.treeModel.Range range}.
 	 *
-	 * @param {core.treeModel.Range} otherRange Range to check.
-	 * @returns {Boolean} True if given {@link core.treeModel.Range range} boundaries are contained by this range.
+	 * @param {engine.treeModel.Range} otherRange Range to check.
+	 * @returns {Boolean} True if given {@link engine.treeModel.Range range} boundaries are contained by this range.
 	 */
 	containsRange( otherRange ) {
 		return this.containsPosition( otherRange.start ) && this.containsPosition( otherRange.end );
 	}
 
 	/**
-	 * Gets a part of this {@link core.treeModel.Range range} which is not a part of given {@link core.treeModel.Range range}. Returned
-	 * array contains zero, one or two {@link core.treeModel.Range ranges}.
+	 * Gets a part of this {@link engine.treeModel.Range range} which is not a part of given {@link engine.treeModel.Range range}. Returned
+	 * array contains zero, one or two {@link engine.treeModel.Range ranges}.
 	 *
 	 * Examples:
 	 *
@@ -106,8 +106,8 @@ export default class Range {
 	 *		transformed = range.getDifference( otherRange );
 	 *		// transformed array has two ranges: from [ 2, 7 ] to [ 3 ] and from [ 4 ] to [ 4, 0, 1 ]
 	 *
-	 * @param {core.treeModel.Range} otherRange Range to differentiate against.
-	 * @returns {Array.<core.treeModel.Range>} The difference between ranges.
+	 * @param {engine.treeModel.Range} otherRange Range to differentiate against.
+	 * @returns {Array.<engine.treeModel.Range>} The difference between ranges.
 	 */
 	getDifference( otherRange ) {
 		const ranges = [];
@@ -135,7 +135,7 @@ export default class Range {
 	}
 
 	/**
-	 * Returns an intersection of this {@link core.treeModel.Range range} and given {@link core.treeModel.Range range}. Intersection
+	 * Returns an intersection of this {@link engine.treeModel.Range range} and given {@link engine.treeModel.Range range}. Intersection
 	 * is a common part of both of those ranges. If ranges has no common part, returns `null`.
 	 *
 	 * Examples:
@@ -147,8 +147,8 @@ export default class Range {
 	 *		otherRange = new Range( new Position( root, [ 3 ] ), new Position( root, [ 5 ] ) );
 	 *		transformed = range.getIntersection( otherRange ); // range from [ 3 ] to [ 4, 0, 1 ]
 	 *
-	 * @param {core.treeModel.Range} otherRange Range to check for intersection.
-	 * @returns {core.treeModel.Range|null} A common part of given ranges or null if ranges have no common part.
+	 * @param {engine.treeModel.Range} otherRange Range to check for intersection.
+	 * @returns {engine.treeModel.Range|null} A common part of given ranges or null if ranges have no common part.
 	 */
 	getIntersection( otherRange ) {
 		if ( this.isIntersecting( otherRange ) ) {
@@ -209,7 +209,7 @@ export default class Range {
 	 * **Note:** this method is not returning flat ranges that contain no nodes. It may also happen that not-collapsed
 	 * range will return an empty array of flat ranges.
 	 *
-	 * @returns {Array.<core.treeModel.Range>} Array of flat ranges.
+	 * @returns {Array.<engine.treeModel.Range>} Array of flat ranges.
 	 */
 	getMinimalFlatRanges() {
 		let ranges = [];
@@ -252,33 +252,33 @@ export default class Range {
 	}
 
 	/**
-	 * Returns an iterator that iterates over all {@link core.treeModel.Item items} that are in this range and returns
-	 * them together with additional information like length or {@link core.treeModel.Position positions},
-	 * grouped as {@link core.treeModel.TreeWalkerValue}. It iterates over all {@link core.treeModel.TextFragment texts}
-	 * that are inside the range and all the {@link core.treeModel.Element}s we enter into when iterating over this
+	 * Returns an iterator that iterates over all {@link engine.treeModel.Item items} that are in this range and returns
+	 * them together with additional information like length or {@link engine.treeModel.Position positions},
+	 * grouped as {@link engine.treeModel.TreeWalkerValue}. It iterates over all {@link engine.treeModel.TextFragment texts}
+	 * that are inside the range and all the {@link engine.treeModel.Element}s we enter into when iterating over this
 	 * range.
 	 *
 	 * **Note:** iterator will not return a parent node of start position. This is in contrary to
-	 * {@link core.treeModel.TreeWalker} which will return that node with `'ELEMENT_END'` type. Iterator also
-	 * returns each {@link core.treeModel.Element} once, while simply used {@link core.treeModel.TreeWalker} might
+	 * {@link engine.treeModel.TreeWalker} which will return that node with `'ELEMENT_END'` type. Iterator also
+	 * returns each {@link engine.treeModel.Element} once, while simply used {@link engine.treeModel.TreeWalker} might
 	 * return it twice: for `'ELEMENT_START'` and `'ELEMENT_END'`.
 	 *
-	 * **Note:** because iterator does not return {@link core.treeModel.TreeWalkerValue values} with the type of
-	 * `'ELEMENT_END'`, you can use {@link core.treeModel.TreeWalkerValue.previousPosition} as a position before the
+	 * **Note:** because iterator does not return {@link engine.treeModel.TreeWalkerValue values} with the type of
+	 * `'ELEMENT_END'`, you can use {@link engine.treeModel.TreeWalkerValue.previousPosition} as a position before the
 	 * item.
 	 *
-	 * @see core.treeModel.TreeWalker
-	 * @returns {Iterable.<core.treeModel.TreeWalkerValue>}
+	 * @see engine.treeModel.TreeWalker
+	 * @returns {Iterable.<engine.treeModel.TreeWalkerValue>}
 	 */
 	*[ Symbol.iterator ]() {
 		yield* new TreeWalker( { boundaries: this, ignoreElementEnd: true } );
 	}
 
 	/**
-	 * Creates a {@link core.treeModel.TreeWalker} instance with this range as a boundary.
+	 * Creates a {@link engine.treeModel.TreeWalker} instance with this range as a boundary.
 	 *
-	 * @param {Object} options Object with configuration options. See {@link core.treeModel.TreeWalker}.
-	 * @param {core.treeModel.Position} [options.startPosition]
+	 * @param {Object} options Object with configuration options. See {@link engine.treeModel.TreeWalker}.
+	 * @param {engine.treeModel.Position} [options.startPosition]
 	 * @param {Boolean} [options.singleCharacters=false]
 	 * @param {Boolean} [options.shallow=false]
 	 * @param {Boolean} [options.ignoreElementEnd=false]
@@ -290,17 +290,17 @@ export default class Range {
 	}
 
 	/**
-	 * Returns an iterator that iterates over all {@link core.treeModel.Item items} that are in this range and returns
-	 * them. It iterates over all {@link core.treeModel.CharacterProxy characters} or
-	 * {@link core.treeModel.TextFragment texts} that are inside the range and all the {@link core.treeModel.Element}s
-	 * we enter into when iterating over this range. Note that it use {@link core.treeModel.TreeWalker} with the
-	 * {@link core.treeModel.TreeWalker#ignoreElementEnd ignoreElementEnd} option set to true.
-	 *
-	 * @param {Object} options Object with configuration options. See {@link core.treeModel.TreeWalker}.
-	 * @param {core.treeModel.Position} [options.startPosition]
+	 * Returns an iterator that iterates over all {@link engine.treeModel.Item items} that are in this range and returns
+	 * them. It iterates over all {@link engine.treeModel.CharacterProxy characters} or
+	 * {@link engine.treeModel.TextFragment texts} that are inside the range and all the {@link engine.treeModel.Element}s
+	 * we enter into when iterating over this range. Note that it use {@link engine.treeModel.TreeWalker} with the
+	 * {@link engine.treeModel.TreeWalker#ignoreElementEnd ignoreElementEnd} option set to true.
+	 *
+	 * @param {Object} options Object with configuration options. See {@link engine.treeModel.TreeWalker}.
+	 * @param {engine.treeModel.Position} [options.startPosition]
 	 * @param {Boolean} [options.singleCharacters=false]
 	 * @param {Boolean} [options.shallow=false]
-	 * @returns {Iterable.<core.treeModel.Item>}
+	 * @returns {Iterable.<engine.treeModel.Item>}
 	 */
 	*getItems( options = {} ) {
 		options.boundaries = this;
@@ -314,13 +314,13 @@ export default class Range {
 	}
 
 	/**
-	 * Returns an iterator that iterates over all {@link core.treeModel.Position positions} that are boundaries or
+	 * Returns an iterator that iterates over all {@link engine.treeModel.Position positions} that are boundaries or
 	 * contained in this range.
 	 *
-	 * @param {Object} options Object with configuration options. See {@link core.treeModel.TreeWalker}.
+	 * @param {Object} options Object with configuration options. See {@link engine.treeModel.TreeWalker}.
 	 * @param {Boolean} [options.singleCharacters=false]
 	 * @param {Boolean} [options.shallow=false]
-	 * @returns {Iterable.<core.treeModel.Position>}
+	 * @returns {Iterable.<engine.treeModel.Position>}
 	 */
 	*getPositions( options = {} ) {
 		options.boundaries = this;
@@ -335,9 +335,9 @@ export default class Range {
 	}
 
 	/**
-	 * Returns an array containing one or two {core.treeModel.Range ranges} that are a result of transforming this
-	 * {@link core.treeModel.Range range} by inserting `howMany` nodes at `insertPosition`. Two {@link core.treeModel.Range ranges} are
-	 * returned if the insertion was inside this {@link core.treeModel.Range range} and `spread` is set to `true`.
+	 * Returns an array containing one or two {engine.treeModel.Range ranges} that are a result of transforming this
+	 * {@link engine.treeModel.Range range} by inserting `howMany` nodes at `insertPosition`. Two {@link engine.treeModel.Range ranges} are
+	 * returned if the insertion was inside this {@link engine.treeModel.Range range} and `spread` is set to `true`.
 	 *
 	 * Examples:
 	 *
@@ -361,13 +361,13 @@ export default class Range {
 	 *		// transformed array has one range: from [ 2, 7 ] to [ 4, 0, 5 ] because range was expanded
 	 *
 	 * @protected
-	 * @param {core.treeModel.Position} insertPosition Position where nodes are inserted.
+	 * @param {engine.treeModel.Position} insertPosition Position where nodes are inserted.
 	 * @param {Number} howMany How many nodes are inserted.
-	 * @param {Boolean} [spread] Flag indicating whether this {core.treeModel.Range range} should be spread if insertion
+	 * @param {Boolean} [spread] Flag indicating whether this {engine.treeModel.Range range} should be spread if insertion
 	 * was inside the range. Defaults to `false`.
 	 * @param {Boolean} [isSticky] Flag indicating whether insertion should expand a range if it is in a place of
 	 * range boundary. Defaults to `false`.
-	 * @returns {Array.<core.treeModel.Range>} Result of the transformation.
+	 * @returns {Array.<engine.treeModel.Range>} Result of the transformation.
 	 */
 	getTransformedByInsertion( insertPosition, howMany, spread, isSticky ) {
 		isSticky = !!isSticky;
@@ -397,7 +397,7 @@ export default class Range {
 	/**
 	 * Two ranges equal if their start and end positions equal.
 	 *
-	 * @param {core.treeModel.Range} otherRange Range to compare with.
+	 * @param {engine.treeModel.Range} otherRange Range to compare with.
 	 * @returns {Boolean} True if ranges equal.
 	 */
 	isEqual( otherRange ) {
@@ -407,7 +407,7 @@ export default class Range {
 	/**
 	 * Checks and returns whether this range intersects with given range.
 	 *
-	 * @param {core.treeModel.Range} otherRange Range to compare with.
+	 * @param {engine.treeModel.Range} otherRange Range to compare with.
 	 * @returns {Boolean} True if ranges intersect.
 	 */
 	isIntersecting( otherRange ) {
@@ -417,8 +417,8 @@ export default class Range {
 	/**
 	 * Creates a range inside an element which starts before the first child and ends after the last child.
 	 *
-	 * @param {core.treeModel.Element} element Element which is a parent for the range.
-	 * @returns {core.treeModel.Range} Created range.
+	 * @param {engine.treeModel.Element} element Element which is a parent for the range.
+	 * @returns {engine.treeModel.Range} Created range.
 	 */
 	static createFromElement( element ) {
 		return this.createFromParentsAndOffsets( element, 0, element, element.getChildCount() );
@@ -427,9 +427,9 @@ export default class Range {
 	/**
 	 * Creates a new range spreading from specified position to the same position moved by given shift.
 	 *
-	 * @param {core.treeModel.Position} position Beginning of the range.
+	 * @param {engine.treeModel.Position} position Beginning of the range.
 	 * @param {Number} shift How long the range should be.
-	 * @returns {core.treeModel.Range}
+	 * @returns {engine.treeModel.Range}
 	 */
 	static createFromPositionAndShift( position, shift ) {
 		return new this( position, position.getShiftedBy( shift ) );
@@ -438,11 +438,11 @@ export default class Range {
 	/**
 	 * Creates a range from given parents and offsets.
 	 *
-	 * @param {core.treeModel.Element} startElement Start position parent element.
+	 * @param {engine.treeModel.Element} startElement Start position parent element.
 	 * @param {Number} startOffset Start position offset.
-	 * @param {core.treeModel.Element} endElement End position parent element.
+	 * @param {engine.treeModel.Element} endElement End position parent element.
 	 * @param {Number} endOffset End position offset.
-	 * @returns {core.treeModel.Range} Created range.
+	 * @returns {engine.treeModel.Range} Created range.
 	 */
 	static createFromParentsAndOffsets( startElement, startOffset, endElement, endOffset ) {
 		return new this(
@@ -454,8 +454,8 @@ export default class Range {
 	/**
 	 * Creates and returns a new instance of Range which is equal to passed range.
 	 *
-	 * @param {core.treeModel.Range} range Range to clone.
-	 * @returns {core.treeModel.Range}
+	 * @param {engine.treeModel.Range} range Range to clone.
+	 * @returns {engine.treeModel.Range}
 	 */
 	static createFromRange( range ) {
 		return new this( range.start, range.end );

+ 5 - 5
packages/ckeditor5-engine/src/treemodel/rootelement.js

@@ -10,24 +10,24 @@ import Element from './element.js';
 /**
  * Class for nodes that are roots of trees in tree data model.
  *
- * @memberOf core.treeModel
- * @extends core.treeModel.Element
+ * @memberOf engine.treeModel
+ * @extends engine.treeModel.Element
  */
 export default class RootElement extends Element {
 	/**
 	 * Creates tree root node.
 	 *
-	 * @param {core.treeModel.Document} doc {@link core.treeModel.Document} that is an owner of the root.
+	 * @param {engine.treeModel.Document} doc {@link engine.treeModel.Document} that is an owner of the root.
 	 * @param {String} name Node name.
 	 */
 	constructor( doc, name ) {
 		super( name );
 
 		/**
-		 * {@link core.treeModel.Document} that is an owner of this root.
+		 * {@link engine.treeModel.Document} that is an owner of this root.
 		 *
 		 * @readonly
-		 * @member {core.treeModel.Document} core.treeModel.RootElement#doc
+		 * @member {engine.treeModel.Document} engine.treeModel.RootElement#doc
 		 */
 		this.document = doc;
 	}

+ 21 - 21
packages/ckeditor5-engine/src/treemodel/schema.js

@@ -9,25 +9,25 @@ import clone from '../../utils/lib/lodash/clone.js';
 import CKEditorError from '../../utils/ckeditorerror.js';
 
 /**
- * SchemaItem is a singular registry item in {@link core.treeModel.Schema} that groups and holds allow/disallow rules for
- * one entity. This class is used internally in {@link core.treeModel.Schema} and should not be used outside it.
+ * SchemaItem is a singular registry item in {@link engine.treeModel.Schema} that groups and holds allow/disallow rules for
+ * one entity. This class is used internally in {@link engine.treeModel.Schema} and should not be used outside it.
  *
- * @see core.treeModel.Schema
+ * @see engine.treeModel.Schema
  * @protected
- * @memberOf core.treeModel
+ * @memberOf engine.treeModel
  */
 export class SchemaItem {
 	/**
 	 * Creates SchemaItem instance.
 	 *
-	 * @param {core.treeModel.Schema} schema Schema instance that owns this item.
+	 * @param {engine.treeModel.Schema} schema Schema instance that owns this item.
 	 */
 	constructor( schema ) {
 		/**
 		 * Schema instance that owns this item.
 		 *
 		 * @private
-		 * @member {core.treeModel.Schema} core.treeModel.SchemaItem#_schema
+		 * @member {engine.treeModel.Schema} engine.treeModel.SchemaItem#_schema
 		 */
 		this._schema = schema;
 
@@ -35,7 +35,7 @@ export class SchemaItem {
 		 * Paths in which the entity, represented by this item, is allowed.
 		 *
 		 * @private
-		 * @member {Array} core.treeModel.SchemaItem#_allowed
+		 * @member {Array} engine.treeModel.SchemaItem#_allowed
 		 */
 		this._allowed = [];
 
@@ -43,7 +43,7 @@ export class SchemaItem {
 		 * Paths in which the entity, represented by this item, is disallowed.
 		 *
 		 * @private
-		 * @member {Array} core.treeModel.SchemaItem#_disallowed
+		 * @member {Array} engine.treeModel.SchemaItem#_disallowed
 		 */
 		this._disallowed = [];
 	}
@@ -184,7 +184,7 @@ export class SchemaItem {
  * E.g. `p` can inherit from `$block`, so whenever given attribute is allowed on the `$block` it will automatically be
  * also allowed on the `p` element. By default, `$text` item already inherits from `$inline`.
  *
- * @memberOf core.treeModel
+ * @memberOf engine.treeModel
  */
 export default class Schema {
 	/**
@@ -195,7 +195,7 @@ export default class Schema {
 		 * Schema items registered in the schema.
 		 *
 		 * @private
-		 * @member {Map} core.treeModel.Schema#_items
+		 * @member {Map} engine.treeModel.Schema#_items
 		 */
 		this._items = new Map();
 
@@ -203,7 +203,7 @@ export default class Schema {
 		 * Description of what entities are a base for given entity.
 		 *
 		 * @private
-		 * @member {Map} core.treeModel.Schema#_extensionChains
+		 * @member {Map} engine.treeModel.Schema#_extensionChains
 		 */
 		this._extensionChains = new Map();
 
@@ -228,7 +228,7 @@ export default class Schema {
 	 *		schema.registerItem( 'div', '$block' );
 	 *		schema.allow( { name: 'header', inside: 'div p' } ); // inside: [ 'div', 'p' ] would also work.
 	 *
-	 * @param {core.treeModel.SchemaQuery} query Allowed query.
+	 * @param {engine.treeModel.SchemaQuery} query Allowed query.
 	 */
 	allow( query ) {
 		this._getItem( query.name ).allow( query.inside, query.attribute );
@@ -237,8 +237,8 @@ export default class Schema {
 	/**
 	 * Disallows given query in the schema.
 	 *
-	 * @see {@link core.treeModel.Schema#allow}
-	 * @param {core.treeModel.SchemaQuery} query Disallowed query.
+	 * @see {@link engine.treeModel.Schema#allow}
+	 * @param {engine.treeModel.SchemaQuery} query Disallowed query.
 	 */
 	disallow( query ) {
 		this._getItem( query.name ).disallow( query.inside, query.attribute );
@@ -251,7 +251,7 @@ export default class Schema {
 	 *		let caretPos = editor.document.selection.getFirstPosition();
 	 *		if ( schema.checkAtPosition( caretPos, '$text', 'bold' ) ) { ... }
 	 *
-	 * @param {core.treeModel.Position} position Position to check at.
+	 * @param {engine.treeModel.Position} position Position to check at.
 	 * @param {String} name Entity name to check.
 	 * @param {String} [attribute] If set, schema will check for entity with given attribute.
 	 * @returns {Boolean} `true` if entity is allowed, `false` otherwise
@@ -279,7 +279,7 @@ export default class Schema {
 	 *		};
 	 *		if ( schema.checkQuery( query ) ) { ... }
 	 *
-	 * @param {core.treeModel.SchemaQuery} query Query to check.
+	 * @param {engine.treeModel.SchemaQuery} query Query to check.
 	 * @returns {Boolean} `true` if given query is allowed in schema, `false` otherwise.
 	 */
 	checkQuery( query ) {
@@ -364,12 +364,12 @@ export default class Schema {
 	}
 
 	/**
-	 * Returns {@link core.treeModel.SchemaItem schema item} that was registered in the schema under given name.
+	 * Returns {@link engine.treeModel.SchemaItem schema item} that was registered in the schema under given name.
 	 * If item has not been found, throws error.
 	 *
 	 * @private
 	 * @param {String} itemName Name to look for in schema.
-	 * @returns {core.treeModel.SchemaItem} Schema item registered under given name.
+	 * @returns {engine.treeModel.SchemaItem} Schema item registered under given name.
 	 */
 	_getItem( itemName ) {
 		if ( !this.hasItem( itemName ) ) {
@@ -388,7 +388,7 @@ export default class Schema {
 	 * Gets position and traverses through it's parents to get their names and returns them.
 	 *
 	 * @private
-	 * @param {core.treeModel.Position} position Position to start building path from.
+	 * @param {engine.treeModel.Position} position Position to start building path from.
 	 * @returns {Array.<String>} Path containing elements names from top-most to the one containing given position.
 	 */
 	static _makeItemsPathFromPosition( position ) {
@@ -407,9 +407,9 @@ export default class Schema {
 }
 
 /**
- * Object with query used by {@link core.treeModel.Schema} to query schema or add allow/disallow rules to schema.
+ * Object with query used by {@link engine.treeModel.Schema} to query schema or add allow/disallow rules to schema.
  *
- * @typedef {Object} core.treeModel.SchemaQuery
+ * @typedef {Object} engine.treeModel.SchemaQuery
  * @property {String} name Entity name.
  * @property {Array.<String>|String} inside Path inside which the entity is placed.
  * @property {String} [attribute] If set, the query applies only to entities that has attribute with given key.

+ 42 - 42
packages/ckeditor5-engine/src/treemodel/selection.js

@@ -16,26 +16,26 @@ import utils from '../../utils/utils.js';
 const storePrefix = 'selection:';
 
 /**
- * Represents a selection that is made on nodes in {@link core.treeModel.Document}. `Selection` instance is
- * created by {@link core.treeModel.Document}. You should not need to create an instance of `Selection`.
+ * Represents a selection that is made on nodes in {@link engine.treeModel.Document}. `Selection` instance is
+ * created by {@link engine.treeModel.Document}. You should not need to create an instance of `Selection`.
  *
  * Keep in mind that selection always contains at least one range. If no ranges has been added to selection or all ranges
- * got removed from selection, the selection will be reset to contain {@link core.treeModel.Selection#_getDefaultRange the default range}.
+ * got removed from selection, the selection will be reset to contain {@link engine.treeModel.Selection#_getDefaultRange the default range}.
  *
- * @memberOf core.treeModel
+ * @memberOf engine.treeModel
  */
 export default class Selection {
 	/**
 	 * Creates an empty selection.
 	 *
-	 * @param {core.treeModel.Document} document Document which owns this selection.
+	 * @param {engine.treeModel.Document} document Document which owns this selection.
 	 */
 	constructor( document ) {
 		/**
 		 * List of attributes set on current selection.
 		 *
 		 * @protected
-		 * @member {Map} core.treeModel.Selection#_attrs
+		 * @member {Map} engine.treeModel.Selection#_attrs
 		 */
 		this._attrs = new Map();
 
@@ -43,7 +43,7 @@ export default class Selection {
 		 * Document which owns this selection.
 		 *
 		 * @private
-		 * @member {core.treeModel.Document} core.treeModel.Selection#_document
+		 * @member {engine.treeModel.Document} engine.treeModel.Selection#_document
 		 */
 		this._document = document;
 
@@ -51,7 +51,7 @@ export default class Selection {
 		 * Specifies whether the last added range was added as a backward or forward range.
 		 *
 		 * @private
-		 * @member {Boolean} core.treeModel.Selection#_lastRangeBackward
+		 * @member {Boolean} engine.treeModel.Selection#_lastRangeBackward
 		 */
 		this._lastRangeBackward = false;
 
@@ -59,19 +59,19 @@ export default class Selection {
 		 * Stores all ranges that are selected.
 		 *
 		 * @private
-		 * @member {Array.<core.treeModel.LiveRange>} core.treeModel.Selection#_ranges
+		 * @member {Array.<engine.treeModel.LiveRange>} engine.treeModel.Selection#_ranges
 		 */
 		this._ranges = [];
 	}
 
 	/**
 	 * Selection anchor. Anchor may be described as a position where the selection starts. Together with
-	 * {@link core.treeModel.Selection#focus} they define the direction of selection, which is important
+	 * {@link engine.treeModel.Selection#focus} they define the direction of selection, which is important
 	 * when expanding/shrinking selection. Anchor is always the start or end of the most recent added range.
 	 * It may be a bit unintuitive when there are multiple ranges in selection.
 	 *
-	 * @see core.treeModel.Selection#focus
-	 * @type {core.treeModel.LivePosition}
+	 * @see engine.treeModel.Selection#focus
+	 * @type {engine.treeModel.LivePosition}
 	 */
 	get anchor() {
 		let range = this._ranges.length ? this._ranges[ this._ranges.length - 1 ] : this._getDefaultRange();
@@ -82,8 +82,8 @@ export default class Selection {
 	/**
 	 * Selection focus. Focus is a position where the selection ends.
 	 *
-	 * @see core.treeModel.Selection#anchor
-	 * @type {core.treeModel.LivePosition}
+	 * @see engine.treeModel.Selection#anchor
+	 * @type {engine.treeModel.LivePosition}
 	 */
 	get focus() {
 		let range = this._ranges.length ? this._ranges[ this._ranges.length - 1 ] : this._getDefaultRange();
@@ -107,16 +107,16 @@ export default class Selection {
 	}
 
 	/**
-	 * Adds a range to the selection. Added range is copied and converted to {@link core.treeModel.LiveRange}. This means
+	 * Adds a range to the selection. Added range is copied and converted to {@link engine.treeModel.LiveRange}. This means
 	 * that passed range is not saved in the Selection instance and you can safely operate on it.
 	 *
 	 * Accepts a flag describing in which way the selection is made - passed range might be selected from
-	 * {@link core.treeModel.Range#start} to {@link core.treeModel.Range#end} or from {@link core.treeModel.Range#end}
-	 * to {@link core.treeModel.Range#start}. The flag is used to set {@link core.treeModel.Selection#anchor} and
-	 * {@link core.treeModel.Selection#focus} properties.
+	 * {@link engine.treeModel.Range#start} to {@link engine.treeModel.Range#end} or from {@link engine.treeModel.Range#end}
+	 * to {@link engine.treeModel.Range#start}. The flag is used to set {@link engine.treeModel.Selection#anchor} and
+	 * {@link engine.treeModel.Selection#focus} properties.
 	 *
-	 * @fires {@link core.treeModel.Selection#change:range change:range}
-	 * @param {core.treeModel.Range} range Range to add.
+	 * @fires {@link engine.treeModel.Selection#change:range change:range}
+	 * @param {engine.treeModel.Range} range Range to add.
 	 * @param {Boolean} [isBackward] Flag describing if added range was selected forward - from start to end (`false`)
 	 * or backward - from end to start (`true`). Defaults to `false`.
 	 */
@@ -147,11 +147,11 @@ export default class Selection {
 	}
 
 	/**
-	 * Returns the first range in the selection. First range is the one which {@link core.treeModel.Range#start start} position
-	 * {@link core.treeModel.Position#isBefore is before} start position of all other ranges (not to confuse with the first range
+	 * Returns the first range in the selection. First range is the one which {@link engine.treeModel.Range#start start} position
+	 * {@link engine.treeModel.Position#isBefore is before} start position of all other ranges (not to confuse with the first range
 	 * added to the selection).
 	 *
-	 * @returns {core.treeModel.Range}
+	 * @returns {engine.treeModel.Range}
 	 */
 	getFirstRange() {
 		let first = null;
@@ -168,10 +168,10 @@ export default class Selection {
 	}
 
 	/**
-	 * Returns the first position in the selection. First position is the position that {@link core.treeModel.Position#isBefore is before}
+	 * Returns the first position in the selection. First position is the position that {@link engine.treeModel.Position#isBefore is before}
 	 * any other position in the selection ranges.
 	 *
-	 * @returns {core.treeModel.Position}
+	 * @returns {engine.treeModel.Position}
 	 */
 	getFirstPosition() {
 		return Position.createFromPosition( this.getFirstRange().start );
@@ -180,7 +180,7 @@ export default class Selection {
 	/**
 	 * Removes all ranges that were added to the selection. Fires update event.
 	 *
-	 * @fires {@link core.treeModel.Selection#change:range change:range}
+	 * @fires {@link engine.treeModel.Selection#change:range change:range}
 	 */
 	removeAllRanges() {
 		this.destroy();
@@ -194,8 +194,8 @@ export default class Selection {
 	 * is treated like the last added range and is used to set {@link #anchor} and {@link #focus}. Accepts a flag
 	 * describing in which way the selection is made (see {@link #addRange}).
 	 *
-	 * @fires {@link core.treeModel.Selection#change:range change:range}
-	 * @param {Array.<core.treeModel.Range>} newRanges Array of ranges to set.
+	 * @fires {@link engine.treeModel.Selection#change:range change:range}
+	 * @param {Array.<engine.treeModel.Range>} newRanges Array of ranges to set.
 	 * @param {Boolean} [isLastBackward] Flag describing if last added range was selected forward - from start to end (`false`)
 	 * or backward - from end to start (`true`). Defaults to `false`.
 	 */
@@ -215,7 +215,7 @@ export default class Selection {
 	/**
 	 * Removes all attributes from the selection.
 	 *
-	 * @fires {@link core.treeModel.Selection#change:range change:range}
+	 * @fires {@link engine.treeModel.Selection#change:range change:range}
 	 */
 	clearAttributes() {
 		this._attrs.clear();
@@ -256,7 +256,7 @@ export default class Selection {
 	/**
 	 * Removes an attribute with given key from the selection.
 	 *
-	 * @fires {@link core.treeModel.Selection#change:range change:range}
+	 * @fires {@link engine.treeModel.Selection#change:range change:range}
 	 * @param {String} key Key of attribute to remove.
 	 */
 	removeAttribute( key ) {
@@ -269,7 +269,7 @@ export default class Selection {
 	/**
 	 * Sets attribute on the selection. If attribute with the same key already is set, it overwrites its values.
 	 *
-	 * @fires {@link core.treeModel.Selection#change:range change:range}
+	 * @fires {@link engine.treeModel.Selection#change:range change:range}
 	 * @param {String} key Key of attribute to set.
 	 * @param {*} value Attribute value.
 	 */
@@ -283,7 +283,7 @@ export default class Selection {
 	/**
 	 * Removes all attributes from the selection and sets given attributes.
 	 *
-	 * @fires {@link core.treeModel.Selection#change:range change:range}
+	 * @fires {@link engine.treeModel.Selection#change:range change:range}
 	 * @param {Iterable|Object} attrs Iterable object containing attributes to be set.
 	 */
 	setAttributesTo( attrs ) {
@@ -294,11 +294,11 @@ export default class Selection {
 	}
 
 	/**
-	 * Converts given range to {@link core.treeModel.LiveRange} and adds it to internal ranges array. Throws an error
+	 * Converts given range to {@link engine.treeModel.LiveRange} and adds it to internal ranges array. Throws an error
 	 * if given range is intersecting with any range that is already stored in this selection.
 	 *
 	 * @private
-	 * @param {core.treeModel.Range} range Range to add.
+	 * @param {engine.treeModel.Range} range Range to add.
 	 */
 	_pushRange( range ) {
 		for ( let i = 0; i < this._ranges.length ; i++ ) {
@@ -307,8 +307,8 @@ export default class Selection {
 				 * Trying to add a range that intersects with another range from selection.
 				 *
 				 * @error selection-range-intersects
-				 * @param {core.treeModel.Range} addedRange Range that was added to the selection.
-				 * @param {core.treeModel.Range} intersectingRange Range from selection that intersects with `addedRange`.
+				 * @param {engine.treeModel.Range} addedRange Range that was added to the selection.
+				 * @param {engine.treeModel.Range} intersectingRange Range from selection that intersects with `addedRange`.
 				 */
 				throw new CKEditorError(
 					'selection-range-intersects: Trying to add a range that intersects with another range from selection.',
@@ -487,12 +487,12 @@ export default class Selection {
 
 	/**
 	 * Returns a default range for this selection. The default range is a collapsed range that starts and ends
-	 * at the beginning of this selection's document {@link core.treeModel.Document#_getDefaultRoot default root}.
+	 * at the beginning of this selection's document {@link engine.treeModel.Document#_getDefaultRoot default root}.
 	 * This "artificial" range is important for algorithms that base on selection, so they won't break or need
 	 * special logic if there are no real ranges in the selection.
 	 *
 	 * @private
-	 * @returns {core.treeModel.Range}
+	 * @returns {engine.treeModel.Range}
 	 */
 	_getDefaultRange() {
 		const defaultRoot = this._document._getDefaultRoot();
@@ -514,14 +514,14 @@ export default class Selection {
 utils.mix( Selection, EmitterMixin );
 
 /**
- * Fired whenever selection ranges are changed through {@link core.treeModel.Selection Selection API}. Not fired when
- * {@link core.treeModel.LiveRange live ranges} inserted in selection change because of Tree Model changes.
+ * Fired whenever selection ranges are changed through {@link engine.treeModel.Selection Selection API}. Not fired when
+ * {@link engine.treeModel.LiveRange live ranges} inserted in selection change because of Tree Model changes.
  *
- * @event core.treeModel.Selection#change:range
+ * @event engine.treeModel.Selection#change:range
  */
 
 /**
  * Fired whenever selection attributes are changed.
  *
- * @event core.treeModel.Selection#change:attribute
+ * @event engine.treeModel.Selection#change:attribute
  */

+ 4 - 4
packages/ckeditor5-engine/src/treemodel/text.js

@@ -8,12 +8,12 @@
 import utils from '../../utils/utils.js';
 
 /**
- * Data structure for text with attributes. Note that `Text` is not a {@link core.treeModel.Node}. This class is used
+ * Data structure for text with attributes. Note that `Text` is not a {@link engine.treeModel.Node}. This class is used
  * as an aggregator for multiple characters that have same attributes. Example usage:
  *
  *		let myElem = new Element( 'li', [], new Text( 'text with attributes', { foo: true, bar: true } ) );
  *
- * @memberOf core.treeModel
+ * @memberOf engine.treeModel
  */
 export default class Text {
 	/**
@@ -27,7 +27,7 @@ export default class Text {
 		 * Text.
 		 *
 		 * @readonly
-		 * @member {String} core.treeModel.Text#text
+		 * @member {String} engine.treeModel.Text#text
 		 */
 		this.text = text || '';
 
@@ -35,7 +35,7 @@ export default class Text {
 		 * List of attributes bound with the text.
 		 *
 		 * @protected
-		 * @member {Map} core.treeModel.Text#_attrs
+		 * @member {Map} engine.treeModel.Text#_attrs
 		 */
 		this._attrs = utils.toMap( attrs );
 	}

+ 17 - 17
packages/ckeditor5-engine/src/treemodel/textfragment.js

@@ -10,64 +10,64 @@ import CharacterProxy from './characterproxy.js';
 /**
  * TextFragment is an aggregator for multiple CharacterProxy instances that are placed next to each other in
  * tree model, in the same parent, and all have same attributes set. Instances of this class are created and returned
- * in various algorithms that "merge characters" (see {@link core.treeModel.TreeWalker}, {@link core.treeModel.Range}).
+ * in various algorithms that "merge characters" (see {@link engine.treeModel.TreeWalker}, {@link engine.treeModel.Range}).
  *
- * Difference between {@link core.treeModel.TextFragment} and {@link core.treeModel.Text} is that the former is a set of
- * nodes taken from tree model, while {@link core.treeModel.Text} is simply a string with attributes set.
+ * Difference between {@link engine.treeModel.TextFragment} and {@link engine.treeModel.Text} is that the former is a set of
+ * nodes taken from tree model, while {@link engine.treeModel.Text} is simply a string with attributes set.
  *
- * You should never create an instance of this class by your own. Instead, use string literals or {@link core.treeModel.Text}.
+ * You should never create an instance of this class by your own. Instead, use string literals or {@link engine.treeModel.Text}.
  *
- * @memberOf core.treeModel
+ * @memberOf engine.treeModel
  */
 export default class TextFragment {
 	/**
 	 * Creates a text fragment.
 	 *
 	 * @protected
-	 * @param {core.treeModel.CharacterProxy} firstCharacter First character node contained in {@link core.treeModel.TextFragment}.
-	 * @param {Number} length Whole text contained in {@link core.treeModel.TextFragment}.
+	 * @param {engine.treeModel.CharacterProxy} firstCharacter First character node contained in {@link engine.treeModel.TextFragment}.
+	 * @param {Number} length Whole text contained in {@link engine.treeModel.TextFragment}.
 	 * @constructor
 	 */
 	constructor( firstCharacter, length ) {
 		/**
-		 * First character node contained in {@link core.treeModel.TextFragment}.
+		 * First character node contained in {@link engine.treeModel.TextFragment}.
 		 *
 		 * @readonly
-		 * @member {core.treeModel.CharacterProxy} core.treeModel.TextFragment#first
+		 * @member {engine.treeModel.CharacterProxy} engine.treeModel.TextFragment#first
 		 */
 		this.first = firstCharacter;
 
 		/**
-		 * Characters contained in {@link core.treeModel.TextFragment}.
+		 * Characters contained in {@link engine.treeModel.TextFragment}.
 		 *
 		 * @readonly
-		 * @member {String} core.treeModel.TextFragment#text
+		 * @member {String} engine.treeModel.TextFragment#text
 		 */
 		this.text = firstCharacter._nodeListText.text.substr( this.first._index, length );
 
 		/**
-		 * Last {@link core.treeModel.CharacterProxy character node} contained in {@link core.treeModel.TextFragment}.
+		 * Last {@link engine.treeModel.CharacterProxy character node} contained in {@link engine.treeModel.TextFragment}.
 		 *
 		 * @readonly
-		 * @member {core.treeModel.CharacterProxy} core.treeModel.TextFragment#last
+		 * @member {engine.treeModel.CharacterProxy} engine.treeModel.TextFragment#last
 		 */
 		this.last = this.getCharAt( this.text.length - 1 );
 	}
 
 	/**
-	 * A common parent of all character nodes contained in {@link core.treeModel.TextFragment}.
+	 * A common parent of all character nodes contained in {@link engine.treeModel.TextFragment}.
 	 *
-	 * @type {core.treeModel.Element}
+	 * @type {engine.treeModel.Element}
 	 */
 	get commonParent() {
 		return this.first.parent;
 	}
 
 	/**
-	 * Gets a character at given index and creates a {@link core.treeModel.CharacterProxy} out of it.
+	 * Gets a character at given index and creates a {@link engine.treeModel.CharacterProxy} out of it.
 	 *
 	 * @param {Number} index Character index.
-	 * @returns {core.treeModel.CharacterProxy}
+	 * @returns {engine.treeModel.CharacterProxy}
 	 */
 	getCharAt( index ) {
 		if ( index < 0 || index >= this.text.length ) {

+ 29 - 29
packages/ckeditor5-engine/src/treemodel/treewalker.js

@@ -14,23 +14,23 @@ import CKEditorError from '../../utils/ckeditorerror.js';
 /**
  * Position iterator class. It allows to iterate forward and backward over the tree document.
  *
- * @memberOf core.treeModel
+ * @memberOf engine.treeModel
  */
 export default class TreeWalker {
 	/**
 	 * Creates a range iterator. All parameters are optional, but you have to specify either `boundaries` or `startPosition`.
 	 *
 	 * @param {Object} options Object with configuration.
-	 * @param {core.treeModel.Range} [options.boundaries] Range to define boundaries of the iterator.
-	 * @param {core.treeModel.Position} [options.startPosition] Starting position.
+	 * @param {engine.treeModel.Range} [options.boundaries] Range to define boundaries of the iterator.
+	 * @param {engine.treeModel.Position} [options.startPosition] Starting position.
 	 * @param {Boolean} [options.singleCharacters=false] Flag indicating whether all consecutive characters with the same attributes
-	 * should be returned one by one as multiple {@link core.treeModel.CharacterProxy} (`true`) objects or as one
-	 * {@link core.treeModel.TextFragment} (`false`).
+	 * should be returned one by one as multiple {@link engine.treeModel.CharacterProxy} (`true`) objects or as one
+	 * {@link engine.treeModel.TextFragment} (`false`).
 	 * @param {Boolean} [options.shallow=false] Flag indicating whether iterator should enter elements or not. If the
 	 * iterator is shallow child nodes of any iterated node will not be returned along with `ELEMENT_END` tag.
 	 * @param {Boolean} [options.ignoreElementEnd=false] Flag indicating whether iterator should ignore `ELEMENT_END`
 	 * tags. If the option is true walker will not return a parent node of start position. If this option is `true`
-	 * each {@link core.treeModel.Element} will be returned once, while if the option is `false` they might be returned
+	 * each {@link engine.treeModel.Element} will be returned once, while if the option is `false` they might be returned
 	 * twice: for `'ELEMENT_START'` and `'ELEMENT_END'`.
 	 * @constructor
 	 */
@@ -52,7 +52,7 @@ export default class TreeWalker {
 		 *
 		 * If boundaries are not defined they are set before first and after last child of the root node.
 		 *
-		 * @member {core.treeModel.Range} core.treeModel.TreeWalker#boundaries
+		 * @member {engine.treeModel.Range} engine.treeModel.TreeWalker#boundaries
 		 */
 		this.boundaries = options.boundaries || null;
 
@@ -60,15 +60,15 @@ export default class TreeWalker {
 		 * End boundary cached for optimization purposes.
 		 *
 		 * @private
-		 * @member {core.treeModel.Element} core.treeModel.TreeWalker#_boundaryEndParent
+		 * @member {engine.treeModel.Element} engine.treeModel.TreeWalker#_boundaryEndParent
 		 */
 		this._boundaryEndParent = this.boundaries ? this.boundaries.end.parent : null;
 
 		/**
 		 * Iterator position. This is always static position, even if the initial position was a
-		 * {@link core.treeModel.LivePosition live position}.
+		 * {@link engine.treeModel.LivePosition live position}.
 		 *
-		 * @member {core.treeModel.Position} core.treeModel.TreeWalker#position
+		 * @member {engine.treeModel.Position} engine.treeModel.TreeWalker#position
 		 */
 		this.position = options.startPosition ?
 			Position.createFromPosition( options.startPosition ) :
@@ -76,9 +76,9 @@ export default class TreeWalker {
 
 		/**
 		 * Flag indicating whether all consecutive characters with the same attributes should be
-		 * returned as one {@link core.treeModel.CharacterProxy} (`true`) or one by one (`false`).
+		 * returned as one {@link engine.treeModel.CharacterProxy} (`true`) or one by one (`false`).
 		 *
-		 * @member {Boolean} core.treeModel.TreeWalker#singleCharacters
+		 * @member {Boolean} engine.treeModel.TreeWalker#singleCharacters
 		 */
 		this.singleCharacters = !!options.singleCharacters;
 
@@ -86,17 +86,17 @@ export default class TreeWalker {
 		 * Flag indicating whether iterator should enter elements or not. If the iterator is shallow child nodes of any
 		 * iterated node will not be returned along with `ELEMENT_END` tag.
 		 *
-		 * @member {Boolean} core.treeModel.TreeWalker#shallow
+		 * @member {Boolean} engine.treeModel.TreeWalker#shallow
 		 */
 		this.shallow = !!options.shallow;
 
 		/**
 		 * Flag indicating whether iterator should ignore `ELEMENT_END` tags. If the option is true walker will not
-		 * return a parent node of the start position. If this option is `true` each {@link core.treeModel.Element} will
+		 * return a parent node of the start position. If this option is `true` each {@link engine.treeModel.Element} will
 		 * be returned once, while if the option is `false` they might be returned twice:
 		 * for `'ELEMENT_START'` and `'ELEMENT_END'`.
 		 *
-		 * @member {Boolean} core.treeModel.TreeWalker#ignoreElementEnd
+		 * @member {Boolean} engine.treeModel.TreeWalker#ignoreElementEnd
 		 */
 		this.ignoreElementEnd = !!options.ignoreElementEnd;
 
@@ -104,7 +104,7 @@ export default class TreeWalker {
 		 * Parent of the most recently visited node. Cached for optimization purposes.
 		 *
 		 * @private
-		 * @member {core.treeModel.Element} core.treeModel.TreeWalker#_visitedParent
+		 * @member {engine.treeModel.Element} engine.treeModel.TreeWalker#_visitedParent
 		 */
 		this._visitedParent = this.position.parent;
 	}
@@ -121,7 +121,7 @@ export default class TreeWalker {
 	 *
 	 * @returns {Object} Object implementing iterator interface, returning information about taken step.
 	 * @returns {Boolean} return.done True if iterator is done.
-	 * @returns {core.treeModel.TreeWalkerValue} return.value Information about taken step.
+	 * @returns {engine.treeModel.TreeWalkerValue} return.value Information about taken step.
 	 */
 	next() {
 		const previousPosition = this.position;
@@ -205,27 +205,27 @@ function formatReturnValue( type, item, previousPosition, nextPosition, length )
 }
 
 /**
- * Type of the step made by {@link core.treeModel.TreeWalker}.
+ * Type of the step made by {@link engine.treeModel.TreeWalker}.
  * Possible values: `'ELEMENT_START'` if walker is at the beginning of a node, `'ELEMENT_END'` if walker is at the end of node,
  * `'CHARACTER'` if walker traversed over a character, or `'TEXT'` if walker traversed over multiple characters (available in
- * character merging mode, see {@link core.treeModel.TreeWalker#constructor}).
+ * character merging mode, see {@link engine.treeModel.TreeWalker#constructor}).
  *
- * @typedef {String} core.treeModel.TreeWalkerValueType
+ * @typedef {String} engine.treeModel.TreeWalkerValueType
  */
 
 /**
- * Object returned by {@link core.treeModel.TreeWalker} when traversing tree model.
+ * Object returned by {@link engine.treeModel.TreeWalker} when traversing tree model.
  *
- * @typedef {Object} core.treeModel.TreeWalkerValue
- * @property {core.treeModel.TreeWalkerValueType} type
- * @property {core.treeModel.Item} item Item between old and new positions of {@link core.treeModel.TreeWalker}.
- * @property {core.treeModel.Position} previousPosition Previous position of the iterator. For `'ELEMENT_END'` it is the last
+ * @typedef {Object} engine.treeModel.TreeWalkerValue
+ * @property {engine.treeModel.TreeWalkerValueType} type
+ * @property {engine.treeModel.Item} item Item between old and new positions of {@link engine.treeModel.TreeWalker}.
+ * @property {engine.treeModel.Position} previousPosition Previous position of the iterator. For `'ELEMENT_END'` it is the last
  * position inside the element. For all other types it is the position before the item. Note that it is more
  * efficient to use this position then calculate the position before the node using
- * {@link core.treeModel.Position.createBefore}. It is also more efficient to get the position after node by shifting
- * `previousPosition` by `length`, using {@link core.treeModel.Position#getShiftedBy}, then calculate the position using
- * {@link core.treeModel.Position.createAfter}.
- * @property {core.treeModel.Position} nextPosition Next position of the iterator. For `'ELEMENT_START'` it is the first
+ * {@link engine.treeModel.Position.createBefore}. It is also more efficient to get the position after node by shifting
+ * `previousPosition` by `length`, using {@link engine.treeModel.Position#getShiftedBy}, then calculate the position using
+ * {@link engine.treeModel.Position.createAfter}.
+ * @property {engine.treeModel.Position} nextPosition Next position of the iterator. For `'ELEMENT_START'` it is the first
  * position inside the element. For all other types it is the position after the item.
  * @property {Number} [length] Length of the item. For `'ELEMENT_START'` and `'CHARACTER'` it is 1. For `'TEXT'` it is
  * the length of the text. For `'ELEMENT_END'` it is undefined.

+ 1 - 1
packages/ckeditor5-engine/src/treeview.jsdoc

@@ -4,5 +4,5 @@
  */
 
 /**
- * @namespace core.treeView
+ * @namespace engine.treeView
  */

+ 29 - 29
packages/ckeditor5-engine/src/treeview/domconverter.js

@@ -10,15 +10,15 @@ import ViewElement from './element.js';
 
 /**
  * DomConverter is a set of tools to do transformations between DOM nodes and view nodes. It also handles
- * {@link core.treeView.DomConverter#bindElements binding} these nodes.
+ * {@link engine.treeView.DomConverter#bindElements binding} these nodes.
  *
- * DomConverter does not check which nodes should be rendered (use {@link core.treeView.Renderer}), does not keep a
- * state of a tree nor keeps synchronization between tree view and DOM tree (use {@link core.treeView.TreeView}).
+ * DomConverter does not check which nodes should be rendered (use {@link engine.treeView.Renderer}), does not keep a
+ * state of a tree nor keeps synchronization between tree view and DOM tree (use {@link engine.treeView.TreeView}).
  *
  * DomConverter keeps DOM elements to View element bindings, so when the converter will be destroyed, the binding will
  * be lost. Two converters will keep separate binding maps, so one tree view can be bound with two DOM trees.
  *
- * @memberOf core.treeView
+ * @memberOf engine.treeView
  */
 export default class DomConverter {
 	/**
@@ -37,7 +37,7 @@ export default class DomConverter {
 		 * DOM to View mapping.
 		 *
 		 * @private
-		 * @member {WeakMap} core.treeView.DomConverter#_domToViewMapping
+		 * @member {WeakMap} engine.treeView.DomConverter#_domToViewMapping
 		 */
 		this._domToViewMapping = new WeakMap();
 
@@ -45,18 +45,18 @@ export default class DomConverter {
 		 * View to DOM mapping.
 		 *
 		 * @private
-		 * @member {WeakMap} core.treeView.DomConverter#_viewToDomMapping
+		 * @member {WeakMap} engine.treeView.DomConverter#_viewToDomMapping
 		 */
 		this._viewToDomMapping = new WeakMap();
 	}
 
 	/**
 	 * Binds DOM and View elements, so it will be possible to get corresponding elements using
-	 * {@link core.treeView.DomConverter#getCorrespondingViewElement} and
-	 * {@link core.treeView.DomConverter#getCorespondingDOMElement}.
+	 * {@link engine.treeView.DomConverter#getCorrespondingViewElement} and
+	 * {@link engine.treeView.DomConverter#getCorespondingDOMElement}.
 	 *
 	 * @param {HTMLElement} domElement DOM element to bind.
-	 * @param {core.treeView.Element} viewElement View element to bind.
+	 * @param {engine.treeView.Element} viewElement View element to bind.
 	 */
 	bindElements( domElement, viewElement ) {
 		this._domToViewMapping.set( domElement, viewElement );
@@ -68,7 +68,7 @@ export default class DomConverter {
 	 * text data. Nodes need to have corresponding types. In all other cases nodes are different.
 	 *
 	 * @param {Node} domNode DOM node to compare.
-	 * @param {core.treeView.Node} viewNode View node to compare.
+	 * @param {engine.treeView.Node} viewNode View node to compare.
 	 * @returns {Boolean} True if nodes are same.
 	 */
 	compareNodes( domNode, viewNode ) {
@@ -89,7 +89,7 @@ export default class DomConverter {
 	 * Converts view to DOM. For all text nodes and not bound elements new elements will be created. For bound
 	 * elements function will return corresponding elements.
 	 *
-	 * @param {core.treeView.Node} viewNode View node to transform.
+	 * @param {engine.treeView.Node} viewNode View node to transform.
 	 * @param {document} domDocument Document which will be used to create DOM nodes.
 	 * @param {Object} [options] Conversion options.
 	 * @param {Boolean} [options.bind=false] Determines whether new elements will be bound.
@@ -136,7 +136,7 @@ export default class DomConverter {
 	 * @param {Object} [options] Conversion options.
 	 * @param {Boolean} [options.bind=false] Determines whether new elements will be bound.
 	 * @param {Boolean} [options.withChildren=true] It true node's children will be converted too.
-	 * @returns {core.treeView.Node} Converted node.
+	 * @returns {engine.treeView.Node} Converted node.
 	 */
 	domToView( domNode, options ) {
 		if ( !options ) {
@@ -175,11 +175,11 @@ export default class DomConverter {
 	}
 
 	/**
-	 * Gets corresponding view node. This function use {@link core.treeView.DomConverter#getCorrespondingViewElement}
+	 * Gets corresponding view node. This function use {@link engine.treeView.DomConverter#getCorrespondingViewElement}
 	 * for elements and {@link getCorrespondingViewText} for text nodes.
 	 *
 	 * @param {Node} domNode DOM node.
-	 * @returns {core.treeView.Node|null} Corresponding node.
+	 * @returns {engine.treeView.Node|null} Corresponding node.
 	 */
 	getCorrespondingView( domNode ) {
 		if ( domNode instanceof HTMLElement ) {
@@ -191,29 +191,29 @@ export default class DomConverter {
 
 	/**
 	 * Gets corresponding view element. Returns element if an view element was
-	 * {@link core.treeView.DomConverter#bindElements bound} to the given DOM element or null otherwise.
+	 * {@link engine.treeView.DomConverter#bindElements bound} to the given DOM element or null otherwise.
 	 *
 	 * @param {HTMLElement} domElement DOM element.
-	 * @returns {core.treeView.Element|null} Corresponding element or null if none element was bound.
+	 * @returns {engine.treeView.Element|null} Corresponding element or null if none element was bound.
 	 */
 	getCorrespondingViewElement( domElement ) {
 		return this._domToViewMapping.get( domElement );
 	}
 
 	/**
-	 * Gets corresponding text node. Text nodes are not {@link core.treeView.DomConverter#bindElements bound},
+	 * Gets corresponding text node. Text nodes are not {@link engine.treeView.DomConverter#bindElements bound},
 	 * corresponding text node is returned based on the sibling or parent.
 	 *
-	 * If the directly previous sibling is a {@link core.treeView.DomConverter#bindElements bound} element, it is used
+	 * If the directly previous sibling is a {@link engine.treeView.DomConverter#bindElements bound} element, it is used
 	 * to find the corresponding text node.
 	 *
-	 * If this is a first child in the parent and the parent is a {@link core.treeView.DomConverter#bindElements bound}
+	 * If this is a first child in the parent and the parent is a {@link engine.treeView.DomConverter#bindElements bound}
 	 * element, it is used to find the corresponding text node.
 	 *
 	 * Otherwise `null` is returned.
 	 *
 	 * @param {Text} domText DOM text node.
-	 * @returns {core.treeView.Text|null} Corresponding view text node or null, if it was not possible to find a
+	 * @returns {engine.treeView.Text|null} Corresponding view text node or null, if it was not possible to find a
 	 * corresponding node.
 	 */
 	getCorrespondingViewText( domText ) {
@@ -245,10 +245,10 @@ export default class DomConverter {
 	}
 
 	/**
-	 * Gets corresponding DOM node. This function uses {@link core.treeView.DomConverter#getCorrespondingDomElement} for
-	 * elements and {@link core.treeView.DomConverter#getCorrespondingDomText} for text nodes.
+	 * Gets corresponding DOM node. This function uses {@link engine.treeView.DomConverter#getCorrespondingDomElement} for
+	 * elements and {@link engine.treeView.DomConverter#getCorrespondingDomText} for text nodes.
 	 *
-	 * @param {core.treeView.Node} viewNode View node.
+	 * @param {engine.treeView.Node} viewNode View node.
 	 * @returns {Node|null} Corresponding DOM node.
 	 */
 	getCorrespondingDom( viewNode ) {
@@ -261,9 +261,9 @@ export default class DomConverter {
 
 	/**
 	 * Gets corresponding DOM element. Returns element if an DOM element was
-	 * {@link core.treeView.DomConverter#bindElements bound} to the given view element or null otherwise.
+	 * {@link engine.treeView.DomConverter#bindElements bound} to the given view element or null otherwise.
 	 *
-	 * @param {core.treeView.Element} viewElement View element.
+	 * @param {engine.treeView.Element} viewElement View element.
 	 * @returns {HTMLElement|null} Corresponding element or null if none element was bound.
 	 */
 	getCorrespondingDomElement( viewElement ) {
@@ -271,18 +271,18 @@ export default class DomConverter {
 	}
 
 	/**
-	 * Gets corresponding text node. Text nodes are not {@link core.treeView.DomConverter#bindElements bound},
+	 * Gets corresponding text node. Text nodes are not {@link engine.treeView.DomConverter#bindElements bound},
 	 * corresponding text node is returned based on the sibling or parent.
 	 *
-	 * If the directly previous sibling is a {@link core.treeView.DomConverter#bindElements bound} element, it is used
+	 * If the directly previous sibling is a {@link engine.treeView.DomConverter#bindElements bound} element, it is used
 	 * to find the corresponding text node.
 	 *
-	 * If this is a first child in the parent and the parent is a {@link core.treeView.DomConverter#bindElements bound}
+	 * If this is a first child in the parent and the parent is a {@link engine.treeView.DomConverter#bindElements bound}
 	 * element, it is used to find the corresponding text node.
 	 *
 	 * Otherwise null is returned.
 	 *
-	 * @param {core.treeView.Text} viewText View text node.
+	 * @param {engine.treeView.Text} viewText View text node.
 	 * @returns {Text|null} Corresponding DOM text node or null, if it was not possible to find a corresponding node.
 	 */
 	getCorrespondingDomText( viewText ) {

+ 25 - 25
packages/ckeditor5-engine/src/treeview/element.js

@@ -12,8 +12,8 @@ import isPlainObject from '../../utils/lib/lodash/isPlainObject.js';
 /**
  * Tree view element.
  *
- * @memberOf core.treeView
- * @extends core.treeView.Node
+ * @memberOf engine.treeView
+ * @extends engine.treeView.Node
  */
 export default class Element extends Node {
 	/**
@@ -27,7 +27,7 @@ export default class Element extends Node {
 	 *
 	 * @param {String} name Node name.
 	 * @param {Object|Iterable} [attrs] Collection of attributes.
-	 * @param {core.treeView.Node|Iterable.<core.treeView.Node>} [children] List of nodes to be inserted into created element.
+	 * @param {engine.treeView.Node|Iterable.<engine.treeView.Node>} [children] List of nodes to be inserted into created element.
 	 */
 	constructor( name, attrs, children ) {
 		super();
@@ -36,7 +36,7 @@ export default class Element extends Node {
 		 * Name of the element.
 		 *
 		 * @readonly
-		 * @member {String} core.treeView.Element#name
+		 * @member {String} engine.treeView.Element#name
 		 */
 		this.name = name;
 
@@ -44,7 +44,7 @@ export default class Element extends Node {
 		 * Map of attributes, where attributes names are keys and attributes values are values.
 		 *
 		 * @protected
-		 * @member {Map} core.treeView.Element#_attrs
+		 * @member {Map} engine.treeView.Element#_attrs
 		 */
 		if ( isPlainObject( attrs ) ) {
 			this._attrs = utils.objectToMap( attrs );
@@ -56,7 +56,7 @@ export default class Element extends Node {
 		 * Array of child nodes.
 		 *
 		 * @protected
-		 * @member {Array.<core.treeView.Node>} core.treeView.Element#_children
+		 * @member {Array.<engine.treeView.Node>} engine.treeView.Element#_children
 		 */
 		this._children = [];
 
@@ -68,7 +68,7 @@ export default class Element extends Node {
 		 * Set of classes associated with element instance.
 		 *
 		 * @protected
-		 * @member {Set} core.treeView.Element#_classes
+		 * @member {Set} engine.treeView.Element#_classes
 		 */
 		this._classes = new Set();
 
@@ -83,7 +83,7 @@ export default class Element extends Node {
 		 * Map of styles.
 		 *
 		 * @protected
-		 * @member {Set} core.treeView.Element#_styles
+		 * @member {Set} engine.treeView.Element#_styles
 		 */
 		this._styles = new Map();
 
@@ -121,11 +121,11 @@ export default class Element extends Node {
 	}
 
 	/**
-	 * {@link core.treeView.Element#insert Insert} a child node or a list of child nodes at the end of this node and sets
+	 * {@link engine.treeView.Element#insert Insert} a child node or a list of child nodes at the end of this node and sets
 	 * the parent of these nodes to this element.
 	 *
-	 * @fires core.treeView.Node#change
-	 * @param {core.treeView.Node|Iterable.<core.treeView.Node>} nodes Node or the list of nodes to be inserted.
+	 * @fires engine.treeView.Node#change
+	 * @param {engine.treeView.Node|Iterable.<engine.treeView.Node>} nodes Node or the list of nodes to be inserted.
 	 * @returns {Number} Number of appended nodes.
 
 	 */
@@ -137,7 +137,7 @@ export default class Element extends Node {
 	 * Gets child at the given index.
 	 *
 	 * @param {Number} index Index of child.
-	 * @returns {core.treeView.Node} Child node.
+	 * @returns {engine.treeView.Node} Child node.
 	 */
 	getChild( index ) {
 		return this._children[ index ];
@@ -155,7 +155,7 @@ export default class Element extends Node {
 	/**
 	 * Gets index of the given child node. Returns `-1` if child node is not found.
 	 *
-	 * @param {core.treeView.Node} node Child node.
+	 * @param {engine.treeView.Node} node Child node.
 	 * @returns {Number} Index of the child node.
 	 */
 	getChildIndex( node ) {
@@ -165,7 +165,7 @@ export default class Element extends Node {
 	/**
 	 * Gets child nodes iterator.
 	 *
-	 * @returns {Iterable.<core.treeView.Node>} Child nodes iterator.
+	 * @returns {Iterable.<engine.treeView.Node>} Child nodes iterator.
 	 */
 	getChildren() {
 		return this._children[ Symbol.iterator ]();
@@ -244,7 +244,7 @@ export default class Element extends Node {
 	 *
 	 * @param {String} key Attribute key.
 	 * @param {String} value Attribute value.
-	 * @fires core.treeView.Node#change
+	 * @fires engine.treeView.Node#change
 	 */
 	setAttribute( key, value ) {
 		this._fireChange( 'ATTRIBUTES', this );
@@ -263,8 +263,8 @@ export default class Element extends Node {
 	 * this element.
 	 *
 	 * @param {Number} index Position where nodes should be inserted.
-	 * @param {core.treeView.Node|Iterable.<core.treeView.Node>} nodes Node or the list of nodes to be inserted.
-	 * @fires core.treeView.Node#change
+	 * @param {engine.treeView.Node|Iterable.<engine.treeView.Node>} nodes Node or the list of nodes to be inserted.
+	 * @fires engine.treeView.Node#change
 	 * @returns {Number} Number of inserted nodes.
 	 */
 	insertChildren( index, nodes ) {
@@ -291,7 +291,7 @@ export default class Element extends Node {
 	 *
 	 * @param {String} key Attribute key.
 	 * @returns {Boolean} Returns true if an attribute existed and has been removed.
-	 * @fires core.treeView.Node#change
+	 * @fires engine.treeView.Node#change
 	 */
 	removeAttribute( key ) {
 		this._fireChange( 'ATTRIBUTES', this );
@@ -327,8 +327,8 @@ export default class Element extends Node {
 	 *
 	 * @param {Number} index Number of the first node to remove.
 	 * @param {Number} [howMany=1] Number of nodes to remove.
-	 * @returns {Array.<core.treeView.Node>} The array of removed nodes.
-	 * @fires core.treeView.Node#change
+	 * @returns {Array.<engine.treeView.Node>} The array of removed nodes.
+	 * @fires engine.treeView.Node#change
 	 */
 	removeChildren( index, howMany = 1 ) {
 		this._fireChange( 'CHILDREN', this );
@@ -400,7 +400,7 @@ export default class Element extends Node {
 	 *		element.addClass( 'foo', 'bar' ); // Adds 'foo' and 'bar' classes.
 	 *
 	 * @param {...String} className
-	 * @fires core.treeView.Node#change
+	 * @fires engine.treeView.Node#change
 	 */
 	addClass( ...className ) {
 		this._fireChange( 'ATTRIBUTES', this );
@@ -414,7 +414,7 @@ export default class Element extends Node {
 	 *		element.removeClass( 'foo', 'bar' ); // Removes both 'foo' and 'bar' classes.
 	 *
 	 * @param {...String} className
-	 * @fires core.treeView.Node#change
+	 * @fires engine.treeView.Node#change
 	 */
 	removeClass( ...className ) {
 		this._fireChange( 'ATTRIBUTES', this );
@@ -451,7 +451,7 @@ export default class Element extends Node {
 	 *
 	 * @param {String|Object} property Property name or object with key - value pairs.
 	 * @param {String} [value] Value to set. This parameter is ignored if object is provided as the first parameter.
-	 * @fires core.treeView.Node#change
+	 * @fires engine.treeView.Node#change
 	 */
 	setStyle( property, value ) {
 		this._fireChange( 'ATTRIBUTES', this );
@@ -504,7 +504,7 @@ export default class Element extends Node {
 	 *		element.removeStyle( 'color', 'border-top' ); // Removes both 'color' and 'border-top' styles.
 	 *
 	 * @param {...String} property
-	 * @fires core.treeView.Node#change
+	 * @fires engine.treeView.Node#change
 	 */
 	removeStyle( ...property ) {
 		this._fireChange( 'ATTRIBUTES', this );
@@ -536,4 +536,4 @@ function parseClasses( classesSet, classesString ) {
 	const classArray = classesString.split( /\s+/ );
 	classesSet.clear();
 	classArray.forEach( name => classesSet.add( name ) );
-}
+}

+ 21 - 21
packages/ckeditor5-engine/src/treeview/node.js

@@ -13,7 +13,7 @@ import utils from '../../utils/utils.js';
  * Abstract tree view node class.
  *
  * @abstract
- * @memberOf core.treeView
+ * @memberOf engine.treeView
  */
 export default class Node {
 	/**
@@ -23,18 +23,18 @@ export default class Node {
 	 */
 	constructor() {
 		/**
-		 * Parent element. Null by default. Set by {@link core.treeView.Element#insertChildren}.
+		 * Parent element. Null by default. Set by {@link engine.treeView.Element#insertChildren}.
 		 *
 		 * @readonly
-		 * @member {core.treeView.Element|null} core.treeView.Node#parent
+		 * @member {engine.treeView.Element|null} engine.treeView.Node#parent
 		 */
 		this.parent = null;
 
 		/**
-		 * {@link core.treeView.TreeView} reference.
+		 * {@link engine.treeView.TreeView} reference.
 		 *
 		 * @protected
-		 * @member {core.treeView.TreeView} core.treeView.Node#_treeView
+		 * @member {engine.treeView.TreeView} engine.treeView.Node#_treeView
 		 */
 		this._treeView = null;
 	}
@@ -69,7 +69,7 @@ export default class Node {
 	/**
 	 * Returns nodes next sibling or `null` if it is the last child.
 	 *
-	 * @returns {core.treeView.Node|null} Nodes next sibling or `null` if it is the last child.
+	 * @returns {engine.treeView.Node|null} Nodes next sibling or `null` if it is the last child.
 	 */
 	getNextSibling() {
 		const index = this.getIndex();
@@ -80,7 +80,7 @@ export default class Node {
 	/**
 	 * Returns nodes previous sibling or `null` if it is the first child.
 	 *
-	 * @returns {core.treeView.Node|null} Nodes previous sibling or `null` if it is the first child.
+	 * @returns {engine.treeView.Node|null} Nodes previous sibling or `null` if it is the first child.
 	 */
 	getPreviousSibling() {
 		const index = this.getIndex();
@@ -89,11 +89,11 @@ export default class Node {
 	}
 
 	/**
-	 * Gets {@link core.treeView.TreeView} reference. If the node has {@link core.treeView.TreeView}, assign by
-	 * {@link core.treeView.Node#setTreeView} it will be returned. Otherwise {@link core.treeView.TreeView} of the parents node
+	 * Gets {@link engine.treeView.TreeView} reference. If the node has {@link engine.treeView.TreeView}, assign by
+	 * {@link engine.treeView.Node#setTreeView} it will be returned. Otherwise {@link engine.treeView.TreeView} of the parents node
 	 * will be returned. If node has no parent, `null` will be returned.
 	 *
-	 * @returns {core.treeView.TreeView|null} Tree view of the node, tree view of the parent or null.
+	 * @returns {engine.treeView.TreeView|null} Tree view of the node, tree view of the parent or null.
 	 */
 	getTreeView() {
 		if ( this._treeView ) {
@@ -106,10 +106,10 @@ export default class Node {
 	}
 
 	/**
-	 * Sets the {@link core.treeView.TreeView} of the node. Note that not all of nodes need to have {@link core.treeView.TreeView}
-	 * assigned, see {@link core.treeView.Node#getTreeView}.
+	 * Sets the {@link engine.treeView.TreeView} of the node. Note that not all of nodes need to have {@link engine.treeView.TreeView}
+	 * assigned, see {@link engine.treeView.Node#getTreeView}.
 	 *
-	 * @param {core.treeView.TreeView} treeView Tree view.
+	 * @param {engine.treeView.TreeView} treeView Tree view.
 	 */
 	setTreeView( treeView ) {
 		this._treeView = treeView;
@@ -123,9 +123,9 @@ export default class Node {
 	}
 
 	/**
-	 * @param {core.treeView.ChangeType} type Type of the change.
-	 * @param {core.treeView.Node} node Changed node.
-	 * @fires core.treeView.Node#change
+	 * @param {engine.treeView.ChangeType} type Type of the change.
+	 * @param {engine.treeView.Node} node Changed node.
+	 * @fires engine.treeView.Node#change
 	 */
 	_fireChange( type, node ) {
 		this.fire( 'change', type, node );
@@ -152,14 +152,14 @@ export default class Node {
 	/**
 	 * Fired when a node changes.
 	 *
-	 * * In case of {@link core.treeView.Text text nodes} it will be a change of the text data.
-	 * * In case of {@link core.treeView.Element elements} it will be a change of child nodes or attributes.
+	 * * In case of {@link engine.treeView.Text text nodes} it will be a change of the text data.
+	 * * In case of {@link engine.treeView.Element elements} it will be a change of child nodes or attributes.
 	 *
 	 * Change event is bubbling, it is fired on the ancestors chain.
 	 *
-	 * @event core.treeView.Node#change
-	 * @param {core.treeView.ChangeType} Type of the change.
-	 * @param {core.treeView.Node} Changed node.
+	 * @event engine.treeView.Node#change
+	 * @param {engine.treeView.ChangeType} Type of the change.
+	 * @param {engine.treeView.Node} Changed node.
 	 */
 }
 

+ 1 - 1
packages/ckeditor5-engine/src/treeview/observer.jsdoc

@@ -4,5 +4,5 @@
  */
 
 /**
- * @namespace core.treeView.observer
+ * @namespace engine.treeView.observer
  */

+ 15 - 15
packages/ckeditor5-engine/src/treeview/observer/domeventobserver.js

@@ -9,12 +9,12 @@ import Observer from './observer.js';
 
 /**
  * Base class for DOM event observers. This class handles
- * {@link core.treeView.observer.Observer#observe adding} listeners to DOM elements,
- * {@link core.treeView.observer.Observer#disable disabling} and
- * {@link core.treeView.observer.Observer#enable re-enabling} events.
+ * {@link engine.treeView.observer.Observer#observe adding} listeners to DOM elements,
+ * {@link engine.treeView.observer.Observer#disable disabling} and
+ * {@link engine.treeView.observer.Observer#enable re-enabling} events.
  * Child class needs to define
- * {@link core.treeView.observer.DomEventObserver#domEventType DOM event type} and
- * {@link core.treeView.observer.DomEventObserver#onDomEvent callback}.
+ * {@link engine.treeView.observer.DomEventObserver#domEventType DOM event type} and
+ * {@link engine.treeView.observer.DomEventObserver#onDomEvent callback}.
  *
  * For instance:
  *
@@ -29,8 +29,8 @@ import Observer from './observer.js';
  *			}
  *		}
  *
- * @memberOf core.treeView.observer
- * @extends core.treeView.observer.Observer
+ * @memberOf engine.treeView.observer
+ * @extends engine.treeView.observer.Observer
  */
 export default class DomEventObserver extends Observer {
 	constructor( treeView ) {
@@ -41,17 +41,17 @@ export default class DomEventObserver extends Observer {
 		 * if the obsever should listen to multiple DOM events.
 		 *
 		 * @readonly
-		 * @member {String|Array.<String>} core.treeView.observer.DomEventObserver#domEventType
+		 * @member {String|Array.<String>} engine.treeView.observer.DomEventObserver#domEventType
 		 */
 	}
 
 	/**
 	 * Callback which should be called when the DOM event occurred. Note that the callback will not be called if
-	 * observer {@link core.treeView.observer.DomEventObserver#isEnabled is not enabled}.
+	 * observer {@link engine.treeView.observer.DomEventObserver#isEnabled is not enabled}.
 	 *
-	 * @see core.treeView.observer.DomEventObserver#domEventType
+	 * @see engine.treeView.observer.DomEventObserver#domEventType
 	 * @abstract
-	 * @method core.treeView.observer.DomEventObserver#onDomEvent
+	 * @method engine.treeView.observer.DomEventObserver#onDomEvent
 	 */
 
 	/**
@@ -66,11 +66,11 @@ export default class DomEventObserver extends Observer {
 	}
 
 	/**
-	 * Calls {@link core.treeView.TreeView#fire} if observer
-	 * {@link core.treeView.observer.DomEventObserver#isEnabled is enabled}.
+	 * Calls {@link engine.treeView.TreeView#fire} if observer
+	 * {@link engine.treeView.observer.DomEventObserver#isEnabled is enabled}.
 	 *
-	 * @see core.treeView.TreeView#fire
-	 * @param {...*} args Fire arguments {@link core.treeView.TreeView#fire}.
+	 * @see engine.treeView.TreeView#fire
+	 * @param {...*} args Fire arguments {@link engine.treeView.TreeView#fire}.
 	 */
 	fire( ...args ) {
 		if ( this.isEnabled ) {

+ 7 - 7
packages/ckeditor5-engine/src/treeview/observer/focusobserver.js

@@ -8,10 +8,10 @@
 import DomEventObserver from './domeventobserver.js';
 
 /**
- * {@link core.treeView.TreeView#focus Focus} and {@link core.treeView.TreeView#blur blur} events observer.
+ * {@link engine.treeView.TreeView#focus Focus} and {@link engine.treeView.TreeView#blur blur} events observer.
  *
- * @memberOf core.treeView.observer
- * @extends core.treeView.observer.DomEventObserver
+ * @memberOf engine.treeView.observer
+ * @extends engine.treeView.observer.DomEventObserver
  */
 export default class FocusObserver extends DomEventObserver {
 	constructor( treeView ) {
@@ -36,15 +36,15 @@ export default class FocusObserver extends DomEventObserver {
 /**
  * Fired when one of the editables gets focus.
  *
- * @event core.treeView.TreeView#focus
- * @param {core.treeView.Element} data.target The event view target (editable element that was focused).
+ * @event engine.treeView.TreeView#focus
+ * @param {engine.treeView.Element} data.target The event view target (editable element that was focused).
  * @param {HTMLElement} data.domTarget The event DOM target (editable element that was focused).
  */
 
 /**
  * Fired when one of the editables loses focus.
  *
- * @event core.treeView.TreeView#blur
- * @param {core.treeView.Element} data.target The event view target (editable element that was blurred).
+ * @event engine.treeView.TreeView#blur
+ * @param {engine.treeView.Element} data.target The event view target (editable element that was blurred).
  * @param {HTMLElement} data.domTarget The event DOM target (editable element that was blurred).
  */

+ 29 - 29
packages/ckeditor5-engine/src/treeview/observer/mutationobserver.js

@@ -8,18 +8,18 @@
 import Observer from './observer.js';
 
 /**
- * Mutation observer class observes changes in the DOM, fires {@link core.treeView.TreeView#mutations} event, mark view elements
- * as changed and call {@link core.treeView.render}. Because all mutated nodes are marked as "to be rendered" and the
- * {@link core.treeView.render} is called, all changes will be reverted, unless the mutation will be handled by the
- * {@link core.treeView.TreeView#mutations} event listener. It means user will see only handled changes, and the editor will
+ * Mutation observer class observes changes in the DOM, fires {@link engine.treeView.TreeView#mutations} event, mark view elements
+ * as changed and call {@link engine.treeView.render}. Because all mutated nodes are marked as "to be rendered" and the
+ * {@link engine.treeView.render} is called, all changes will be reverted, unless the mutation will be handled by the
+ * {@link engine.treeView.TreeView#mutations} event listener. It means user will see only handled changes, and the editor will
  * block all changes which are not handled.
  *
  * Mutation Observer also take care of reducing number of mutations which are fired. It removes duplicates and
  * mutations on elements which do not have corresponding view elements. Also
- * {@link core.treeView.TreeView.MutatatedText text mutation} is fired only if parent element do not change child list.
+ * {@link engine.treeView.TreeView.MutatatedText text mutation} is fired only if parent element do not change child list.
  *
- * @memberOf core.treeView.observer
- * @extends core.treeView.observer.Observer
+ * @memberOf engine.treeView.observer
+ * @extends engine.treeView.observer.Observer
  */
 export default class MutationObserver extends Observer {
 	constructor( treeView ) {
@@ -29,7 +29,7 @@ export default class MutationObserver extends Observer {
 		 * Native mutation observer config.
 		 *
 		 * @private
-		 * @member {Object} core.treeView.observer.MutationObserver#_config
+		 * @member {Object} engine.treeView.observer.MutationObserver#_config
 		 */
 		this._config = {
 			childList: true,
@@ -39,16 +39,16 @@ export default class MutationObserver extends Observer {
 		};
 
 		/**
-		 * Reference to the {@link core.treeView.TreeView#domConverter}.
+		 * Reference to the {@link engine.treeView.TreeView#domConverter}.
 		 *
-		 * @member {core.treeView.DomConverter} core.treeView.observer.MutationObserver#domConverter
+		 * @member {engine.treeView.DomConverter} engine.treeView.observer.MutationObserver#domConverter
 		 */
 		this.domConverter = treeView.domConverter;
 
 		/**
-		 * Reference to the {@link core.treeView.TreeView#renderer}.
+		 * Reference to the {@link engine.treeView.TreeView#renderer}.
 		 *
-		 * @member {core.treeView.Renderer} core.treeView.observer.MutationObserver#renderer
+		 * @member {engine.treeView.Renderer} engine.treeView.observer.MutationObserver#renderer
 		 */
 		this.renderer = treeView.renderer;
 
@@ -56,7 +56,7 @@ export default class MutationObserver extends Observer {
 		 * Observed DOM elements.
 		 *
 		 * @private
-		 * @member {Array.<HTMLElement>} core.treeView.observer.MutationObserver#_domElements
+		 * @member {Array.<HTMLElement>} engine.treeView.observer.MutationObserver#_domElements
 		 */
 		this._domElements = [];
 
@@ -64,7 +64,7 @@ export default class MutationObserver extends Observer {
 		 * Native mutation observer.
 		 *
 		 * @private
-		 * @member {MutationObserver} core.treeView.observer.MutationObserver#_mutationObserver
+		 * @member {MutationObserver} engine.treeView.observer.MutationObserver#_mutationObserver
 		 */
 		this._mutationObserver = new window.MutationObserver( this._onMutations.bind( this ) );
 	}
@@ -104,7 +104,7 @@ export default class MutationObserver extends Observer {
 	 * Handles mutations. Deduplicates, mark view elements to sync, fire event and call render.
 	 *
 	 * @protected
-	 * @method core.treeView.observer.MutationObserver#_onMutations
+	 * @method engine.treeView.observer.MutationObserver#_onMutations
 	 * @param {Array.<Object>} domMutations Array of native mutations.
 	 */
 	_onMutations( domMutations ) {
@@ -185,23 +185,23 @@ export default class MutationObserver extends Observer {
  * Fired when mutation occurred. If tree view is not changed on this event, DOM will be reverter to the state before
  * mutation, so all changes which should be applied, should be handled on this event.
  *
- * @event core.treeView.TreeView#mutations
- * @param {Array.<core.treeView.TreeView~MutatatedText|core.treeView.TreeView~MutatatedChildren>} viewMutations
+ * @event engine.treeView.TreeView#mutations
+ * @param {Array.<engine.treeView.TreeView~MutatatedText|engine.treeView.TreeView~MutatatedChildren>} viewMutations
  * Array of mutations.
- * For mutated texts it will be {@link core.treeView.TreeView~MutatatedText} and for mutated elements it will be
- * {@link core.treeView.TreeView~MutatatedElement}. You can recognize the type based on the `type` property.
+ * For mutated texts it will be {@link engine.treeView.TreeView~MutatatedText} and for mutated elements it will be
+ * {@link engine.treeView.TreeView~MutatatedElement}. You can recognize the type based on the `type` property.
  */
 
 /**
  * Mutation item for text.
  *
- * @see core.treeView.TreeView#mutations
- * @see core.treeView.MutatatedChildren
+ * @see engine.treeView.TreeView#mutations
+ * @see engine.treeView.MutatatedChildren
  *
- * @typedef {Object} core.treeView.MutatatedText
+ * @typedef {Object} engine.treeView.MutatatedText
  *
  * @property {String} type For text mutations it is always 'text'.
- * @property {core.treeView.Text} node Mutated text node.
+ * @property {engine.treeView.Text} node Mutated text node.
  * @property {String} oldText Old text.
  * @property {String} newText New text.
  */
@@ -209,13 +209,13 @@ export default class MutationObserver extends Observer {
 /**
  * Mutation item for child nodes.
  *
- * @see core.treeView.TreeView#mutations
- * @see core.treeView.MutatatedText
+ * @see engine.treeView.TreeView#mutations
+ * @see engine.treeView.MutatatedText
  *
- * @typedef {Object} core.treeView.MutatatedChildren
+ * @typedef {Object} engine.treeView.MutatatedChildren
  *
  * @property {String} type For child nodes mutations it is always 'children'.
- * @property {core.treeView.Element} node Parent of the mutated children.
- * @property {Array.<core.treeView.Node>} oldChildren Old child nodes.
- * @property {Array.<core.treeView.Node>} newChildren New child nodes.
+ * @property {engine.treeView.Element} node Parent of the mutated children.
+ * @property {Array.<engine.treeView.Node>} oldChildren Old child nodes.
+ * @property {Array.<engine.treeView.Node>} newChildren New child nodes.
  */

+ 12 - 12
packages/ckeditor5-engine/src/treeview/observer/observer.js

@@ -7,23 +7,23 @@
 
 /**
  * Abstract base observer class. Observers are classes which observe changes on DOM elements, do the preliminary
- * processing and fire events on the {@link core.treeView.TreeView} objects.
+ * processing and fire events on the {@link engine.treeView.TreeView} objects.
  *
  * @abstract
- * @memberOf core.treeView.observer
+ * @memberOf engine.treeView.observer
  */
 export default class Observer {
 	/**
 	 * Creates an instance of the observer.
 	 *
-	 * @param {core.treeView.TreeView} treeView
+	 * @param {engine.treeView.TreeView} treeView
 	 */
 	constructor( treeView ) {
 		/**
-		 * Reference to the {@link core.treeView.TreeView} object.
+		 * Reference to the {@link engine.treeView.TreeView} object.
 		 *
 		 * @readonly
-		 * @member {core.treeView.TreeView} core.treeView.observer.Observer#treeView
+		 * @member {engine.treeView.TreeView} engine.treeView.observer.Observer#treeView
 		 */
 		this.treeView = treeView;
 
@@ -31,20 +31,20 @@ export default class Observer {
 		 * State of the observer. If it is disabled events will not be fired.
 		 *
 		 * @readonly
-		 * @member {Boolean} core.treeView.observer.Observer#isEnabled
+		 * @member {Boolean} engine.treeView.observer.Observer#isEnabled
 		 */
 		this.isEnabled = false;
 	}
 
 	/**
 	 * Enables the observer. This method is called when then observer is registered to the
-	 * {@link core.treeView.TreeView} and after {@link core.treeView.TreeView#render rendering}
-	 * (all observers are {@link core.treeView.observer.Observer#disable disabled} before rendering).
+	 * {@link engine.treeView.TreeView} and after {@link engine.treeView.TreeView#render rendering}
+	 * (all observers are {@link engine.treeView.observer.Observer#disable disabled} before rendering).
 	 *
 	 * A typical use case for disabling observers is that mutation observers need to be disabled for the rendering.
 	 * However, a child class may not need to be disabled, so it can implement an empty method.
 	 *
-	 * @see core.treeView.observer.Observer#disable
+	 * @see engine.treeView.observer.Observer#disable
 	 */
 	enable() {
 		this.isEnabled = true;
@@ -52,9 +52,9 @@ export default class Observer {
 
 	/**
 	 * Disables the observer. This method is called before
-	 * {@link core.treeView.TreeView#render rendering} to prevent firing events during rendering.
+	 * {@link engine.treeView.TreeView#render rendering} to prevent firing events during rendering.
 	 *
-	 * @see core.treeView.observer.Observer#enable
+	 * @see engine.treeView.observer.Observer#enable
 	 */
 	disable() {
 		this.isEnabled = false;
@@ -63,7 +63,7 @@ export default class Observer {
 	/**
 	 * Starts observing the given root element.
 	 *
-	 * @method core.treeView.observer.Observer#observe
+	 * @method engine.treeView.observer.Observer#observe
 	 * @param {HTMLElement} domElement
 	 * @param {String} name The name of the root element.
 	 */

+ 8 - 8
packages/ckeditor5-engine/src/treeview/position.js

@@ -8,27 +8,27 @@
 /**
  * Position in the tree. Position is always located before or after a node.
  *
- * @memberOf core.treeView
+ * @memberOf engine.treeView
  */
 export default class Position {
 	/**
 	 * Creates a position.
 	 *
-	 * @param {core.treeView.Element} parent Position parent element.
+	 * @param {engine.treeView.Element} parent Position parent element.
 	 * @param {Number} offset Position offset.
 	 */
 	constructor( parent, offset ) {
 		/**
 		 * Position parent element.
 		 *
-		 * @member {core.treeView.Element} core.treeView.Position#parent
+		 * @member {engine.treeView.Element} engine.treeView.Position#parent
 		 */
 		this.parent = parent;
 
 		/**
 		 * Position offset.
 		 *
-		 * @member {Number} core.treeView.Position#offset
+		 * @member {Number} engine.treeView.Position#offset
 		 */
 		this.offset = offset;
 	}
@@ -37,7 +37,7 @@ export default class Position {
 	 * Returns a new instance of Position with offset incremented by `shift` value.
 	 *
 	 * @param {Number} shift How position offset should get changed. Accepts negative values.
-	 * @returns {core.treeView.Position} Shifted position.
+	 * @returns {engine.treeView.Position} Shifted position.
 	 */
 	getShiftedBy( shift ) {
 		let shifted = Position.createFromPosition( this );
@@ -51,7 +51,7 @@ export default class Position {
 	/**
 	 * Checks whether this position equals given position.
 	 *
-	 * @param {core.treeView.Position} otherPosition Position to compare with.
+	 * @param {engine.treeView.Position} otherPosition Position to compare with.
 	 * @returns {Boolean} True if positions are same.
 	 */
 	isEqual( otherPosition ) {
@@ -61,8 +61,8 @@ export default class Position {
 	/**
 	 * Creates and returns a new instance of Position, which is equal to passed position.
 	 *
-	 * @param {core.treeView.Position} position Position to be cloned.
-	 * @returns {core.treeView.Position}
+	 * @param {engine.treeView.Position} position Position to be cloned.
+	 * @returns {engine.treeView.Position}
 	 */
 	static createFromPosition( position ) {
 		return new this( position.parent, position.offset );

+ 12 - 12
packages/ckeditor5-engine/src/treeview/range.js

@@ -10,30 +10,30 @@ import Position from './position.js';
 /**
  * Tree view range.
  *
- * @memberOf core.treeView
+ * @memberOf engine.treeView
  */
 export default class Range {
 	/**
 	 * Creates a range spanning from `start` position to `end` position.
-	 * **Note:** Constructor creates it's own {@link core.treeView.Position} instances basing on passed values.
+	 * **Note:** Constructor creates it's own {@link engine.treeView.Position} instances basing on passed values.
 	 *
-	 * @param {core.treeView.Position} start Start position.
-	 * @param {core.treeView.Position} end End position.
+	 * @param {engine.treeView.Position} start Start position.
+	 * @param {engine.treeView.Position} end End position.
 	 */
 	constructor( start, end ) {
 		/**
 		 * Start position.
 		 *
-		 * @member core.treeView.Range#start
-		 * @type {core.treeView.Position}
+		 * @member engine.treeView.Range#start
+		 * @type {engine.treeView.Position}
 		 */
 		this.start = Position.createFromPosition( start );
 
 		/**
 		 * End position.
 		 *
-		 * @member core.treeView.Range#end
-		 * @type {core.treeView.Position}
+		 * @member engine.treeView.Range#end
+		 * @type {engine.treeView.Position}
 		 */
 		this.end = Position.createFromPosition( end );
 	}
@@ -50,7 +50,7 @@ export default class Range {
 	/**
 	 * Two ranges equal if their start and end positions equal.
 	 *
-	 * @param {core.treeView.Range} otherRange Range to compare with.
+	 * @param {engine.treeView.Range} otherRange Range to compare with.
 	 * @returns {Boolean} True if ranges equal.
 	 */
 	isEqual( otherRange ) {
@@ -60,11 +60,11 @@ export default class Range {
 	/**
 	 * Creates a range from given parents and offsets.
 	 *
-	 * @param {core.treeView.Element} startElement Start position parent element.
+	 * @param {engine.treeView.Element} startElement Start position parent element.
 	 * @param {Number} startOffset Start position offset.
-	 * @param {core.treeView.Element} endElement End position parent element.
+	 * @param {engine.treeView.Element} endElement End position parent element.
 	 * @param {Number} endOffset End position offset.
-	 * @returns {core.treeView.Range} Created range.
+	 * @returns {engine.treeView.Range} Created range.
 	 */
 	static createFromParentsAndOffsets( startElement, startOffset, endElement, endOffset ) {
 		return new this(

+ 17 - 17
packages/ckeditor5-engine/src/treeview/renderer.js

@@ -10,25 +10,25 @@ import CKEditorError from '../../utils/ckeditorerror.js';
 
 /**
  * Renderer updates DOM tree, to make it a reflection of the view tree. Changed nodes need to be
- * {@link core.treeView.Renderer#markToSync marked} to be rendered. Then, on {@link core.treeView.Renderer#render render}, renderer
+ * {@link engine.treeView.Renderer#markToSync marked} to be rendered. Then, on {@link engine.treeView.Renderer#render render}, renderer
  * ensure they need to be refreshed and creates DOM nodes from view nodes,
- * {@link core.treeView.DomConverter#bindElements bind} them and insert into DOM tree. Renderer use {@link core.treeView.DomConverter}
+ * {@link engine.treeView.DomConverter#bindElements bind} them and insert into DOM tree. Renderer use {@link engine.treeView.DomConverter}
  * to transform and bind nodes.
  *
- * @memberOf core.treeView
+ * @memberOf engine.treeView
  */
 export default class Renderer {
 	/**
 	 * Creates a renderer instance.
 	 *
-	 * @param {core.treeView.DomConverter} domConverter Converter instance.
+	 * @param {engine.treeView.DomConverter} domConverter Converter instance.
 	 */
 	constructor( domConverter ) {
 		/**
 		 * Converter instance.
 		 *
 		 * @readonly
-		 * @member {core.treeView.DomConverter} core.treeView.Renderer#domConverter
+		 * @member {engine.treeView.DomConverter} engine.treeView.Renderer#domConverter
 		 */
 		this.domConverter = domConverter;
 
@@ -36,7 +36,7 @@ export default class Renderer {
 		 * Set of nodes which attributes changed and may need to be rendered.
 		 *
 		 * @readonly
-		 * @member {Set.<core.treeView.Node>} core.treeView.Renderer#markedAttributes
+		 * @member {Set.<engine.treeView.Node>} engine.treeView.Renderer#markedAttributes
 		 */
 		this.markedAttributes = new Set();
 
@@ -44,7 +44,7 @@ export default class Renderer {
 		 * Set of elements which child lists changed and may need to be rendered.
 		 *
 		 * @readonly
-		 * @member {Set.<core.treeView.Node>} core.treeView.Renderer#markedChildren
+		 * @member {Set.<engine.treeView.Node>} engine.treeView.Renderer#markedChildren
 		 */
 		this.markedChildren = new Set();
 
@@ -52,7 +52,7 @@ export default class Renderer {
 		 * Set of text nodes which text data changed and may need to be rendered.
 		 *
 		 * @readonly
-		 * @member {Set.<core.treeView.Node>} core.treeView.Renderer#markedTexts
+		 * @member {Set.<engine.treeView.Node>} engine.treeView.Renderer#markedTexts
 		 */
 		this.markedTexts = new Set();
 	}
@@ -62,12 +62,12 @@ export default class Renderer {
 	 *
 	 * Note that only view nodes which parents have corresponding DOM elements need to be marked to be synchronized.
 	 *
-	 * @see core.treeView.Renderer#markedAttributes
-	 * @see core.treeView.Renderer#markedChildren
-	 * @see core.treeView.Renderer#markedTexts
+	 * @see engine.treeView.Renderer#markedAttributes
+	 * @see engine.treeView.Renderer#markedChildren
+	 * @see engine.treeView.Renderer#markedTexts
 	 *
-	 * @param {core.treeView.ChangeType} type Type of the change.
-	 * @param {core.treeView.Node} node Node to be marked.
+	 * @param {engine.treeView.ChangeType} type Type of the change.
+	 * @param {engine.treeView.Node} node Node to be marked.
 	 */
 	markToSync( type, node ) {
 		if ( type === 'TEXT' ) {
@@ -97,8 +97,8 @@ export default class Renderer {
 	}
 
 	/**
-	 * Render method check {@link core.treeView.Renderer#markedAttributes}, {@link core.treeView.Renderer#markedChildren} and
-	 * {@link core.treeView.Renderer#markedTexts} and updated all nodes which needs to be updated. Then it clear all three
+	 * Render method check {@link engine.treeView.Renderer#markedAttributes}, {@link engine.treeView.Renderer#markedChildren} and
+	 * {@link engine.treeView.Renderer#markedTexts} and updated all nodes which needs to be updated. Then it clear all three
 	 * sets.
 	 *
 	 * Renderer try not to break IME, so it do as little as it is possible to update DOM.
@@ -108,10 +108,10 @@ export default class Renderer {
 	 *
 	 * For text nodes it update the text string if it is different. Note that if parent element is marked as an element
 	 * which changed child list, text node update will not be done, because it may not be possible do find a
-	 * {@link core.treeView.DomConverter#getCorrespondingDomText corresponding DOM text}. The change will be handled in the
+	 * {@link engine.treeView.DomConverter#getCorrespondingDomText corresponding DOM text}. The change will be handled in the
 	 * parent element.
 	 *
-	 * For nodes which changed child list it calculates a {@link diff} using {@link core.treeView.DomConverter#compareNodes}
+	 * For nodes which changed child list it calculates a {@link diff} using {@link engine.treeView.DomConverter#compareNodes}
 	 * and add or removed nodes which changed.
 	 */
 	render() {

+ 6 - 6
packages/ckeditor5-engine/src/treeview/text.js

@@ -10,8 +10,8 @@ import Node from './node.js';
 /**
  * Tree view text node.
  *
- * @memberOf core.treeView
- * @extends core.treeView.Node
+ * @memberOf engine.treeView
+ * @extends engine.treeView.Node
  */
 export default class Text extends Node {
 	/**
@@ -25,10 +25,10 @@ export default class Text extends Node {
 		/**
 		 * The text content.
 		 *
-		 * Setting the data fires the {@link core.treeView.Node#event:change change event}.
+		 * Setting the data fires the {@link engine.treeView.Node#event:change change event}.
 		 *
 		 * @private
-		 * @member {String} core.treeView.Text#_data
+		 * @member {String} engine.treeView.Text#_data
 		 */
 		this._data = data;
 	}
@@ -36,7 +36,7 @@ export default class Text extends Node {
 	/**
 	 * Clones this node.
 	 *
-	 * @returns {core.treeView.Text} Text node that is a clone of this node.
+	 * @returns {engine.treeView.Text} Text node that is a clone of this node.
 	 */
 	clone() {
 		return new Text( this.data );
@@ -61,7 +61,7 @@ export default class Text extends Node {
 	 * Checks if this text node is similar to other text node.
 	 * Both nodes should have the same data to be considered as similar.
 	 *
-	 * @param {core.treeView.Text} otherNode Node to check if it is same as this node.
+	 * @param {engine.treeView.Text} otherNode Node to check if it is same as this node.
 	 * @returns {Boolean}
 	 */
 	isSimilar( otherNode ) {

+ 24 - 24
packages/ckeditor5-engine/src/treeview/treeview.js

@@ -15,13 +15,13 @@ import utils from '../../utils/utils.js';
 /**
  * TreeView class creates an abstract layer over the content editable area.
  * It combines the actual tree of view elements, tree of DOM elements,
- * {@link core.treeView.DomConverter DOM Converter}, {@link core.treeView.Renderer renderer} and all
- * {@link core.treeView.Observer observers}.
+ * {@link engine.treeView.DomConverter DOM Converter}, {@link engine.treeView.Renderer renderer} and all
+ * {@link engine.treeView.Observer observers}.
  *
  * If you want to only transform the tree of view elements to the DOM elements you can use the
- * {@link core.treeView.DomConverter DomConverter}.
+ * {@link engine.treeView.DomConverter DomConverter}.
  *
- * @memberOf core.treeView
+ * @memberOf engine.treeView
  * @mixes utils.EmitterMixin
  */
 export default class TreeView {
@@ -33,7 +33,7 @@ export default class TreeView {
 		 * Roots of the DOM tree. Map on the `HTMLElement`s with roots names as keys.
 		 *
 		 * @readonly
-		 * @member {Map} core.treeView.TreeView#domRoots
+		 * @member {Map} engine.treeView.TreeView#domRoots
 		 */
 		this.domRoots = new Map();
 
@@ -41,55 +41,55 @@ export default class TreeView {
 		 * Tree View writer.
 		 *
 		 * @readonly
-		 * @member {core.treeView.Writer} core.treeView.TreeView#writer
+		 * @member {engine.treeView.Writer} engine.treeView.TreeView#writer
 		 */
 		this.writer = new Writer();
 
 		/**
-		 * Instance of the {@link core.treeView.DomConverter domConverter} use by
-		 * {@link core.treeView.TreeView#renderer renderer} and {@link core.treeView.observer.Observer observers}.
+		 * Instance of the {@link engine.treeView.DomConverter domConverter} use by
+		 * {@link engine.treeView.TreeView#renderer renderer} and {@link engine.treeView.observer.Observer observers}.
 		 *
 		 * @readonly
-		 * @member {core.treeView.DomConverter} core.treeView.TreeView#domConverter
+		 * @member {engine.treeView.DomConverter} engine.treeView.TreeView#domConverter
 		 */
 		this.domConverter = new DomConverter();
 
 		/**
-		 * Roots of the view tree. Map of the {core.treeView.Element view elements} with roots names as keys.
+		 * Roots of the view tree. Map of the {engine.treeView.Element view elements} with roots names as keys.
 		 *
 		 * @readonly
-		 * @member {Map} core.treeView.TreeView#viewRoots
+		 * @member {Map} engine.treeView.TreeView#viewRoots
 		 */
 		this.viewRoots = new Map();
 
 		/**
-		 * Instance of the {@link core.treeView.TreeView#renderer renderer}.
+		 * Instance of the {@link engine.treeView.TreeView#renderer renderer}.
 		 *
 		 * @readonly
-		 * @member {core.treeView.Renderer} core.treeView.TreeView#renderer
+		 * @member {engine.treeView.Renderer} engine.treeView.TreeView#renderer
 		 */
 		this.renderer = new Renderer( this.domConverter );
 
 		/**
-		 * Set of registered {@link core.treeView.Observer observers}.
+		 * Set of registered {@link engine.treeView.Observer observers}.
 		 *
 		 * @protected
-		 * @member {Set.<core.treeView.Observer>} core.treeView.TreeView_#observers
+		 * @member {Set.<engine.treeView.Observer>} engine.treeView.TreeView_#observers
 		 */
 		this._observers = new Set();
 	}
 
 	/**
-	 * Creates observer of the given type if not yet created, {@link core.treeView.Observer#enable enables} it
-	 * and {@link core.treeView.observer.Observer#observe attaches} to all existing and future
-	 * {@link core.treeView.TreeView#domRoots DOM roots}.
+	 * Creates observer of the given type if not yet created, {@link engine.treeView.Observer#enable enables} it
+	 * and {@link engine.treeView.observer.Observer#observe attaches} to all existing and future
+	 * {@link engine.treeView.TreeView#domRoots DOM roots}.
 	 *
 	 * Note: Observers are recognized by their constructor (classes). A single observer will be instantiated and used only
 	 * when registered for the first time. This means that features and other components can register a single observer
 	 * multiple times without caring whether it has been already added or not.
 	 *
 	 * @param {Function} Observer The constructor of an observer to add.
-	 * Should create an instance inheriting from {@link core.treeView.observer.Observer}.
+	 * Should create an instance inheriting from {@link engine.treeView.observer.Observer}.
 	 */
 	addObserver( Observer ) {
 		if ( this._hasObserver( Observer ) ) {
@@ -108,17 +108,17 @@ export default class TreeView {
 	}
 
 	/**
-	 * Creates a root for the HTMLElement. It adds elements to {@link core.treeView.TreeView#domRoots} and
-	 * {@link core.treeView.TreeView#viewRoots}.
+	 * Creates a root for the HTMLElement. It adds elements to {@link engine.treeView.TreeView#domRoots} and
+	 * {@link engine.treeView.TreeView#viewRoots}.
 	 *
 	 * The constructor copies the element name and attributes to create the
 	 * root of the view, but does not copy its children. This means that while
-	 * {@link core.treeView.TreeView#render rendering}, the whole content of this
+	 * {@link engine.treeView.TreeView#render rendering}, the whole content of this
 	 * root element will be removed but the root name and attributes will be preserved.
 	 *
 	 * @param {HTMLElement} domRoot DOM element in which the tree view should do change.
 	 * @param {String} name Name of the root.
-	 * @returns {core.treeView.element} The created view root element.
+	 * @returns {engine.treeView.element} The created view root element.
 	 */
 	createRoot( domRoot, name ) {
 		const viewRoot = this.domConverter.domToView( domRoot, { bind: true, withChildren: false } );
@@ -178,5 +178,5 @@ utils.mix( TreeView, EmitterMixin );
  * * `ATTRIBUTES` - for element attributes changes,
  * * `TEXT` - for text nodes changes.
  *
- * @typedef {String} core.treeView.ChangeType
+ * @typedef {String} engine.treeView.ChangeType
  */

+ 55 - 55
packages/ckeditor5-engine/src/treeview/writer.js

@@ -15,7 +15,7 @@ import CKEditorError from '../../utils/ckeditorerror.js';
  * Tree View Writer class.
  * Writer defines a high-level API for TreeView manipulations.
  *
- * @memberOf core.treeView
+ * @memberOf engine.treeView
  */
  export default class Writer {
 	constructor() {
@@ -23,7 +23,7 @@ import CKEditorError from '../../utils/ckeditorerror.js';
 		 * Priorities map. Maps node to priority.
 		 * Nodes with priorities are considered as attributes.
 		 *
-		 * @member {WeakMap} core.treeView.Writer#_priorities
+		 * @member {WeakMap} engine.treeView.Writer#_priorities
 		 * @protected
 		 */
 		this._priorities = new WeakMap();
@@ -34,11 +34,11 @@ import CKEditorError from '../../utils/ckeditorerror.js';
 	 *
 	 * `Container` nodes are mostly elements like `<p>` or `<div>`. Break and merge operations are performed only in a
 	 * bounds of a container nodes. Containers will not be broken or merged by
-	 * {@link core.treeView.Writer#breakAttributes breakAttributes} and
-	 * {@link core.treeView.Writer#mergeAttributes mergeAttributes}.
+	 * {@link engine.treeView.Writer#breakAttributes breakAttributes} and
+	 * {@link engine.treeView.Writer#mergeAttributes mergeAttributes}.
 	 *
 	 * `Attribute` nodes are mostly elements like `<b>` or `<span>`. Attributes can be broken and merged. Merging requires
-	 * that attribute nodes are {@link core.treeView.Element#isSimilar similar} and have same priority. Setting different
+	 * that attribute nodes are {@link engine.treeView.Element#isSimilar similar} and have same priority. Setting different
 	 * priorities on similar nodes may prevent merging, eg. two `<abbr>` nodes next ot each other shouldn't be merged.
 	 * There might be a need to mark `<span>` element as a container node, for example in situation when it will be a
 	 * container of an inline widget:
@@ -46,7 +46,7 @@ import CKEditorError from '../../utils/ckeditorerror.js';
 	 * 		<span color="red">foobar</span>  // attribute
 	 * 		<span data-widget>foobar</span>  // container
 	 *
-	 * @param {core.treeView.Element} node Node to check.
+	 * @param {engine.treeView.Element} node Node to check.
 	 * @returns {Boolean} `True` if provided node is a container.
      */
 	isContainer( node ) {
@@ -57,11 +57,11 @@ import CKEditorError from '../../utils/ckeditorerror.js';
 
 	/**
 	 * Returns `true` if provided node is an `attribute` node.
-	 * For more information about attribute and container nodes see {@link core.treeView.Writer#isContainer isContainer}
+	 * For more information about attribute and container nodes see {@link engine.treeView.Writer#isContainer isContainer}
 	 * method description.
 	 *
-	 * @see core.treeView.Writer#isContainer
-	 * @param {core.treeView.Element} node Node to check.
+	 * @see engine.treeView.Writer#isContainer
+	 * @param {engine.treeView.Element} node Node to check.
 	 * @returns {Boolean} `True` if provided node is an attribute.
 	 */
 	isAttribute( node ) {
@@ -73,8 +73,8 @@ import CKEditorError from '../../utils/ckeditorerror.js';
 	/**
 	 * Sets node priority. When priority is defined, node is considered as `attribute`.
 	 *
-	 * @see core.treeView.Writer#isContainer
-	 * @param {core.treeView.Node} node
+	 * @see engine.treeView.Writer#isContainer
+	 * @param {engine.treeView.Node} node
 	 * @param {Number} priority
      */
 	setPriority( node, priority ) {
@@ -84,7 +84,7 @@ import CKEditorError from '../../utils/ckeditorerror.js';
 	/**
 	 * Returns node's priority.
 	 *
-	 * @param {core.treeView.Node} node Node to check its priority.
+	 * @param {engine.treeView.Node} node Node to check its priority.
 	 * @returns {Number|undefined} Priority or `undefined` if there is no priority defined.
      */
 	getPriority( node ) {
@@ -92,11 +92,11 @@ import CKEditorError from '../../utils/ckeditorerror.js';
 	}
 
 	/**
-	 * Returns first parent container of specified {@link core.treeView.Position Position}.
+	 * Returns first parent container of specified {@link engine.treeView.Position Position}.
 	 * Position's parent node is checked as first, then next parents are checked.
 	 *
-	 * @param {core.treeView.Position} position Position used as a start point to locate parent container.
-	 * @returns {core.treeView.Element|undefined} Parent container element or `undefined` if container is not found.
+	 * @param {engine.treeView.Position} position Position used as a start point to locate parent container.
+	 * @returns {engine.treeView.Element|undefined} Parent container element or `undefined` if container is not found.
 	 */
 	getParentContainer( position ) {
 		let parent = position.parent;
@@ -120,11 +120,11 @@ import CKEditorError from '../../utils/ckeditorerror.js';
 	 *		<p>{foo}<b><u>|{bar}</u></b></p> -> <p>{foo}|<b><u>{bar}</u></b></p>
 	 *		<p>{foo}<b><u>{b|ar}</u></b></p> -> <p>{foo}<b><u>{b}</u></b>|<b><u>{ar}</u></b></p>
 	 *
-	 * @see core.treeView.Writer#isContainer
-	 * @see core.treeView.Writer#isAttribute
+	 * @see engine.treeView.Writer#isContainer
+	 * @see engine.treeView.Writer#isAttribute
 	 *
-	 * @param {core.treeView.Position} position Position where to break attributes.
-	 * @returns {core.treeView.Position} New position after breaking the attributes.
+	 * @param {engine.treeView.Position} position Position where to break attributes.
+	 * @returns {engine.treeView.Position} New position after breaking the attributes.
 	 */
 	breakAttributes( position ) {
 		const positionOffset = position.offset;
@@ -202,17 +202,17 @@ import CKEditorError from '../../utils/ckeditorerror.js';
 	}
 
 	/**
-	 * Uses {@link core.treeView.Writer#breakAttributes breakAttribute} method to break attributes on
-	 * {@link core.treeView.Range#start start} and {@link core.treeView.Range#end end} positions of
-	 * provided {@link core.treeView.Range Range}.
+	 * Uses {@link engine.treeView.Writer#breakAttributes breakAttribute} method to break attributes on
+	 * {@link engine.treeView.Range#start start} and {@link engine.treeView.Range#end end} positions of
+	 * provided {@link engine.treeView.Range Range}.
 	 *
 	 * Throws {@link utils.CKEditorError CKEditorError} `treeview-writer-invalid-range-container` when
-	 * {@link core.treeView.Range#start start} and {@link core.treeView.Range#end end} positions are not placed inside
+	 * {@link engine.treeView.Range#start start} and {@link engine.treeView.Range#end end} positions are not placed inside
 	 * same parent container.
 	 *
-	 * @see core.treeView.Writer#breakAttribute
-	 * @param {core.treeView.Range} range Range which `start` and `end` positions will be used to break attributes.
-	 * @returns {core.treeView.Range} New range with located at break positions.
+	 * @see engine.treeView.Writer#breakAttribute
+	 * @param {engine.treeView.Range} range Range which `start` and `end` positions will be used to break attributes.
+	 * @returns {engine.treeView.Range} New range with located at break positions.
 	 */
 	breakRange( range ) {
 		const rangeStart = range.start;
@@ -247,7 +247,7 @@ import CKEditorError from '../../utils/ckeditorerror.js';
 
 	/**
 	 * Merges attribute nodes. It also merges text nodes if needed.
-	 * Only {@link core.treeView.Element#isSimilar similar} `attribute` nodes, with same priority can be merged.
+	 * Only {@link engine.treeView.Element#isSimilar similar} `attribute` nodes, with same priority can be merged.
 	 *
 	 * In following examples `<p>` is a container and `<b>` is an attribute node:
 	 *
@@ -255,10 +255,10 @@ import CKEditorError from '../../utils/ckeditorerror.js';
 	 *		<p><b>{foo}</b>|<b>{bar}</b> -> <p><b>{foo|bar}</b></b>
 	 *		<p><b foo="bar">{a}</b>|<b foo="baz">{b}</b> -> <p><b foo="bar">{a}</b>|<b foo="baz">{b}</b>
 	 *
-	 * @see core.treeView.Writer#isContainer
-	 * @see core.treeView.Writer#isAttribute
-	 * @param {core.treeView.Position} position Merge position.
-	 * @returns {core.treeView.Position} Position after merge.
+	 * @see engine.treeView.Writer#isContainer
+	 * @see engine.treeView.Writer#isAttribute
+	 * @param {engine.treeView.Position} position Merge position.
+	 * @returns {engine.treeView.Position} Position after merge.
 	 */
 	mergeAttributes( position ) {
 		const positionOffset = position.offset;
@@ -317,9 +317,9 @@ import CKEditorError from '../../utils/ckeditorerror.js';
 	 * Insert node or nodes at specified position. Takes care about breaking attributes before insertion
 	 * and merging them afterwards.
 	 *
-	 * @param {core.treeView.Position} position Insertion position.
-	 * @param {core.treeView.Node|Iterable.<core.treeView.Node>} nodes Node or nodes to insert.
-	 * @returns {core.treeView.Range} Range around inserted nodes.
+	 * @param {engine.treeView.Position} position Insertion position.
+	 * @param {engine.treeView.Node|Iterable.<engine.treeView.Node>} nodes Node or nodes to insert.
+	 * @returns {engine.treeView.Range} Range around inserted nodes.
 	 */
 	insert( position, nodes ) {
 		const container = this.getParentContainer( position );
@@ -347,12 +347,12 @@ import CKEditorError from '../../utils/ckeditorerror.js';
 	 * Removes provided range from the container.
 	 *
 	 * Throws {@link utils.CKEditorError CKEditorError} `treeview-writer-invalid-range-container` when
-	 * {@link core.treeView.Range#start start} and {@link core.treeView.Range#end end} positions are not placed inside
+	 * {@link engine.treeView.Range#start start} and {@link engine.treeView.Range#end end} positions are not placed inside
 	 * same parent container.
 	 *
-	 * @param {core.treeView.Range} range Range to remove from container. After removing, it will be updated
+	 * @param {engine.treeView.Range} range Range to remove from container. After removing, it will be updated
 	 * to a collapsed range showing the new position.
-	 * @returns {Array.<core.treeView.Node>} The array of removed nodes.
+	 * @returns {Array.<engine.treeView.Node>} The array of removed nodes.
 	 */
 	remove( range ) {
 		// Range should be placed inside one container.
@@ -392,13 +392,13 @@ import CKEditorError from '../../utils/ckeditorerror.js';
 	 * Moves nodes from provided range to target position.
 	 *
 	 * Throws {@link utils.CKEditorError CKEditorError} `treeview-writer-invalid-range-container` when
-	 * {@link core.treeView.Range#start start} and {@link core.treeView.Range#end end} positions are not placed inside
+	 * {@link engine.treeView.Range#start start} and {@link engine.treeView.Range#end end} positions are not placed inside
 	 * same parent container.
 	 *
-	 * @param {core.treeView.Range} sourceRange Range containing nodes to move.
-	 * @param {core.treeView.Position} targetPosition Position to insert.
-	 * @returns {core.treeView.Range} Range in target container. Inserted nodes are placed between
-	 * {@link core.treeView.Range#start start} and {@link core.treeView.Range#end end} positions.
+	 * @param {engine.treeView.Range} sourceRange Range containing nodes to move.
+	 * @param {engine.treeView.Position} targetPosition Position to insert.
+	 * @returns {engine.treeView.Range} Range in target container. Inserted nodes are placed between
+	 * {@link engine.treeView.Range#start start} and {@link engine.treeView.Range#end end} positions.
 	 */
 	move( sourceRange, targetPosition ) {
 		const nodes = this.remove( sourceRange );
@@ -409,11 +409,11 @@ import CKEditorError from '../../utils/ckeditorerror.js';
 	/**
 	 * Wraps elements within range with provided attribute element.
 	 *
-	 * Throws {@link utils.CKEditorError} `treeview-writer-invalid-range-container` when {@link core.treeView.Range#start}
-	 * and {@link core.treeView.Range#end} positions are not placed inside same parent container.
+	 * Throws {@link utils.CKEditorError} `treeview-writer-invalid-range-container` when {@link engine.treeView.Range#start}
+	 * and {@link engine.treeView.Range#end} positions are not placed inside same parent container.
 	 *
-	 * @param {core.treeView.Range} range Range to wrap.
-	 * @param {core.treeView.Element} attribute Attribute element to use as wrapper.
+	 * @param {engine.treeView.Range} range Range to wrap.
+	 * @param {engine.treeView.Element} attribute Attribute element to use as wrapper.
 	 * @param {Number} priority Priority to set.
 	 */
 	wrap( range, attribute, priority ) {
@@ -461,11 +461,11 @@ import CKEditorError from '../../utils/ckeditorerror.js';
 	 * Unwraps nodes within provided range from attribute element.
 	 *
 	 * Throws {@link utils.CKEditorError CKEditorError} `treeview-writer-invalid-range-container` when
-	 * {@link core.treeView.Range#start start} and {@link core.treeView.Range#end end} positions are not placed inside
+	 * {@link engine.treeView.Range#start start} and {@link engine.treeView.Range#end end} positions are not placed inside
 	 * same parent container.
 	 *
-	 * @param {core.treeView.Range} range
-	 * @param {core.treeView.Element} element
+	 * @param {engine.treeView.Range} range
+	 * @param {engine.treeView.Element} element
 	 */
 	unwrap( range, attribute ) {
 		// Range should be placed inside one container.
@@ -507,11 +507,11 @@ import CKEditorError from '../../utils/ckeditorerror.js';
 // `startOffset` and `endOffset` will be unwrapped.
 //
 // @private
-// @param {core.treeView.Writer} writer
-// @param {core.treeView.Element} parent
+// @param {engine.treeView.Writer} writer
+// @param {engine.treeView.Element} parent
 // @param {Number} startOffset
 // @param {Number} endOffset
-// @param {core.treeView.Element} attribute
+// @param {engine.treeView.Element} attribute
 function unwrapChildren( writer, parent, startOffset, endOffset, attribute ) {
 	let i = startOffset;
 	const unwrapPositions = [];
@@ -576,11 +576,11 @@ function unwrapChildren( writer, parent, startOffset, endOffset, attribute ) {
 // `startOffset` and `endOffset` will be wrapped.
 
 // @private
-// @param {core.treeView.Writer} writer
-// @param {core.treeView.Element} parent
+// @param {engine.treeView.Writer} writer
+// @param {engine.treeView.Element} parent
 // @param {Number} startOffset
 // @param {Number} endOffset
-// @param {core.treeView.Element} attribute
+// @param {engine.treeView.Element} attribute
 function wrapChildren( writer, parent, startOffset, endOffset, attribute ) {
 	let i = startOffset;
 	const wrapPositions = [];

+ 1 - 1
packages/ckeditor5-engine/src/utils-diff.js

@@ -14,7 +14,7 @@
  *
  *		diff( 'aba', 'acca' ); // [ EQUAL, INSERT, INSERT, DELETE, EQUAL ]
  *
- * @method core.diff
+ * @method engine.diff
  * @param {Array} a Input array.
  * @param {Array} b Output array.
  * @param {Function} [cmp] Optional function used to compare array values, by default === is used.

+ 1 - 1
packages/ckeditor5-engine/tests/treemodel/_utils/utils.js

@@ -15,7 +15,7 @@ const utils = {
 	 *		let element = new Element( 'div', [], [ 'abc', new Element( 'p', [], 'foo' ), 'xyz' ] );
 	 *		treemodelUtils.getNodesAndText( element ); // abcPfooPxyz
 	 *
-	 * @param {core.treeModel.Range} range Range to stringify.
+	 * @param {engine.treeModel.Range} range Range to stringify.
 	 * @returns {String} String representing element inner structure.
 	 */
 	getNodesAndText( range ) {

+ 1 - 1
packages/ckeditor5-engine/tests/treemodel/operation/operation.js

@@ -27,7 +27,7 @@ describe( 'Operation', () => {
 		let parsedIn = JSON.parse( JSON.stringify( opInDelta ) );
 		let parsedOutside = JSON.parse( JSON.stringify( opOutsideDelta ) );
 
-		expect( parsedIn.delta ).to.equal( '[core.treeModel.Delta]' );
+		expect( parsedIn.delta ).to.equal( '[engine.treeModel.Delta]' );
 		expect( parsedOutside.delta ).to.be.null;
 	} );
 } );

+ 6 - 6
packages/ckeditor5-engine/tests/treeview/writer/_utils/utils.js

@@ -11,10 +11,10 @@ const utils = {
 	/**
 	 * Helper function that is used to create treeView elements from description object.
 	 *
-	 * @param {core.treeView.Writer} writer Writer instance. Used to set priorities.
+	 * @param {engine.treeView.Writer} writer Writer instance. Used to set priorities.
 	 * @param {Object} description Description object.
-	 * @param {core.treeView.Range} [range] Optional parameter, used in recurrent calls.
-	 * @param {core.treeView.Position} [position] Optional parameter, used in recurrent calls.
+	 * @param {engine.treeView.Range} [range] Optional parameter, used in recurrent calls.
+	 * @param {engine.treeView.Position} [position] Optional parameter, used in recurrent calls.
 	 * @returns {Object} Returns object with `node`, `range`, `position` fields, containing created node and, optionally
 	 * range and position if description object contain information about them.
 	 */
@@ -98,10 +98,10 @@ const utils = {
 	 * 		}
 	 *
 	 *
-	 * @param {core.treeView.Writer} writer Writer instance. Used to test priority.
-	 * @param {core.treeView.Range|core.treeView.Position } location Range instance or Position instance.
+	 * @param {engine.treeView.Writer} writer Writer instance. Used to test priority.
+	 * @param {engine.treeView.Range|engine.treeView.Position } location Range instance or Position instance.
 	 * Treated as Range when when `rangeStart`, `rangeEnd` is used, treated as Position when `position` is used.
-	 * @param {core.treeView.Node} node Element to check.
+	 * @param {engine.treeView.Node} node Element to check.
 	 * @param {Object} description Object describing expected element and its children.
 	 */
 	test( writer, location, node, description ) {