8
0
Oskar Wróbel 8 лет назад
Родитель
Сommit
93bbabf08e

+ 5 - 5
packages/ckeditor5-engine/src/model/batch.js

@@ -10,21 +10,21 @@
 /**
  * `Batch` instance groups model changes ({@link module:engine/model/delta/delta~Delta deltas}). All deltas grouped in a single `Batch`
  * can be reverted together, so you can think about `Batch` as of a single undo step. If you want to extend given undo step you
- * can add more changes to the batch using {@link module:engine/model~model#enqueueChange}:
+ * can add more changes to the batch using {@link module:engine/model/model~Model#enqueueChange}:
  *
  *		model.enqueueChange( batch, writer => {
  *			writer.insertText( 'foo', paragraph, 'end' );
  *		} );
  *
- * @see module:engine/model~model#enqueueChange
- * @see module:engine/model~model#change
+ * @see module:engine/model/model~Model#enqueueChange
+ * @see module:engine/model/model~Model#change
  */
 export default class Batch {
 	/**
 	 * Creates `Batch` instance.
 	 *
-	 * @see module:engine/model~model#enqueueChange
-	 * @see module:engine/model~model#change
+	 * @see module:engine/model/model~Model#enqueueChange
+	 * @see module:engine/model/model~Model#change
 	 * @param {'transparent'|'default'} [type='default'] Type of the batch.
 	 */
 	constructor( type = 'default' ) {

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

@@ -14,7 +14,7 @@ import Range from '../range';
 
 /**
  * To provide specific OT behavior and better collisions solving, methods to change attributes
- * ({@link module:engine/model/batch~Batch#setAttribute} and {@link module:engine/model/batch~Batch#removeAttribute})
+ * ({@link module:engine/model/writer~Writer#setAttribute} and {@link module:engine/model/writer~Writer#removeAttribute})
  * use `AttributeDelta` class which inherits from the `Delta` class and may overwrite some methods.
  *
  * @extends module:engine/model/delta/delta~Delta

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

@@ -12,7 +12,7 @@ import RemoveDelta from './removedelta';
 import DeltaFactory from './deltafactory';
 
 /**
- * To provide specific OT behavior and better collisions solving, the {@link module:engine/model/batch~Batch#insert Batch#insert} method
+ * To provide specific OT behavior and better collisions solving, the {@link module:engine/model/writer~Writer#insert Batch#insert} method
  * uses the `InsertDelta` class which inherits from the `Delta` class and may overwrite some methods.
  *
  * @extends module:engine/model/delta/delta~Delta

+ 2 - 2
packages/ckeditor5-engine/src/model/delta/markerdelta.js

@@ -11,8 +11,8 @@ import Delta from './delta';
 import DeltaFactory from './deltafactory';
 
 /**
- * To provide specific OT behavior and better collisions solving, the {@link module:engine/model/batch~Batch#setMarker Batch#setMarker}
- * and {@link module:engine/model/batch~Batch#removeMarker Batch#removeMarker} methods use the `MarkerDelta` class which inherits
+ * To provide specific OT behavior and better collisions solving, the {@link module:engine/model/writer~Writer#setMarker Batch#setMarker}
+ * and {@link module:engine/model/writer~Writer#removeMarker Batch#removeMarker} methods use the `MarkerDelta` class which inherits
  * from the `Delta` class and may overwrite some methods.
  *
  * @extends module:engine/model/delta/delta~Delta

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

@@ -12,7 +12,7 @@ import DeltaFactory from './deltafactory';
 import SplitDelta from './splitdelta';
 
 /**
- * To provide specific OT behavior and better collisions solving, {@link module:engine/model/batch~Batch#merge} method
+ * To provide specific OT behavior and better collisions solving, {@link module:engine/model/writer~Writer#merge} method
  * uses the `MergeDelta` class which inherits from the `Delta` class and may overwrite some methods.
  *
  * @extends module:engine/model/delta/delta~Delta

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

@@ -11,7 +11,7 @@ import Delta from './delta';
 import DeltaFactory from './deltafactory';
 
 /**
- * To provide specific OT behavior and better collisions solving, {@link module:engine/model/batch~Batch#move} method
+ * To provide specific OT behavior and better collisions solving, {@link module:engine/model/writer~Writer#move} method
  * uses the `MoveDelta` class which inherits from the `Delta` class and may overwrite some methods.
  *
  * @extends module:engine/model/delta/delta~Delta

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

@@ -11,7 +11,7 @@ import MoveDelta from './movedelta';
 import DeltaFactory from './deltafactory';
 
 /**
- * To provide specific OT behavior and better collisions solving, {@link module:engine/model/batch~Batch#remove} method
+ * To provide specific OT behavior and better collisions solving, {@link module:engine/model/writer~Writer#remove} method
  * uses the `RemoveDelta` class which inherits from the `Delta` class and may overwrite some methods.
  *
  * @extends module:engine/model/delta/delta~Delta

+ 1 - 1
packages/ckeditor5-engine/src/model/delta/renamedelta.js

@@ -11,7 +11,7 @@ import Delta from './delta';
 import DeltaFactory from './deltafactory';
 
 /**
- * To provide specific OT behavior and better collisions solving, the {@link module:engine/model/batch~Batch#rename Batch#rename} method
+ * To provide specific OT behavior and better collisions solving, the {@link module:engine/model/writer~Writer#rename Batch#rename} method
  * uses the `RenameDelta` class which inherits from the `Delta` class and may overwrite some methods.
  *
  * @extends module:engine/model/delta/delta~Delta

+ 1 - 1
packages/ckeditor5-engine/src/model/delta/rootattributedelta.js

@@ -12,7 +12,7 @@ import DeltaFactory from './deltafactory';
 
 /**
  * To provide specific OT behavior and better collisions solving, methods to change attributes
- * ({@link module:engine/model/batch~Batch#setAttribute} and {@link module:engine/model/batch~Batch#removeAttribute})
+ * ({@link module:engine/model/writer~Writer#setAttribute} and {@link module:engine/model/writer~Writer#removeAttribute})
  * use `RootAttributeDelta` class which inherits from the `Delta` class and may
  * overwrite some methods.
  *

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

@@ -13,7 +13,7 @@ import MoveOperation from '../operation/moveoperation';
 import MergeDelta from '../delta/mergedelta';
 
 /**
- * To provide specific OT behavior and better collisions solving, the {@link module:engine/model/batch~Batch#split} method
+ * To provide specific OT behavior and better collisions solving, the {@link module:engine/model/writer~Writer#split} method
  * uses `SplitDelta` class which inherits from the `Delta` class and may overwrite some methods.
  *
  * @extends module:engine/model/delta/delta~Delta

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

@@ -12,7 +12,7 @@ import DeltaFactory from './deltafactory';
 import WrapDelta from './wrapdelta';
 
 /**
- * To provide specific OT behavior and better collisions solving, {@link module:engine/model/batch~Batch#merge} method
+ * To provide specific OT behavior and better collisions solving, {@link module:engine/model/writer~Writer#merge} method
  * uses the `UnwrapDelta` class which inherits from the `Delta` class and may overwrite some methods.
  *
  * @extends module:engine/model/delta/delta~Delta

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

@@ -11,7 +11,7 @@ import InsertDelta from './insertdelta';
 import DeltaFactory from './deltafactory';
 
 /**
- * To provide specific OT behavior and better collisions solving, the {@link module:engine/model/batch~Batch#insert} method
+ * To provide specific OT behavior and better collisions solving, the {@link module:engine/model/writer~Writer#insert} method
  * uses the `WeakInsertDelta` class which inherits from the `Delta` class and may overwrite some methods.
  *
  * @extends module:engine/model/delta/delta~Delta

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

@@ -13,7 +13,7 @@ import UnwrapDelta from './unwrapdelta';
 import Range from '../range';
 
 /**
- * To provide specific OT behavior and better collisions solving, {@link module:engine/model/batch~Batch#merge} method
+ * To provide specific OT behavior and better collisions solving, {@link module:engine/model/writer~Writer#merge} method
  * uses the `WrapDelta` class which inherits from the `Delta` class and may overwrite some methods.
  *
  * @extends module:engine/model/delta/delta~Delta

+ 14 - 12
packages/ckeditor5-engine/src/model/model.js

@@ -17,14 +17,15 @@ import mix from '@ckeditor/ckeditor5-utils/src/mix';
 
 /**
  * Editors data model class. Model defines all data: either nodes users see in editable roots, grouped as the
- * {@link #document}, and all detached nodes, used to data manipulation. All of them are
- * created and modified by the {@link module:engine/model/model~Writer}, which can be get using
- * {@link #change} or {@link #enqueueChange} methods.
+ * {@link module:engine/model/model~Model#document}, and all detached nodes, used to data manipulation. All of them are
+ * created and modified by the {@link module:engine/model/writer~Writer}, which can be get using
+ * {@link module:engine/model/model~Model#change} or {@link module:engine/model/model~Model#enqueueChange} methods.
  */
 export default class Model {
 	constructor() {
 		/**
-		 * All callbacks added by {@link #change} or {@link #enqueueChange} methods waiting to be executed.
+		 * All callbacks added by {@link module:engine/model/model~Model#change} or
+		 * {@link module:engine/model/model~Model#enqueueChange} methods waiting to be executed.
 		 *
 		 * @private
 		 * @type {Array.<Function>}
@@ -58,7 +59,7 @@ export default class Model {
 
 	/**
 	 * Change method is the primary way of changing the model. You should use it to modify any node, including detached
-	 * nodes, not added to the {@link #document}.
+	 * nodes, not added to the {@link module:engine/model/model~Model#document}.
 	 *
 	 *		model.change( writer => {
 	 *			writer.insertText( 'foo', paragraph, 'end' );
@@ -132,7 +133,7 @@ export default class Model {
 	 *
 	 * @fires event:change
 	 * @fires event:changesDone
-	 * @param {[<module:engine/model/batch~Batch|String>]} batchOrType Batch or batch type should be used in the callback.
+	 * @param {module:engine/model/batch~Batch|String} batchOrType Batch or batch type should be used in the callback.
 	 * If not defined new batch will be created.
 	 * @param {Function} callback Callback function which may modify the model.
 	 */
@@ -152,8 +153,8 @@ export default class Model {
 	}
 
 	/**
-	 * Common part of {@link #change} and {@link #enqueueChange} which calls callbacks and returns array of values
-	 * returned by these callbacks.
+	 * Common part of {@link module:engine/model/model~Model#change} and {@link module:engine/model/model~Model#enqueueChange}
+	 * which calls callbacks and returns array of values returned by these callbacks.
 	 *
 	 * @private
 	 * @returns {Array.<*>} Array of values returned by callbacks.
@@ -179,8 +180,8 @@ export default class Model {
 	}
 
 	/**
-	 * {@link #decorate Decorated} function to apply {@link module:engine/model/operation/operation~Operation operations}
-	 * on the model.
+	 * {@link module:utils/observablemixin~ObservableMixin#decorate Decorated} function to apply
+	 * {@link module:engine/model/operation/operation~Operation operations} on the model.
 	 *
 	 * @param {module:engine/model/operation/operation~Operation} operation Operation to apply
 	 * @returns {Object} Object with additional information about the applied changes. It properties depends on the
@@ -199,8 +200,9 @@ export default class Model {
 	}
 
 	/**
-	 * Fires after leaving each {@link #enqueueChange} block or outermost {@link #change} block.
-	 * Have the same parameters as {@link module:engine/model/document~Document#change}.
+	 * Fires after leaving each {@link module:engine/model/model~Model#enqueueChange} block or outermost
+	 * {@link module:engine/model/model~Model#change} block.
+	 * Have the same parameters as {@link module:engine/model/model~Model#change}.
 	 *
 	 * @event change
 	 */

+ 2 - 2
packages/ckeditor5-engine/src/model/node.js

@@ -30,9 +30,9 @@ import CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';
  * 3. Change `Node` that was already added to the model using `Batch` API.
  *
  * Similarly, you cannot use `Batch` API on a node that has not been added to the model tree, with the exception
- * of {@link module:engine/model/batch~Batch#insert inserting} that node to the model tree.
+ * of {@link module:engine/model/writer~Writer#insert inserting} that node to the model tree.
  *
- * Be aware that using {@link module:engine/model/batch~Batch#remove remove from Batch API} does not allow to use `Node` API because
+ * Be aware that using {@link module:engine/model/writer~Writer#remove remove from Batch API} does not allow to use `Node` API because
  * the information about `Node` is still kept in model document.
  *
  * In case of {@link module:engine/model/element~Element element node}, adding and removing children also counts as changing a node and

+ 1 - 1
packages/ckeditor5-engine/src/model/operation/operation.js

@@ -22,7 +22,7 @@ export default class Operation {
 	constructor( baseVersion ) {
 		/**
 		 * {@link module:engine/model/document~Document#version} on which operation can be applied. If you try to
-		 * {@link module:engine/model/document~Document#applyOperation apply} operation with different base version than the
+		 * {@link module:engine/model/model~Model#applyOperation apply} operation with different base version than the
 		 * {@link module:engine/model/document~Document#version document version} the
 		 * {@link module:utils/ckeditorerror~CKEditorError model-document-applyOperation-wrong-version} error is thrown.
 		 *

+ 1 - 1
packages/ckeditor5-engine/src/model/operation/transform.js

@@ -34,7 +34,7 @@ import compareArrays from '@ckeditor/ckeditor5-utils/src/comparearrays';
  *
  * Whenever the {@link module:engine/model/document~Document document}
  * has different {@link module:engine/model/document~Document#version}
- * than the operation you want to {@link module:engine/model/document~Document#applyOperation apply}, you need to transform that
+ * than the operation you want to {@link module:engine/model/model~Model#applyOperation apply}, you need to transform that
  * operation by all operations which were already applied to the {@link module:engine/model/document~Document document} and have greater
  * {@link module:engine/model/document~Document#version} 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

+ 9 - 9
packages/ckeditor5-engine/src/model/writer.js

@@ -42,8 +42,8 @@ import CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';
 
 /**
  * Model writer it the proper way of modifying model. It should be used whenever you wants to create node, modify
- * child nodes, attributes or text. To get writer use {@link module:engine/model~model#change} or
- * {@link @see module:engine/model~model#enqueueChange}.
+ * child nodes, attributes or text. To get writer use {@link module:engine/model/model~Model#change} or
+ * {@link @see module:engine/model/model~Model#enqueueChange}.
  *
  *		model.change( writer => {
  *			writer.insertText( 'foo', paragraph, 'end' );
@@ -52,15 +52,15 @@ import CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';
  * Note that writer can be passed to a nested function but you should never store and use it outside the `change` or
  * `enqueueChange` block.
  *
- * @see module:engine/model/model~model#change
- * @see module:engine/model/model~model#enqueueChange
+ * @see module:engine/model/model~Model#change
+ * @see module:engine/model/model~Model#enqueueChange
  */
 export default class Writer {
 	/**
 	 * Writer class constructor.
 	 *
 	 * It is not recommended to use it directly, use {@link module:engine/model/model~Model#change} or
-	 * {@link module:engine/model/model~Model#enqueueChanges} instead.
+	 * {@link module:engine/model/model~Model#enqueueChange} instead.
 	 *
 	 * @protected
 	 * @param {module:engine/model/model~Model} model
@@ -141,7 +141,7 @@ export default class Writer {
 	 * Note that if the item already has parent it will be removed from the previous parent.
 	 *
 	 * If you want to move {@link module:engine/model/range~Range range} instead of an
-	 * {@link module:engine/model/item~Item item} use {@link module:engine/model/batch~Batch#move move}.
+	 * {@link module:engine/model/item~Item item} use {@link module:engine/model/writer~Writer#move move}.
 	 *
 	 * @param {module:engine/model/item~Item|module:engine/model/documentfragment~DocumentFragment}
 	 * item Item or document fragment to insert.
@@ -259,7 +259,7 @@ export default class Writer {
 	 * Note that if the item already has parent it will be removed from the previous parent.
 	 *
 	 * If you want to move {@link module:engine/model/range~Range range} instead of an
-	 * {@link module:engine/model/item~Item item} use {@link module:engine/model/batch~Batch#move move}.
+	 * {@link module:engine/model/item~Item item} use {@link module:engine/model/writer~Writer#move move}.
 	 *
 	 * @param {module:engine/model/item~Item|module:engine/model/documentfragment~DocumentFragment}
 	 * item Item or document fragment to insert.
@@ -396,7 +396,7 @@ export default class Writer {
 	 * Note that items can be moved only within the same tree. It means that you can move items within the same root
 	 * (element or document fragment) or between {@link module:engine/model/document~Document#roots documents roots},
 	 * but you can not move items from document fragment to the document or from one detached element to another. Use
-	 * {@link module:engine/model/batch~Batch#insert} in such cases.
+	 * {@link module:engine/model/writer~Writer#insert} in such cases.
 	 *
 	 * @param {module:engine/model/range~Range} range Source range.
 	 * @param {module:engine/model/item~Item|module:engine/model/position~Position} itemOrPosition
@@ -427,7 +427,7 @@ export default class Writer {
 		if ( !isSameTree( range.root, position.root ) ) {
 			/**
 			 * Range is going to be moved within not the same document. Please use
-			 * {@link module:engine/model/batch~Batch#insert insert} instead.
+			 * {@link module:engine/model/writer~Writer#insert insert} instead.
 			 *
 			 * @error writer-move-different-document
 			 */