8
0
Просмотр исходного кода

Update paths after removing "tree" from "treeModel" and "treeView".

Piotr Jasiun 9 лет назад
Родитель
Сommit
a4ed15a4c4

+ 13 - 13
src/command/attributecommand.js

@@ -6,17 +6,17 @@
 'use strict';
 'use strict';
 
 
 import Command from './command.js';
 import Command from './command.js';
-import TreeWalker from '../engine/treemodel/treewalker.js';
-import Range from '../engine/treemodel/range.js';
+import TreeWalker from '../engine/model/treewalker.js';
+import Range from '../engine/model/range.js';
 
 
 /**
 /**
  * An extension of basic {@link ckeditor5.command.Command} class, which provides utilities for a command that sets a single
  * An extension of basic {@link ckeditor5.command.Command} class, which provides utilities for a command that sets a single
- * attribute on a text or element with value `true`. AttributeCommand uses {@link engine.treeModel.Document#selection} to
+ * attribute on a text or element with value `true`. AttributeCommand uses {@link engine.model.Document#selection} to
  * decide which nodes (if any) should be changed, and applies or removes attributes from them.
  * decide which nodes (if any) should be changed, and applies or removes attributes from them.
- * See {@link engine.treeView.Converter#execute} for more.
+ * See {@link engine.view.Converter#execute} for more.
  *
  *
- * The command checks {@link engine.treeModel.Document#schema} to decide if it should be enabled.
- * See {@link engine.treeView.Converter#checkSchema} for more.
+ * The command checks {@link engine.model.Document#schema} to decide if it should be enabled.
+ * See {@link engine.view.Converter#checkSchema} for more.
  *
  *
  * @memberOf ckeditor5.command
  * @memberOf ckeditor5.command
  */
  */
@@ -51,7 +51,7 @@ export default class AttributeCommand extends Command {
 	}
 	}
 
 
 	/**
 	/**
-	 * Checks {@link engine.treeModel.Document#schema} to decide if the command should be enabled:
+	 * Checks {@link engine.model.Document#schema} to decide if the command should be enabled:
 	 * * if selection is on range, the command is enabled if any of nodes in that range can have bold,
 	 * * if selection is on range, the command is enabled if any of nodes in that range can have bold,
 	 * * if selection is collapsed, the command is enabled if text with bold is allowed in that node.
 	 * * if selection is collapsed, the command is enabled if text with bold is allowed in that node.
 	 *
 	 *
@@ -76,7 +76,7 @@ export default class AttributeCommand extends Command {
 
 
 				// Walk the range.
 				// Walk the range.
 				while ( !step.done ) {
 				while ( !step.done ) {
-					// If returned item does not have name property, it is a treeModel.TextFragment.
+					// If returned item does not have name property, it is a model.TextFragment.
 					const name = step.value.item.name || '$text';
 					const name = step.value.item.name || '$text';
 
 
 					if ( schema.check( { name: name, inside: last, attributes: this.attributeKey } ) ) {
 					if ( schema.check( { name: name, inside: last, attributes: this.attributeKey } ) ) {
@@ -99,10 +99,10 @@ export default class AttributeCommand extends Command {
 	 *
 	 *
 	 * If the command is active (`value == true`), it will remove attributes. Otherwise, it will set attributes.
 	 * If the command is active (`value == true`), it will remove attributes. Otherwise, it will set attributes.
 	 *
 	 *
-	 * The execution result differs, depending on the {@link engine.treeModel.Document#selection}:
+	 * The execution result differs, depending on the {@link engine.model.Document#selection}:
 	 * * if selection is on a range, the command applies the attribute on all nodes in that ranges
 	 * * if selection is on a range, the command applies the attribute on all nodes in that ranges
-	 * (if they are allowed to have this attribute by the{@link engine.treeModel.Schema schema}),
-	 * * if selection is collapsed in non-empty node, the command applies attribute to the {@link engine.treeModel.Document#selection}
+	 * (if they are allowed to have this attribute by the{@link engine.model.Schema schema}),
+	 * * if selection is collapsed in non-empty node, the command applies attribute to the {@link engine.model.Document#selection}
 	 * itself (note that typed characters copy attributes from selection),
 	 * itself (note that typed characters copy attributes from selection),
 	 * * if selection is collapsed in empty node, the command applies attribute to the parent node of selection (note
 	 * * if selection is collapsed in empty node, the command applies attribute to the parent node of selection (note
 	 * that selection inherits all attributes from a node if it is in empty node).
 	 * that selection inherits all attributes from a node if it is in empty node).
@@ -148,8 +148,8 @@ export default class AttributeCommand extends Command {
 	 * attribute set. This is done by breaking a range in two and omitting the not allowed part.
 	 * attribute set. This is done by breaking a range in two and omitting the not allowed part.
 	 *
 	 *
 	 * @private
 	 * @private
-	 * @param {Array.<engine.treeModel.Range>} ranges Ranges to be validated.
-	 * @returns {Array.<engine.treeModel.Range>} Ranges without invalid parts.
+	 * @param {Array.<engine.model.Range>} ranges Ranges to be validated.
+	 * @returns {Array.<engine.model.Range>} Ranges without invalid parts.
 	 */
 	 */
 	_getSchemaValidRanges( ranges ) {
 	_getSchemaValidRanges( ranges ) {
 		const validRanges = [];
 		const validRanges = [];

+ 1 - 1
src/command/command.js

@@ -122,7 +122,7 @@ export default class Command {
 	 *
 	 *
 	 * @protected
 	 * @protected
 	 * @method ckeditor5.command.Command#_checkEnabled
 	 * @method ckeditor5.command.Command#_checkEnabled
-	 * @returns {Boolean} `true` if command should be enabled according to {@link engine.treeModel.Document#schema}. `false` otherwise.
+	 * @returns {Boolean} `true` if command should be enabled according to {@link engine.model.Document#schema}. `false` otherwise.
 	 */
 	 */
 }
 }
 
 

+ 2 - 2
src/creator/standardcreator.js

@@ -7,7 +7,7 @@
 
 
 import Creator from './creator.js';
 import Creator from './creator.js';
 
 
-import Document from '../engine/treemodel/document.js';
+import Document from '../engine/model/document.js';
 import DataController from '../engine/datacontroller.js';
 import DataController from '../engine/datacontroller.js';
 import EditingController from '../engine/editingcontroller.js';
 import EditingController from '../engine/editingcontroller.js';
 
 
@@ -19,7 +19,7 @@ import EditingController from '../engine/editingcontroller.js';
  */
  */
 export default class StandardCreator extends Creator {
 export default class StandardCreator extends Creator {
 	/**
 	/**
-	 * Creates an instance of the standard creator. Initializes the engine ({@link engine.treeModel.Document document},
+	 * Creates an instance of the standard creator. Initializes the engine ({@link engine.model.Document document},
 	 * {@link engine.EditingController editing controller} and
 	 * {@link engine.EditingController editing controller} and
 	 * {@link engine.DataController data controller}).
 	 * {@link engine.DataController data controller}).
 	 *
 	 *

+ 2 - 2
src/editable.js

@@ -7,7 +7,7 @@
 
 
 import mix from './utils/mix.js';
 import mix from './utils/mix.js';
 import ObservableMixin from './utils/observablemixin.js';
 import ObservableMixin from './utils/observablemixin.js';
-import FocusObserver from './engine/treeview/observer/focusobserver.js';
+import FocusObserver from './engine/view/observer/focusobserver.js';
 
 
 /**
 /**
  * Class representing a single editable element. It combines the {@link ckeditor5.Editable#viewElement editable view}
  * Class representing a single editable element. It combines the {@link ckeditor5.Editable#viewElement editable view}
@@ -68,7 +68,7 @@ export default class Editable {
 		 * The view element which holds this editable.
 		 * The view element which holds this editable.
 		 *
 		 *
 		 * @readonly
 		 * @readonly
-		 * @member {engine.treeView.Element} ckeditor5.Editable#viewElement
+		 * @member {engine.view.Element} ckeditor5.Editable#viewElement
 		 */
 		 */
 	}
 	}
 
 

+ 1 - 1
src/editor.js

@@ -101,7 +101,7 @@ export default class Editor {
 		 * This property is set by the {@link ckeditor5.creator.Creator}.
 		 * This property is set by the {@link ckeditor5.creator.Creator}.
 		 *
 		 *
 		 * @readonly
 		 * @readonly
-		 * @member {engine.treeModel.Document} ckeditor5.Editor#document
+		 * @member {engine.model.Document} ckeditor5.Editor#document
 		 */
 		 */
 
 
 		/**
 		/**

+ 5 - 5
tests/command/attributecommand.js

@@ -6,12 +6,12 @@
 'use strict';
 'use strict';
 
 
 import Editor from '/ckeditor5/editor.js';
 import Editor from '/ckeditor5/editor.js';
-import Document from '/ckeditor5/engine/treemodel/document.js';
+import Document from '/ckeditor5/engine/model/document.js';
 import AttributeCommand from '/ckeditor5/command/attributecommand.js';
 import AttributeCommand from '/ckeditor5/command/attributecommand.js';
-import Text from '/ckeditor5/engine/treemodel/text.js';
-import Range from '/ckeditor5/engine/treemodel/range.js';
-import Position from '/ckeditor5/engine/treemodel/position.js';
-import Element from '/ckeditor5/engine/treemodel/element.js';
+import Text from '/ckeditor5/engine/model/text.js';
+import Range from '/ckeditor5/engine/model/range.js';
+import Position from '/ckeditor5/engine/model/position.js';
+import Element from '/ckeditor5/engine/model/element.js';
 
 
 let editor, command, modelDoc, root;
 let editor, command, modelDoc, root;
 
 

+ 1 - 1
tests/creator/standardcreator.js

@@ -12,7 +12,7 @@ import Creator from '/ckeditor5/creator/creator.js';
 import StandardCreator from '/ckeditor5/creator/standardcreator.js';
 import StandardCreator from '/ckeditor5/creator/standardcreator.js';
 import Editor from '/ckeditor5/editor.js';
 import Editor from '/ckeditor5/editor.js';
 import HtmlDataProcessor from '/ckeditor5/engine/dataprocessor/htmldataprocessor.js';
 import HtmlDataProcessor from '/ckeditor5/engine/dataprocessor/htmldataprocessor.js';
-import Document from '/ckeditor5/engine/treemodel/document.js';
+import Document from '/ckeditor5/engine/model/document.js';
 import EditingController from '/ckeditor5/engine/editingcontroller.js';
 import EditingController from '/ckeditor5/engine/editingcontroller.js';
 import DataController from '/ckeditor5/engine/datacontroller.js';
 import DataController from '/ckeditor5/engine/datacontroller.js';
 
 

+ 1 - 1
tests/editable.js

@@ -10,7 +10,7 @@
 import Editor from '/ckeditor5/editor.js';
 import Editor from '/ckeditor5/editor.js';
 import Editable from '/ckeditor5/editable.js';
 import Editable from '/ckeditor5/editable.js';
 import EditingController from '/ckeditor5/engine/editingcontroller.js';
 import EditingController from '/ckeditor5/engine/editingcontroller.js';
-import ViewElement from '/ckeditor5/engine/treeview/element.js';
+import ViewElement from '/ckeditor5/engine/view/element.js';
 
 
 describe( 'Editable', () => {
 describe( 'Editable', () => {
 	const ELEMENT_NAME = 'h1';
 	const ELEMENT_NAME = 'h1';

+ 1 - 1
tests/editor/baseeditor.js

@@ -11,7 +11,7 @@ import Editor from '/ckeditor5/editor.js';
 import Command from '/ckeditor5/command/command.js';
 import Command from '/ckeditor5/command/command.js';
 import Locale from '/ckeditor5/utils/locale.js';
 import Locale from '/ckeditor5/utils/locale.js';
 import CKEditorError from '/ckeditor5/utils/ckeditorerror.js';
 import CKEditorError from '/ckeditor5/utils/ckeditorerror.js';
-import Document from '/ckeditor5/engine/treemodel/document.js';
+import Document from '/ckeditor5/engine/model/document.js';
 
 
 describe( 'Editor', () => {
 describe( 'Editor', () => {
 	describe( 'locale', () => {
 	describe( 'locale', () => {