Browse Source

Renamed Undo to UndoEngine to make space for full-featured Undo feature (with UI).

Piotrek Koszuliński 9 years ago
parent
commit
5fadaf7240

+ 7 - 7
packages/ckeditor5-undo/src/undo.js

@@ -9,31 +9,31 @@ import Feature from '../feature.js';
 import UndoCommand from './undocommand.js';
 
 /**
- * Undo feature.
+ * Undo engine feature.
  *
  * Undo features brings in possibility to undo and re-do changes done in Tree Model by deltas through Batch API.
  *
  * @memberOf undo
  */
-export default class Undo extends Feature {
+export default class UndoEngine extends Feature {
 	constructor( editor ) {
 		super( editor );
 
 		/**
 		 * Undo command which manages undo {@link engine.model.Batch batches} stack (history).
-		 * Created and registered during {@link undo.Undo#init feature initialization}.
+		 * Created and registered during {@link undo.UndoEngine#init feature initialization}.
 		 *
 		 * @private
-		 * @member {undo.UndoCommand} undo.Undo#_undoCommand
+		 * @member {undo.UndoEngineCommand} undo.UndoEngine#_undoCommand
 		 */
 		this._undoCommand = null;
 
 		/**
 		 * Undo command which manages redo {@link engine.model.Batch batches} stack (history).
-		 * Created and registered during {@link undo.Undo#init feature initialization}.
+		 * Created and registered during {@link undo.UndoEngine#init feature initialization}.
 		 *
 		 * @private
-		 * @member {undo.UndoCommand} undo.Undo#_redoCommand
+		 * @member {undo.UndoEngineCommand} undo.UndoEngine#_redoCommand
 		 */
 		this._redoCommand = null;
 
@@ -41,7 +41,7 @@ export default class Undo extends Feature {
 		 * Keeps track of which batch has already been added to undo manager.
 		 *
 		 * @private
-		 * @member {WeakSet.<engine.model.Batch>} undo.Undo#_batchRegistry
+		 * @member {WeakSet.<engine.model.Batch>} undo.UndoEngine#_batchRegistry
 		 */
 		this._batchRegistry = new WeakSet();
 	}

+ 3 - 3
packages/ckeditor5-undo/tests/undo.js

@@ -11,7 +11,7 @@ import Editor from '/ckeditor5/editor.js';
 import ModelDocument from '/ckeditor5/engine/model/document.js';
 import Range from '/ckeditor5/engine/model/range.js';
 import Position from '/ckeditor5/engine/model/position.js';
-import Undo from '/ckeditor5/undo/undo.js';
+import UndoEngine from '/ckeditor5/undo/undoengine.js';
 import Creator from '/ckeditor5/creator/creator.js';
 
 import { setData, getData } from '/tests/engine/_utils/model.js';
@@ -29,7 +29,7 @@ beforeEach( () => {
 
 	editor = new Editor( element, {
 		creator: Creator,
-		features: [ Undo ]
+		features: [ UndoEngine ]
 	} );
 
 	editor.document = doc;
@@ -53,7 +53,7 @@ function undoDisabled() {
 	expect( editor.commands.get( 'undo' ).isEnabled ).to.be.false;
 }
 
-describe( 'undo integration', () => {
+describe( 'UndoEngine integration', () => {
 	describe( 'adding and removing content', () => {
 		it( 'add and undo', () => {
 			input( '<p>fo<selection />o</p><p>bar</p>' );

+ 3 - 3
packages/ckeditor5-undo/tests/undofeature.js

@@ -10,7 +10,7 @@
 import Editor from '/ckeditor5/editor.js';
 import ModelDocument from '/ckeditor5/engine/model/document.js';
 import Position from '/ckeditor5/engine/model/position.js';
-import UndoFeature from '/ckeditor5/undo/undo.js';
+import UndoEngine from '/ckeditor5/undo/undoengine.js';
 
 let element, editor, undo, batch, doc, root;
 
@@ -25,7 +25,7 @@ beforeEach( () => {
 	batch = doc.batch();
 	root = doc.createRoot( 'root' );
 
-	undo = new UndoFeature( editor );
+	undo = new UndoEngine( editor );
 	undo.init();
 } );
 
@@ -33,7 +33,7 @@ afterEach( () => {
 	undo.destroy();
 } );
 
-describe( 'UndoFeature', () => {
+describe( 'UndoEngine', () => {
 	it( 'should register undo command and redo command', () => {
 		expect( editor.commands.get( 'undo' ) ).to.equal( undo._undoCommand );
 		expect( editor.commands.get( 'redo' ) ).to.equal( undo._redoCommand );