8
0
Szymon Cofalik 10 лет назад
Родитель
Сommit
1a8e539a30

+ 3 - 3
packages/ckeditor5-utils/src/document/document.js

@@ -41,7 +41,7 @@ CKEDITOR.define( [
 
 			/**
 			 * Document version. It starts from 0 and every operation increase the version. It is used to ensure that
-			 * operations is applied on the proper document version. If the {@link document.Operation#baseVersion} will
+			 * operations is applied on the proper document version. If the {@link document.operations.Operation#baseVersion} will
 			 * not match document version an {@link document-applyOperation-wrong-version} error is fired.
 			 *
 			 * @readonly
@@ -53,7 +53,7 @@ CKEDITOR.define( [
 		/**
 		 * This is the only entry point for all document changes.
 		 *
-		 * @param {document.Operation} operation Operation to be applied.
+		 * @param {document.operations.Operation} operation Operation to be applied.
 		 */
 		applyOperation( operation ) {
 			if ( operation.baseVersion !== this.version ) {
@@ -62,7 +62,7 @@ CKEDITOR.define( [
 				 *
 				 * @error document-applyOperation-wrong-version
 				 * @param {document.Document} doc
-				 * @param {document.Operation} operation
+				 * @param {document.operations.Operation} operation
 				 * @param {Number} baseVersion
 				 * @param {Number} documentVersion
 				 */

+ 2 - 2
packages/ckeditor5-utils/src/document/element.js

@@ -51,7 +51,7 @@ CKEDITOR.define( [ 'document/node', 'document/nodelist' ], function( Node, NodeL
 		 * Insert a list of child nodes on the given index and set the parent of these node to this.
 		 *
 		 * Note that list of children can be modified only in elements not attached yet to the document.
-		 * All attached nodes should be modified using the {@link document.InsertOperation}.
+		 * All attached nodes should be modified using the {@link document.operations.InsertOperation}.
 		 *
 		 * @param {Number} index Position where nodes should be inserted.
 		 * @param {document.Node|document.Text|document.NodeList|String|Iterable} nodes List of nodes to be inserted.
@@ -69,7 +69,7 @@ CKEDITOR.define( [ 'document/node', 'document/nodelist' ], function( Node, NodeL
 		 * Removes number of child nodes starting at the given index and set the parent of these node to null.
 		 *
 		 * Note that list of children can be modified only in elements not attached yet to the document.
-		 * All attached nodes should be modified using the {@link document.RemoveOperation}.
+		 * All attached nodes should be modified using the {@link document.operations.RemoveOperation}.
 		 *
 		 * @param {Number} index Position of the first node to remove.
 		 * @param {Number} number Number of nodes to remove.

+ 1 - 1
packages/ckeditor5-utils/src/document/nodelist.js

@@ -13,7 +13,7 @@ CKEDITOR.define( [
 ], function( Character, Text, Node, utils ) {
 	/**
 	 * List of nodes. It is used to represent multiple nodes with a given order, for example children of
-	 * {@link document.Element} object or nodes inserted using {@link document.InsertOperation}.
+	 * {@link document.Element} object or nodes inserted using {@link document.operations.InsertOperation}.
 	 *
 	 * Thanks to the constructor, which accepts various arguments, this class lets you easily create desired list of nodes.
 	 *

+ 6 - 6
packages/ckeditor5-utils/src/document/operations/changeoperation.js

@@ -9,7 +9,7 @@ CKEDITOR.define( [ 'document/operations/operation', 'ckeditorerror' ], function(
 	/**
 	 * Operation to change nodes attribute. Using this class you can add, remove or change value of the attribute.
 	 *
-	 * @class document.ChangeOperation
+	 * @class document.operations.ChangeOperation
 	 */
 	class ChangeOperation extends Operation {
 		/**
@@ -59,7 +59,7 @@ CKEDITOR.define( [ 'document/operations/operation', 'ckeditorerror' ], function(
 		}
 
 		/**
-		 * See {@link document.Operation#_execute}.
+		 * See {@link document.operations.Operation#_execute}.
 		 */
 		_execute() {
 			var oldAttr = this.oldAttr;
@@ -71,7 +71,7 @@ CKEDITOR.define( [ 'document/operations/operation', 'ckeditorerror' ], function(
 				 * Old and new attributes should have the same keys.
 				 *
 				 * @error operation-change-different-keys
-				 * @param {document.ChangeOperation} changeOperation
+				 * @param {document.operations.ChangeOperation} changeOperation
 				 * @param {document.Attribute} oldAttr
 				 * @param {document.Attribute} newAttr
 				 */
@@ -88,7 +88,7 @@ CKEDITOR.define( [ 'document/operations/operation', 'ckeditorerror' ], function(
 						 * The attribute which should be removed does not exists for given node.
 						 *
 						 * @error operation-change-no-attr-to-remove
-						 * @param {document.ChangeOperation} changeOperation
+						 * @param {document.operations.ChangeOperation} changeOperation
 						 * @param {document.Node} node
 						 * @param {document.Attribute} attr
 						 */
@@ -113,7 +113,7 @@ CKEDITOR.define( [ 'document/operations/operation', 'ckeditorerror' ], function(
 						 * The attribute with given key already exists for given node.
 						 *
 						 * @error operation-change-attr-exists
-						 * @param {document.ChangeOperation} changeOperation
+						 * @param {document.operations.ChangeOperation} changeOperation
 						 * @param {document.Node} node
 						 * @param {document.Attribute} attr
 						 */
@@ -128,7 +128,7 @@ CKEDITOR.define( [ 'document/operations/operation', 'ckeditorerror' ], function(
 		}
 
 		/**
-		 * See {@link document.Operation#getReversed}.
+		 * See {@link document.operations.Operation#getReversed}.
 		 */
 		getReversed() {
 			return new ChangeOperation( this.range, this.newAttr, this.oldAttr, this.baseVersion + 1 );

+ 3 - 3
packages/ckeditor5-utils/src/document/operations/insertoperation.js

@@ -13,7 +13,7 @@ CKEDITOR.define( [
 	/**
 	 * Operation to insert list of nodes on the given position.
 	 *
-	 * @class document.InsertOperation
+	 * @class document.operations.InsertOperation
 	 */
 	class InsertOperation extends Operation {
 		/**
@@ -46,14 +46,14 @@ CKEDITOR.define( [
 		}
 
 		/**
-		 * See {@link document.Operation#_execute}.
+		 * See {@link document.operations.Operation#_execute}.
 		 */
 		_execute() {
 			this.position.parent.insertChildren( this.position.offset, this.nodeList );
 		}
 
 		/**
-		 * See {@link document.Operation#getReversed}.
+		 * See {@link document.operations.Operation#getReversed}.
 		 */
 		getReversed() {
 			// Because of circular dependencies we need to re-require remove operation here.

+ 7 - 7
packages/ckeditor5-utils/src/document/operations/moveoperation.js

@@ -14,7 +14,7 @@ CKEDITOR.define( [
 	/**
 	 * Operation to move list of following nodes from the one position in the document to another.
 	 *
-	 * @class document.MoveOperation
+	 * @class document.operations.MoveOperation
 	 */
 	class MoveOperation extends Operation {
 		/**
@@ -52,7 +52,7 @@ CKEDITOR.define( [
 		}
 
 		/**
-		 * See {@link document.Operation#_execute}.
+		 * See {@link document.operations.Operation#_execute}.
 		 */
 		_execute() {
 			var sourceElement = this.sourcePosition.parent;
@@ -68,7 +68,7 @@ CKEDITOR.define( [
 				 * Source position or target position is invalid.
 				 *
 				 * @error operation-move-position-invalid
-				 * @param {document.MoveOperation} moveOperation
+				 * @param {document.operations.MoveOperation} moveOperation
 				 */
 				throw new CKEditorError(
 					'operation-move-position-invalid: Source position or target position is invalid.',
@@ -79,7 +79,7 @@ CKEDITOR.define( [
 				 * The nodes which should be moved do not exist.
 				 *
 				 * @error operation-move-nodes-do-not-exist
-				 * @param {document.MoveOperation} moveOperation
+				 * @param {document.operations.MoveOperation} moveOperation
 				 */
 				throw new CKEditorError(
 					'operation-move-nodes-do-not-exist: The nodes which should be moved do not exist.',
@@ -90,7 +90,7 @@ CKEDITOR.define( [
 				 * Trying to move a range of nodes into the middle of that range.
 				 *
 				 * @error operation-move-range-into-itself
-				 * @param {document.MoveOperation} moveOperation
+				 * @param {document.operations.MoveOperation} moveOperation
 				 */
 				throw new CKEditorError(
 					'operation-move-range-into-itself: Trying to move a range of nodes to the inside of that range.',
@@ -108,7 +108,7 @@ CKEDITOR.define( [
 						 * Trying to move a range of nodes into one of nodes from that range.
 						 *
 						 * @error operation-move-node-into-itself
-						 * @param {document.MoveOperation} moveOperation
+						 * @param {document.operations.MoveOperation} moveOperation
 						 */
 						throw new CKEditorError(
 							'operation-move-node-into-itself: Trying to move a range of nodes into one of nodes from that range.',
@@ -131,7 +131,7 @@ CKEDITOR.define( [
 		}
 
 		/**
-		 * See {@link document.Operation#getReversed}.
+		 * See {@link document.operations.Operation#getReversed}.
 		 */
 		getReversed() {
 			return new MoveOperation( this.targetPosition, this.sourcePosition, this.howMany, this.baseVersion + 1 );

+ 4 - 4
packages/ckeditor5-utils/src/document/operations/operation.js

@@ -9,7 +9,7 @@ CKEDITOR.define( [], function() {
 	/**
 	 * Abstract base operation class.
 	 *
-	 * @class document.Operation
+	 * @class document.operations.Operation
 	 */
 	class Operation {
 		/**
@@ -51,7 +51,7 @@ CKEDITOR.define( [], function() {
 			 * This method has to be defined in deriving operation class.
 			 *
 			 * @method getReversed
-			 * @returns {document.Operation} Reversed operation.
+			 * @returns {document.operations.Operation} Reversed operation.
 			 */
 
 			/**
@@ -71,8 +71,8 @@ CKEDITOR.define( [], function() {
 			 * This method has to be defined in deriving operation class.
 			 *
 			 * @method getTransformedBy
-			 * @param {document.Operation} operation Operation by which this operation will be transformed.
-			 * @returns {document.Operation} A result of transformation of this operation by the given operation.
+			 * @param {document.operations.Operation} operation Operation by which this operation will be transformed.
+			 * @returns {document.operations.Operation} A result of transformation of this operation by the given operation.
 			 */
 		}
 	}

+ 6 - 4
packages/ckeditor5-utils/src/document/operations/reinsertoperation.js

@@ -11,16 +11,18 @@ CKEDITOR.define( [
 ], function( MoveOperation ) {
 	/**
 	 * Operation to reinsert previously removed nodes back to the non-graveyard root.
-	 * This is basically MoveOperation but it returns RemoveOperation when reversed.
-	 * We achieve two goals: by having separate classes it's easier to distinguish whether move
+	 * This is basically {@link document.operations.MoveOperation} but it returns
+	 * {@link document.operations.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.
 	 *
-	 * @class document.ReinsertOperation
+	 * @class document.operations.ReinsertOperation
 	 */
 	class ReinsertOperation extends MoveOperation {
 		/**
-		 * See {@link document.Operation#getReversed}.
+		 * See {@link document.operations.Operation#getReversed}.
 		 */
 		getReversed() {
 			// Because of circular dependencies we need to re-require reinsert operation here.

+ 2 - 2
packages/ckeditor5-utils/src/document/operations/removeoperation.js

@@ -13,7 +13,7 @@ CKEDITOR.define( [
 	/**
 	 * Operation to remove a range of nodes.
 	 *
-	 * @class document.RemoveOperation
+	 * @class document.operations.RemoveOperation
 	 */
 	class RemoveOperation extends MoveOperation {
 		/**
@@ -36,7 +36,7 @@ CKEDITOR.define( [
 		}
 
 		/**
-		 * See {@link document.Operation#getReversed}.
+		 * See {@link document.operations.Operation#getReversed}.
 		 */
 		getReversed() {
 			// Because of circular dependencies we need to re-require reinsert operation here.