Browse Source

Documentation: probably all done.

Maciej Gołaszewski 9 years ago
parent
commit
a0093c7f9c

+ 4 - 4
packages/ckeditor5-engine/src/ckeditor.js

@@ -12,16 +12,14 @@ import Config from './config.js';
 /**
  * This is the API entry point. The entire CKEditor code runs under this object.
  *
- * @class CKEDITOR
- * @singleton
+ * @namespace CKEDITOR
  */
-
 const CKEDITOR = {
 	/**
 	 * A collection containing all editor instances created.
 	 *
 	 * @readonly
-	 * @type {Collection}
+	 * @member {core.Collection} CKEDITOR.instances
 	 */
 	instances: new Collection(),
 
@@ -37,6 +35,7 @@ const CKEDITOR = {
 	 *			// Manipulate "editor" here.
 	 *		} );
 	 *
+	 * @method CKEDITOR.create
 	 * @param {String|HTMLElement} element An element selector or a DOM element, which will be the source for the
 	 * created instance.
 	 * @returns {Promise} A promise, which will be fulfilled with the created editor.
@@ -75,6 +74,7 @@ const CKEDITOR = {
 	/**
 	 * Holds global configuration defaults, which will be used by editor instances when such configurations are not
 	 * available on them directly.
+	 * @member {core.Config} CKEDITOR.config
 	 */
 	config: new Config()
 };

+ 5 - 4
packages/ckeditor5-engine/src/ckeditorerror.js

@@ -13,17 +13,15 @@
  *
  * Read more in the {@link core.log} module.
  *
- * @class CKEditorError
+ * @memberOf core
  * @extends Error
  */
-
 export default class CKEditorError extends Error {
 	/**
 	 * Creates an instance of the CKEditorError class.
 	 *
 	 * Read more about error logging in the {@link core.log} module.
 	 *
-	 * @constructor
 	 * @param {String} message The error message in an `error-name: Error message.` format.
 	 * During the minification process the "Error message" part will be removed to limit the code size
 	 * and a link to this error documentation will be added to the `message`.
@@ -38,12 +36,15 @@ export default class CKEditorError extends Error {
 
 		super( message );
 
+		/**
+		 * @member {String} core.CKEditorError#name
+		 */
 		this.name = 'CKEditorError';
 
 		/**
 		 * The additional error data passed to the constructor.
 		 *
-		 * @type {Object}
+		 * @member {Object} core.CKEditorError#data
 		 */
 		this.data = data;
 	}

+ 5 - 5
packages/ckeditor5-engine/src/collection.js

@@ -19,15 +19,13 @@ import utils from './utils.js';
  * By default an item in the collection is identified by its `id` property. The name of the identifier can be
  * configured through the constructor of the collection.
  *
- * @class Collection
+ * @memberOf core
  * @mixes EventEmitter
  */
-
 export default class Collection {
 	/**
 	 * Creates a new Collection instance.
 	 *
-	 * @constructor
 	 * @param {Iterable} [items] Items to be added to the collection.
 	 * @param {Object} options The options object.
 	 * @param {String} [options.idProperty='id'] The name of the property which is considered to identify an item.
@@ -76,6 +74,7 @@ export default class Collection {
 	 * @param {Object} item
 	 * @param {Number} [index] The position of the item in the collection. The item
 	 * is pushed to the collection when `index` not specified.
+	 * @fires {@link core.Collection.add add}
 	 */
 	add( item, index ) {
 		let itemId;
@@ -157,6 +156,7 @@ export default class Collection {
 	 *
 	 * @param {Object|Number|String} subject The item to remove, its id or index in the collection.
 	 * @returns {Object} The removed item.
+	 * @fires {@link core.Collection.remove remove}
 	 */
 	remove( subject ) {
 		let index, id, item;
@@ -270,13 +270,13 @@ utils.mix( Collection, EmitterMixin );
 /**
  * Fired when an item is added to the collection.
  *
- * @event add
+ * @event core.Collection.add
  * @param {Object} item The added item.
  */
 
 /**
  * Fired when an item is removed from the collection.
  *
- * @event remove
+ * @event core.Collection.remove
  * @param {Object} item The removed item.
  */

+ 3 - 5
packages/ckeditor5-engine/src/config.js

@@ -13,16 +13,14 @@ import utils from './utils.js';
 /**
  * Handles a configuration dictionary.
  *
- * @class core.Config
+ * @memberOf core
  * @mixes core.ObservableMixin
  */
-
 export default class Config {
 	/**
 	 * Creates an instance of the {@link Config} class.
 	 *
 	 * @param {Object} [configurations] The initial configurations to be set.
-	 * @constructor
 	 */
 	constructor( configurations ) {
 		if ( configurations ) {
@@ -63,7 +61,7 @@ export default class Config {
 	 *     config.toolbar.collapsed; // true
 	 *     config.toolbar.color; // 'red'
 	 *
-	 * @param {String|Object} nameOrConfigurations The configuration name or an object from which take properties as
+	 * @param {String|Object} name The configuration name or an object from which take properties as
 	 * configuration entries. Configuration names are case-insensitive.
 	 * @param {*} [value=null] The configuration value. Used if a name is passed to nameOrConfigurations.
 	 */
@@ -171,7 +169,7 @@ export default class Config {
 	 * This method is supposed to be called by plugin developers to setup plugin's configurations. It would be
 	 * rarely used for other needs.
 	 *
-	 * @param {String|Object} nameOrConfigurations The configuration name or an object from which take properties as
+	 * @param {String|Object} name The configuration name or an object from which take properties as
 	 * configuration entries.
 	 * @param {*} [value] The configuration value. Used if a name is passed to nameOrConfigurations. If undefined,
 	 * the configuration is set to `null`.

+ 2 - 12
packages/ckeditor5-engine/src/creator.js

@@ -10,24 +10,21 @@ import Plugin from './plugin.js';
 /**
  * Basic creator class.
  *
- * @class core.Creator
+ * @memberOf core
  * @extends core.Plugin
  */
-
 export default class Creator extends Plugin {
 	/**
 	 * The element used to {@link core.Creator#_replaceElement _replaceElement} the editor element.
 	 *
-	 * @member core.Creator#_elementReplacement
 	 * @private
-	 * @type {HTMLElement}
+	 * @member {HTMLElement} core.Creator#_elementReplacement
 	 */
 
 	/**
 	 * The creator's trigger. This method is called by the editor to finalize
 	 * the editor creation.
 	 *
-	 * @method core.Creator#create
 	 * @returns {Promise}
 	 */
 	create() {
@@ -41,7 +38,6 @@ export default class Creator extends Plugin {
 	/**
 	 * Method called by the editor on its destruction. It should destroy what the creator created.
 	 *
-	 * @method core.Creator#destroy
 	 * @returns {Promise}
 	 */
 	destroy() {
@@ -68,7 +64,6 @@ export default class Creator extends Plugin {
 	/**
 	 * Updates the {@link core.Editor#element editor element}'s content with the data.
 	 *
-	 * @method core.Creator#updateEditorElement
 	 */
 	updateEditorElement() {
 		Creator.setDataInElement( this.editor.element, this.editor.getData() );
@@ -77,7 +72,6 @@ export default class Creator extends Plugin {
 	/**
 	 * Loads the data from the {@link core.Editor#element editor element} to the editable.
 	 *
-	 * @method core.Creator#loadDataFromEditorElement
 	 */
 	loadDataFromEditorElement() {
 		this.editor.setData( Creator.getDataFromElement( this.editor.element ) );
@@ -86,7 +80,6 @@ export default class Creator extends Plugin {
 	/**
 	 * Gets data from a given source element.
 	 *
-	 * @method core.Creator.getDataFromElement
 	 * @param {HTMLElement} el The element from which the data will be retrieved.
 	 * @returns {String} The data string.
 	 */
@@ -101,7 +94,6 @@ export default class Creator extends Plugin {
 	/**
 	 * Sets data in a given element.
 	 *
-	 * @method core.Creator.setDataInElement
 	 * @param {HTMLElement} el The element in which the data will be set.
 	 * @param {String} data The data string.
 	 */
@@ -119,7 +111,6 @@ export default class Creator extends Plugin {
 	 *
 	 * The effect of this method will be automatically reverted by {@link core.Creator#destroy destroy}.
 	 *
-	 * @method core.Creator#_replaceElement
 	 * @protected
 	 * @param {HTMLElement} [newElement] The replacement element. If not passed, then the main editor's UI view element
 	 * will be used.
@@ -140,7 +131,6 @@ export default class Creator extends Plugin {
 	/**
 	 * Restores what the {@link core.Creator#_replaceElement _replaceElement} did.
 	 *
-	 * @method core.Creator#_restoreElement
 	 * @protected
 	 */
 	_restoreElement() {

+ 3 - 4
packages/ckeditor5-engine/src/editor.js

@@ -15,10 +15,9 @@ import utils from './utils.js';
 /**
  * Represents a single editor instance.
  *
- * @class core.Editor
+ * @memberOf core
  * @mixes core.ObservableMixin
  */
-
 export default class Editor {
 	/**
 	 * Creates a new instance of the Editor class.
@@ -27,7 +26,6 @@ export default class Editor {
 	 * {@link CKEDITOR#create CKEDITOR.create() method}.
 	 *
 	 * @param {HTMLElement} element The DOM element that will be the source for the created editor.
-	 * @constructor
 	 */
 	constructor( element, config ) {
 		/**
@@ -133,7 +131,7 @@ export default class Editor {
 	 * Destroys the editor instance, releasing all resources used by it. If the editor replaced an element, the
 	 * element will be recovered.
 	 *
-	 * @fires destroy
+	 * @fires {@link core.Editor.destroy destroy}
 	 * @returns {Promise} A promise that resolves once the editor instance is fully destroyed.
 	 */
 	destroy() {
@@ -166,6 +164,7 @@ utils.mix( Editor, ObservableMixin );
  * Fired when this editor instance is destroyed. The editor at this point is not usable and this event should be used to
  * perform the clean-up in any plugin.
  *
+ * @memberOf core.Editor
  * @event destroy
  */
 

+ 5 - 6
packages/ckeditor5-engine/src/editorconfig.js

@@ -11,16 +11,15 @@ import Config from './config.js';
 /**
  * Handles a configuration dictionary for an editor instance.
  *
- * The basic difference between {@link EditorConfig} and {@link Config} is that {@link EditorConfig#get} retrieves
+ * The basic difference between {@link core.EditorConfig} and {@link core.Config} is that {@link core.EditorConfig#get} retrieves
  * configurations from {@link CKEDITOR#config} if they are not found.
  *
- * @class EditorConfig
- * @extends Config
+ * @memberOf core
+ * @extends core.Config
  */
-
 export default class EditorConfig extends Config {
 	/**
-	 * @inheritdoc core.Config#get
+	 * @inheritDoc
 	 */
 	get() {
 		// Try to take it from this editor instance.
@@ -33,4 +32,4 @@ export default class EditorConfig extends Config {
 
 		return value;
 	}
-}
+}

+ 2 - 2
packages/ckeditor5-engine/src/editorui.js

@@ -12,7 +12,7 @@ import ObservableMixin from './observablemixin.js';
 /**
  * Base class for the editor main view controllers.
  *
- * @class core.EditorUI
+ * @memberOf core
  * @extends core.ui.Controller
  * @mixes core.ObservableMixin
  */
@@ -23,7 +23,7 @@ export default class EditorUI extends Controller {
 
 		/**
 		 * @readonly
-		 * @type {core.Editor}
+		 * @member {core.Editor} core.EditorUI.editor
 		 */
 		this.editor = editor;
 	}

+ 6 - 0
packages/ckeditor5-engine/src/emittermixin.js

@@ -28,6 +28,7 @@ const EmitterMixin = {
 	 * event.
 	 * @param {Number} [priority=10] The priority of this callback in relation to other callbacks to that same event.
 	 * Lower values are called first.
+	 * @method core.EmitterMixin#on
 	 */
 	on( event, callback, ctx, priority ) {
 		const callbacks = getCallbacks( this, event );
@@ -67,6 +68,7 @@ const EmitterMixin = {
 	 * event.
 	 * @param {Number} [priority=10] The priority of this callback in relation to other callbacks to that same event.
 	 * Lower values are called first.
+	 * @method core.EmitterMixin#once
 	 */
 	once( event, callback, ctx, priority ) {
 		const onceCallback = function( event ) {
@@ -88,6 +90,7 @@ const EmitterMixin = {
 	 * @param {Function} callback The function to stop being called.
 	 * @param {Object} [ctx] The context object to be removed, pared with the given callback. To handle cases where
 	 * the same callback is used several times with different contexts.
+	 * @method core.EmitterMixin#off
 	 */
 	off( event, callback, ctx ) {
 		const callbacks = getCallbacksIfAny( this, event );
@@ -116,6 +119,7 @@ const EmitterMixin = {
 	 * @param {Object} [ctx] The object that represents `this` in the callback. Defaults to `emitter`.
 	 * @param {Number} [priority=10] The priority of this callback in relation to other callbacks to that same event.
 	 * Lower values are called first.
+	 * @method core.EmitterMixin#listenTo
 	 */
 	listenTo( emitter, event, callback, ctx, priority ) {
 		let emitters, emitterId, emitterInfo, eventCallbacks;
@@ -172,6 +176,7 @@ const EmitterMixin = {
 	 * for all events from `emitter`.
 	 * @param {Function} [callback] (Requires the `event`) The function to be removed from the call list for the given
 	 * `event`.
+	 * @method core.EmitterMixin#stopListening
 	 */
 	stopListening( emitter, event, callback ) {
 		let emitters = this._listeningTo;
@@ -219,6 +224,7 @@ const EmitterMixin = {
 	 *
 	 * @param {String} event The name of the event.
 	 * @param {...*} [args] Additional arguments to be passed to the callbacks.
+	 * @method core.EmitterMixin#fire
 	 */
 	fire( event, args ) {
 		const callbacks = getCallbacksIfAny( this, event );

+ 7 - 4
packages/ckeditor5-engine/src/eventinfo.js

@@ -11,18 +11,21 @@ import utils from './utils.js';
  * The event object passed to event callbacks. It is used to provide information about the event as well as a tool to
  * manipulate it.
  *
- * @class EventInfo
+ * @memberOf core
  */
-
 export default class EventInfo {
 	constructor( source, name ) {
 		/**
 		 * The object that fired the event.
+		 *
+		 * @member core.EventInfo#source
 		 */
 		this.source = source;
 
 		/**
 		 * The event name.
+		 *
+		 * @member core.EventInfo#name
 		 */
 		this.name = name;
 
@@ -31,14 +34,14 @@ export default class EventInfo {
 		/**
 		 * Stops the event emitter to call further callbacks for this event interaction.
 		 *
-		 * @method
+		 * @method core.EventInfo#stop
 		 */
 		this.stop = utils.spy();
 
 		/**
 		 * Removes the current callback from future interactions of this event.
 		 *
-		 * @method
+		 * @method core.EventInfo#off
 		 */
 		this.off = utils.spy();
 	}

+ 4 - 4
packages/ckeditor5-engine/src/log.js

@@ -35,10 +35,8 @@
  * log an error.
  * * Whenever it's really bad and it does not make sense to continue working, throw a {@link core.CKEditorError}.
  *
- * @class log
- * @singleton
+ * @namespace core.log
  */
-
 const log = {
 	/**
 	 * Logs an error to the console.
@@ -49,6 +47,7 @@ const log = {
 	 * During the minification process the "Error message" part will be removed to limit the code size
 	 * and a link to this error documentation will be logged to the console.
 	 * @param {Object} [data] Additional data describing the error.
+	 * @method core.log.error
 	 */
 	error( message, data ) {
 		console.error( message, data );
@@ -63,10 +62,11 @@ const log = {
 	 * During the minification process the "Warning message" part will be removed to limit the code size
 	 * and a link to this error documentation will be logged to the console.
 	 * @param {Object} [data] Additional data describing the warning.
+	 * @method core.log.warn
 	 */
 	warn( message, data ) {
 		console.warn( message, data );
 	}
 };
 
-export default log;
+export default log;

+ 21 - 17
packages/ckeditor5-engine/src/observablemixin.js

@@ -18,12 +18,10 @@ const boundAttributesSymbol = Symbol( 'boundAttributes' );
  * Mixin that injects the "observable attributes" and data binding functionality.
  * Used mainly in the {@link core.ui.Model} class.
  *
- * @singleton
- * @class core.ObservableMixin
+ * @mixin core.ObservableMixin
  * @mixes core.EmitterMixin
  * @implements core.Observable
  */
-
 const ObservableMixin = {
 	/**
 	 * Creates and sets the value of an observable attribute of this object. Such an attribute becomes a part
@@ -35,6 +33,7 @@ const ObservableMixin = {
 	 * have a property with a given attribute name. This prevents from mistakenly overriding existing
 	 * properties and methods, but means that `foo.set( 'bar', 1 )` may be slightly slower than `foo.bar = 1`.
 	 *
+	 * @method core.ObservableMixin#set
 	 * @param {String} name The attributes name.
 	 * @param {*} value The attributes value.
 	 */
@@ -103,15 +102,16 @@ const ObservableMixin = {
 	 * of the observable it is bound to and react to the changes to these attributes
 	 * in the future.
 	 *
-	 * **Note**: To release the binding use {@link #unbind}.
+	 * **Note**: To release the binding use {@link core.ObservableMixin#unbind}.
 	 *
 	 *		A.bind( 'a' ).to( B );
 	 *		A.bind( 'a' ).to( B, 'b' );
 	 *		A.bind( 'a', 'b' ).to( B, 'c', 'd' );
 	 *		A.bind( 'a' ).to( B, 'b', C, 'd', ( b, d ) => b + d );
 	 *
+	 * @method core.ObservableMixin#bind
 	 * @param {String...} bindAttrs Observable attributes that will be bound to another observable(s).
-	 * @returns {BindChain}
+	 * @returns {core.BindChain}
 	 */
 	bind( ...bindAttrs ) {
 		if ( !bindAttrs.length || !isStringArray( bindAttrs ) ) {
@@ -150,7 +150,7 @@ const ObservableMixin = {
 		const bindings = new Map();
 
 		/**
-		 * @typedef Binding
+		 * @typedef core.Binding
 		 * @type Object
 		 * @property {Array} attr Attribute which is bound.
 		 * @property {Array} to Array of observable–attribute components of the binding (`{ observable: ..., attr: .. }`).
@@ -164,13 +164,14 @@ const ObservableMixin = {
 		} );
 
 		/**
-		 * @typedef BindChain
+		 * @typedef core.BindChain
 		 * @type Object
-		 * @property {Function} to See {@link #_bindTo}.
+		 * @property {Function} to See {@link core.ObservableMixin#_bindTo}.
 		 * @property {Observable} _observable The observable which initializes the binding.
 		 * @property {Array} _bindAttrs Array of `_observable` attributes to be bound.
 		 * @property {Array} _to Array of `to()` observable–attributes (`{ observable: toObservable, attrs: ...toAttrs }`).
-		 * @property {Map} _bindings Stores bindings to be kept in {@link #_boundAttributes}/{@link #_boundObservables}
+		 * @property {Map} _bindings Stores bindings to be kept in
+		 *  {@link core.ObservableMixin#_boundAttributes}/{@link core.ObservableMixin#_boundObservables}
 		 * initiated in this binding chain.
 		 */
 		return {
@@ -184,12 +185,13 @@ const ObservableMixin = {
 	},
 
 	/**
-	 * Removes the binding created with {@link #bind}.
+	 * Removes the binding created with {@link core.ObservableMixin#bind}.
 	 *
 	 *		A.unbind( 'a' );
 	 *		A.unbind();
 	 *
-	 * @param {String} [bindAttrs] Observable attributes to be unbound. All the bindings will
+	 * @method core.ObservableMixin#unbind
+	 * @param {String} [unbindAttrs] Observable attributes to be unbound. All the bindings will
 	 * be released if no attributes provided.
 	 */
 	unbind( ...unbindAttrs ) {
@@ -268,9 +270,9 @@ function initObservable( observable ) {
 	} );
 
 	// Map containing bindings to external observables. It shares the binding objects
-	// (`{ observable: A, attr: 'a', to: ... }`) with {@link #_boundAttributes} and
+	// (`{ observable: A, attr: 'a', to: ... }`) with {@link core.ObservableMixin#_boundAttributes} and
 	// it is used to observe external observables to update own attributes accordingly.
-	// See {@link #bind}.
+	// See {@link core.ObservableMixin#bind}.
 	//
 	//		A.bind( 'a', 'b', 'c' ).to( B, 'x', 'y', 'x' );
 	//		console.log( A._boundObservables );
@@ -317,9 +319,11 @@ function initObservable( observable ) {
 	} );
 
 	// Object that stores which attributes of this observable are bound and how. It shares
-	// the binding objects (`{ observable: A, attr: 'a', to: ... }`) with {@link #_boundObservables}.
-	// This data structure is a reverse of {@link #_boundObservables} and it is helpful for {@link #unbind}.
-	// See {@link #bind}.
+	// the binding objects (`{ observable: A, attr: 'a', to: ... }`) with {@link core.ObservableMixin#_boundObservables}.
+	// This data structure is a reverse of {@link core.ObservableMixin#_boundObservables} and it is helpful for
+	// {@link core.ObservableMixin#unbind}.
+	//
+	// See {@link core.ObservableMixin#bind}.
 	//
 	//		A.bind( 'a', 'b', 'c' ).to( B, 'x', 'y', 'x' );
 	//		console.log( A._boundAttributes );
@@ -347,7 +351,7 @@ function initObservable( observable ) {
 	} );
 }
 
-// A chaining for {@link #bind} providing `.to()` interface.
+// A chaining for {@link core.ObservableMixin#bind} providing `.to()` interface.
 //
 // @private
 // @param {...[Observable|String|Function]} args Arguments of the `.to( args )` binding.

+ 3 - 4
packages/ckeditor5-engine/src/plugin.js

@@ -11,10 +11,9 @@ import utils from './utils.js';
 /**
  * The base class for CKEditor plugin classes.
  *
- * @class core.Plugin
+ * @memberOf core
  * @mixes core.ObservableMixin
  */
-
 export default class Plugin {
 	/**
 	 * Creates a new Plugin instance.
@@ -24,7 +23,7 @@ export default class Plugin {
 	constructor( editor ) {
 		/**
 		 * @readonly
-		 * @type {core.Editor}
+		 * @member {core.Editor} core.Plugin#editor
 		 */
 		this.editor = editor;
 	}
@@ -43,7 +42,7 @@ export default class Plugin {
 	 *		}
 	 *
 	 * @static
-	 * @type {Function[]}
+	 * @member {Function[]} core.Plugin.requires
 	 */
 
 	/**

+ 5 - 7
packages/ckeditor5-engine/src/plugincollection.js

@@ -13,26 +13,24 @@ import load from '../load.js';
 /**
  * Manages a list of CKEditor plugins, including loading, resolving dependencies and initialization.
  *
- * @class PluginCollection
+ * @memberOf core
  */
-
 export default class PluginCollection {
 	/**
 	 * Creates an instance of the PluginCollection class, initializing it with a set of plugins.
 	 *
-	 * @constructor
 	 * @param {core.Editor} editor
 	 */
 	constructor( editor ) {
 		/**
 		 * @protected
-		 * @type {core.Editor}
+		 * @member {core.Editor} core.PluginCollection#_editor
 		 */
 		this._editor = editor;
 
 		/**
 		 * @protected
-		 * @type {Map}
+		 * @member {Map} core.PluginCollection#_plugins
 		 */
 		this._plugins = new Map();
 	}
@@ -49,7 +47,7 @@ export default class PluginCollection {
 	 * Gets the plugin instance by its name or class.
 	 *
 	 * @param {String/Function} key The name of the plugin or the class.
-	 * @returns {Plugin}
+	 * @returns {core.Plugin}
 	 */
 	get( key ) {
 		return this._plugins.get( key );
@@ -169,7 +167,7 @@ export default class PluginCollection {
 	 *
 	 * @protected
 	 * @param {String/Function} key The name or the plugin class.
-	 * @param {Plugin} plugin The instance of the plugin.
+	 * @param {core.Plugin} plugin The instance of the plugin.
 	 */
 	_add( key, plugin ) {
 		this._plugins.set( key, plugin );

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

@@ -80,7 +80,7 @@ export default class Element extends Node {
 	 * Gets child at the given index.
 	 *
 	 * @param {Number} index Index of child.
-	 * @returns {treeView.Node} Child node.
+	 * @returns {core.treeView.Node} Child node.
 	 */
 	getChild( index ) {
 		return this._children[ index ];

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

@@ -26,7 +26,7 @@ export default class Node {
 		 * Parent element. Null by default. Set by {@link core.treeView.Element#insertChildren}.
 		 *
 		 * @readonly
-		 * @member {treeView.Element|null} core.treeView.Node
+		 * @member {core.treeView.Element|null} core.treeView.Node#parent
 		 */
 		this.parent = null;
 
@@ -34,7 +34,7 @@ export default class Node {
 		 * {@link core.treeView.TreeView} reference.
 		 *
 		 * @protected
-		 * @member {treeView.TreeView} core.treeView.Node
+		 * @member {core.treeView.TreeView} core.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 {treeView.Node|null} 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.
 	 */
 	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 {treeView.Node|null} 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.
 	 */
 	getPreviousSibling() {
 		const index = this.getIndex();
@@ -93,7 +93,7 @@ export default class Node {
 	 * {@link core.treeView.Node#setTreeView} it will be returned. Otherwise {@link core.treeView.TreeView} of the parents node
 	 * will be returned. If node has no parent, `null` will be returned.
 	 *
-	 * @returns {treeView.TreeView|null} Tree view of the node, tree view of the parent or null.
+	 * @returns {core.treeView.TreeView|null} Tree view of the node, tree view of the parent or null.
 	 */
 	getTreeView() {
 		if ( this._treeView ) {
@@ -109,15 +109,15 @@ 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}.
 	 *
-	 * @param {treeView.TreeView} treeView Tree view.
+	 * @param {core.treeView.TreeView} treeView Tree view.
 	 */
 	setTreeView( treeView ) {
 		this._treeView = treeView;
 	}
 
 	/**
-	 * @param {treeView.ChangeType} type Type of the change.
-	 * @param {treeView.Node} node Changed node.
+	 * @param {core.treeView.ChangeType} type Type of the change.
+	 * @param {core.treeView.Node} node Changed node.
 	 * @fires {@link core.treeView.Node#change change event}.
 	 */
 	_fireChange( type, node ) {
@@ -137,8 +137,8 @@ export default class Node {
 	 * Change event is bubbling, it is fired on the ancestors chain.
 	 *
 	 * @event core.treeView.Node#change
-	 * @param {treeView.ChangeType} Type of the change.
-	 * @param {treeView.Node} Changed node.
+	 * @param {core.treeView.ChangeType} Type of the change.
+	 * @param {core.treeView.Node} Changed node.
 	 */
 }
 

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

@@ -82,7 +82,7 @@ export default class TreeView {
 	 * {@link core.treeView.Observer#attach attaches} the observer.
 	 *
 	 * @method core.treeView.TreeView#addObserver
-	 * @param {treeView.Observer} observer Observer to add.
+	 * @param {core.treeView.Observer} observer Observer to add.
 	 */
 	addObserver( observer ) {
 		this.observers.add( observer );

+ 2 - 0
packages/ckeditor5-engine/src/ui/template.js

@@ -263,6 +263,7 @@ export default class Template {
  * can be used in the context of DOM Node to set or reset `textContent`.
  * @see core.ui.View#_getModelBinder
  *
+ * @ignore
  * @private
  * @param {Node} node DOM Node to be modified.
  * @returns {Object}
@@ -284,6 +285,7 @@ function getTextNodeUpdater( node ) {
  * can be used in the context of DOM Node to set or reset an attribute.
  * @see core.ui.View#_getModelBinder
  *
+ * @ignore
  * @private
  * @param {Node} node DOM Node to be modified.
  * @param {String} attrName Name of the attribute to be modified.

+ 4 - 0
packages/ckeditor5-engine/src/ui/view.js

@@ -624,6 +624,7 @@ const validSelectorTypes = new Set( [ 'string', 'boolean', 'function' ] );
 /**
  * Check whether region selector is valid.
  *
+ * @ignore
  * @private
  * @param {*} selector Selector to be checked.
  * @returns {Boolean}
@@ -643,6 +644,7 @@ function isValidRegionSelector( selector ) {
  *
  * 		{ attributeName/text: [ 'bar', { model: ..., modelAttributeName: ... }, 'baz' ] }
  *
+ * @ignore
  * @private
  * @param {core.ui.TemplateValueSchema} valueSchema
  * @returns {Array}
@@ -655,6 +657,7 @@ function normalizeBinderValueSchema( valueSchema ) {
  * Checks whether given {@link core.ui.TemplateValueSchema} contains a
  * {@link core.ui.ViewModelBinding}.
  *
+ * @ignore
  * @private
  * @param {core.ui.TemplateValueSchema} valueSchema
  * @returns {Boolean}
@@ -673,6 +676,7 @@ function hasModelBinding( valueSchema ) {
  * A helper which concatenates the value avoiding unwanted
  * leading white spaces.
  *
+ * @ignore
  * @private
  * @param {String} prev
  * @param {String} cur

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

@@ -14,6 +14,7 @@
  *
  *		diff( 'aba', 'acca' ); // [ EQUAL, INSERT, INSERT, DELETE, EQUAL ]
  *
+ * @method core.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.

+ 18 - 8
packages/ckeditor5-engine/src/utils.js

@@ -7,13 +7,6 @@
 
 import isPlainObject from './lib/lodash/isPlainObject.js';
 
-/**
- * An index at which arrays differ. If arrays are same at all indexes, it represents how arrays are related.
- * In this case, possible values are: 'SAME', 'PREFIX' or 'EXTENSION'.
- *
- * @typedef {String|Number} utils.ArrayRelation
- */
-
 /**
  * @namespace core.utils
  */
@@ -25,7 +18,7 @@ const utils = {
 	 *
 	 *  * spy.called: property set to `true` if the function has been called at least once.
 	 *
-	 * @member core.utils.spy
+	 * @memberOf core.utils
 	 * @returns {Function} The spy function.
 	 */
 	spy() {
@@ -38,6 +31,8 @@ const utils = {
 	 * Returns a unique id. This id is a number (starting from 1) which will never get repeated on successive calls
 	 * to this method.
 	 *
+	 * @function
+	 * @memberOf core.utils
 	 * @returns {Number} A number representing the id.
 	 */
 	uid: ( () => {
@@ -51,6 +46,7 @@ const utils = {
 	/**
 	 * Checks if value implements iterator interface.
 	 *
+	 * @memberOf core.utils
 	 * @param {*} value The value to check.
 	 * @returns {Boolean} True if value implements iterator interface.
 	 */
@@ -70,6 +66,7 @@ const utils = {
 	 *   compareArrays( [ 0, 2 ], [ 1, 2 ] ); // 0
 	 *   compareArrays( [ 0, 2 ], [ 0, 1 ] ); // 1
 	 *
+	 * @memberOf core.utils
 	 * @param {Array} a Array that is compared.
 	 * @param {Array} b Array to compare with.
 	 * @returns {utils.ArrayRelation} How array `a` is related to `b`.
@@ -103,6 +100,7 @@ const utils = {
 	 *		const map = utils.objectToMap( { 'foo': 1, 'bar': 2 } );
 	 *		map.get( 'foo' ); // 1
 	 *
+	 * @memberOf core.utils
 	 * @param {Object} obj Object to transform.
 	 * @returns {Map} Map created from object.
 	 */
@@ -123,6 +121,7 @@ const utils = {
 	 *		map = utils.toMap( [ [ 'foo', 1 ], [ 'bar', 2 ] ] );
 	 *		map = utils.toMap( anotherMap );
 	 *
+	 * @memberOf core.utils
 	 * @param {Object|Iterable} data Object or iterable to transform.
 	 * @returns {Map} Map created from data.
 	 */
@@ -137,6 +136,7 @@ const utils = {
 	/**
 	 * Checks whether given {Map}s are equal, that is has same size and same key-value pairs.
 	 *
+	 * @memberOf core.utils
 	 * @returns {Boolean} `true` if given maps are equal, `false` otherwise.
 	 */
 	mapsEqual( mapA, mapB ) {
@@ -159,6 +159,7 @@ const utils = {
 	/**
 	 * Returns `nth` (starts from `0` of course) item of an `iterable`.
 	 *
+	 * @memberOf core.utils
 	 * @param {Number} index
 	 * @param {Iterable.<*>} iterable
 	 * @returns {*}
@@ -194,6 +195,7 @@ const utils = {
 	 *
 	 * Note: Properties which already exist in the base class will not be overriden.
 	 *
+	 * @memberOf core.utils
 	 * @param {Function} [baseClass] Class which prototype will be extended.
 	 * @param {Object} [...mixins] Objects from which to get properties.
 	 */
@@ -214,4 +216,12 @@ const utils = {
 	}
 };
 
+/**
+ * An index at which arrays differ. If arrays are same at all indexes, it represents how arrays are related.
+ * In this case, possible values are: 'SAME', 'PREFIX' or 'EXTENSION'.
+ *
+ * @memberOf core.utils
+ * @typedef {String|Number} ArrayRelation
+ */
+
 export default utils;