Преглед на файлове

Rename RestrictedDocument* to RestrictedEditingException.

Maciej Gołaszewski преди 6 години
родител
ревизия
ced84abe89

+ 5 - 5
packages/ckeditor5-restricted-editing/src/restricteddocument.js

@@ -9,21 +9,21 @@
 
 import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
 
-import RestrictedDocumentEditing from './restricteddocumentediting';
-import RestrictedDocumentUI from './restricteddocumentui';
+import RestrictedEditingExceptionEditing from './restricteddocumentediting';
+import RestrictedEditingExceptionUI from './restricteddocumentui';
 
 /**
  * @extends module:core/plugin~Plugin
  */
-export default class RestrictedDocument extends Plugin {
+export default class RestrictedEditingException extends Plugin {
 	/**
 	 * @inheritDoc
 	 */
 	static get pluginName() {
-		return 'RestrictedDocument';
+		return 'RestrictedEditingException';
 	}
 
 	static get requires() {
-		return [ RestrictedDocumentEditing, RestrictedDocumentUI ];
+		return [ RestrictedEditingExceptionEditing, RestrictedEditingExceptionUI ];
 	}
 }

+ 1 - 1
packages/ckeditor5-restricted-editing/src/restricteddocumentcommand.js

@@ -12,7 +12,7 @@ import Command from '@ckeditor/ckeditor5-core/src/command';
 /**
  * @extends module:core/command~Command
  */
-export default class RestrictedDocumentCommand extends Command {
+export default class RestrictedEditingExceptionCommand extends Command {
 	/**
 	 * @inheritDoc
 	 */

+ 4 - 4
packages/ckeditor5-restricted-editing/src/restricteddocumentediting.js

@@ -8,17 +8,17 @@
  */
 
 import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
-import RestrictedDocumentCommand from './restricteddocumentcommand';
+import RestrictedEditingExceptionCommand from './restricteddocumentcommand';
 
 /**
  * @extends module:core/plugin~Plugin
  */
-export default class RestrictedDocumentEditing extends Plugin {
+export default class RestrictedEditingExceptionEditing extends Plugin {
 	/**
 	 * @inheritDoc
 	 */
 	static get pluginName() {
-		return 'RestrictedDocumentEditing';
+		return 'RestrictedEditingExceptionEditing';
 	}
 
 	/**
@@ -37,6 +37,6 @@ export default class RestrictedDocumentEditing extends Plugin {
 			}
 		} );
 
-		editor.commands.add( 'nonRestricted', new RestrictedDocumentCommand( editor ) );
+		editor.commands.add( 'nonRestricted', new RestrictedEditingExceptionCommand( editor ) );
 	}
 }

+ 1 - 1
packages/ckeditor5-restricted-editing/src/restricteddocumentui.js

@@ -15,7 +15,7 @@ import restrictedDocumentIcon from '../theme/icons/restricted.svg';
 /**
  * @extends module:core/plugin~Plugin
  */
-export default class RestrictedDocumentUI extends Plugin {
+export default class RestrictedEditingExceptionUI extends Plugin {
 	/**
 	 * @inheritDoc
 	 */

+ 2 - 2
packages/ckeditor5-restricted-editing/tests/manual/restricteddocument.js

@@ -9,11 +9,11 @@ import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor'
 import ArticlePluginSet from '@ckeditor/ckeditor5-core/tests/_utils/articlepluginset';
 import Table from '@ckeditor/ckeditor5-table/src/table';
 
-import RestrictedDocument from '../../src/restricteddocument';
+import RestrictedEditingException from '../../src/restricteddocument';
 
 ClassicEditor
 	.create( document.querySelector( '#editor' ), {
-		plugins: [ ArticlePluginSet, Table, RestrictedDocument ],
+		plugins: [ ArticlePluginSet, Table, RestrictedEditingException ],
 		toolbar: [ 'heading', '|',
 			'bold', 'italic', 'link', '|',
 			'bulletedList', 'numberedList', 'blockQuote', 'insertTable', '|',

+ 10 - 10
packages/ckeditor5-restricted-editing/tests/restricteddocument.js

@@ -8,11 +8,11 @@
 import testUtils from '@ckeditor/ckeditor5-core/tests/_utils/utils';
 import ClassicTestEditor from '@ckeditor/ckeditor5-core/tests/_utils/classictesteditor';
 
-import RestrictedDocument from './../src/restricteddocument';
-import RestrictedDocumentUI from './../src/restricteddocumentui';
-import RestrictedDocumentEditing from './../src/restricteddocumentediting';
+import RestrictedEditingException from './../src/restricteddocument';
+import RestrictedEditingExceptionUI from './../src/restricteddocumentui';
+import RestrictedEditingExceptionEditing from './../src/restricteddocumentediting';
 
-describe( 'RestrictedDocument', () => {
+describe( 'RestrictedEditingException', () => {
 	let editor, element;
 
 	testUtils.createSinonSandbox();
@@ -21,7 +21,7 @@ describe( 'RestrictedDocument', () => {
 		element = document.createElement( 'div' );
 		document.body.appendChild( element );
 
-		editor = await ClassicTestEditor.create( element, { plugins: [ RestrictedDocument ] } );
+		editor = await ClassicTestEditor.create( element, { plugins: [ RestrictedEditingException ] } );
 	} );
 
 	afterEach( () => {
@@ -31,14 +31,14 @@ describe( 'RestrictedDocument', () => {
 	} );
 
 	it( 'should be named', () => {
-		expect( RestrictedDocument.pluginName ).to.equal( 'RestrictedDocument' );
+		expect( RestrictedEditingException.pluginName ).to.equal( 'RestrictedEditingException' );
 	} );
 
-	it( 'should load the RestrictedDocumentEditing plugin', () => {
-		expect( editor.plugins.get( RestrictedDocumentEditing ) ).to.be.instanceOf( RestrictedDocumentEditing );
+	it( 'should load the RestrictedEditingExceptionEditing plugin', () => {
+		expect( editor.plugins.get( RestrictedEditingExceptionEditing ) ).to.be.instanceOf( RestrictedEditingExceptionEditing );
 	} );
 
-	it( 'should load the RestrictedDocumentUI plugin', () => {
-		expect( editor.plugins.get( RestrictedDocumentUI ) ).to.be.instanceOf( RestrictedDocumentUI );
+	it( 'should load the RestrictedEditingExceptionUI plugin', () => {
+		expect( editor.plugins.get( RestrictedEditingExceptionUI ) ).to.be.instanceOf( RestrictedEditingExceptionUI );
 	} );
 } );

+ 3 - 3
packages/ckeditor5-restricted-editing/tests/restricteddocumentcommand.js

@@ -6,9 +6,9 @@
 import ModelTestEditor from '@ckeditor/ckeditor5-core/tests/_utils/modeltesteditor';
 import { setData, getData } from '@ckeditor/ckeditor5-engine/src/dev-utils/model';
 
-import RestrictedDocumentCommand from '../src/restricteddocumentcommand';
+import RestrictedEditingExceptionCommand from '../src/restricteddocumentcommand';
 
-describe( 'RestrictedDocumentCommand', () => {
+describe( 'RestrictedEditingExceptionCommand', () => {
 	let editor, command, model;
 
 	beforeEach( () => {
@@ -18,7 +18,7 @@ describe( 'RestrictedDocumentCommand', () => {
 				editor = newEditor;
 				model = editor.model;
 
-				command = new RestrictedDocumentCommand( editor );
+				command = new RestrictedEditingExceptionCommand( editor );
 
 				model.schema.register( 'p', { inheritAllFrom: '$block' } );
 				model.schema.register( 'h1', { inheritAllFrom: '$block' } );

+ 7 - 7
packages/ckeditor5-restricted-editing/tests/restricteddocumentediting.js

@@ -9,16 +9,16 @@ import { getData as getViewData } from '@ckeditor/ckeditor5-engine/src/dev-utils
 import { getData as getModelData, setData as setModelData } from '@ckeditor/ckeditor5-engine/src/dev-utils/model';
 import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph';
 
-import RestrictedDocumentEditing from '../src/restricteddocumentediting';
-import RestrictedDocumentCommand from '../src/restricteddocumentcommand';
+import RestrictedEditingExceptionEditing from '../src/restricteddocumentediting';
+import RestrictedEditingExceptionCommand from '../src/restricteddocumentcommand';
 
-describe( 'RestrictedDocumentEditing', () => {
+describe( 'RestrictedEditingExceptionEditing', () => {
 	let editor, model;
 
 	testUtils.createSinonSandbox();
 
 	beforeEach( async () => {
-		editor = await VirtualTestEditor.create( { plugins: [ Paragraph, RestrictedDocumentEditing ] } );
+		editor = await VirtualTestEditor.create( { plugins: [ Paragraph, RestrictedEditingExceptionEditing ] } );
 		model = editor.model;
 	} );
 
@@ -27,11 +27,11 @@ describe( 'RestrictedDocumentEditing', () => {
 	} );
 
 	it( 'should be named', () => {
-		expect( RestrictedDocumentEditing.pluginName ).to.equal( 'RestrictedDocumentEditing' );
+		expect( RestrictedEditingExceptionEditing.pluginName ).to.equal( 'RestrictedEditingExceptionEditing' );
 	} );
 
 	it( 'should be loaded', () => {
-		expect( editor.plugins.get( 'RestrictedDocumentEditing' ) ).to.be.instanceOf( RestrictedDocumentEditing );
+		expect( editor.plugins.get( 'RestrictedEditingExceptionEditing' ) ).to.be.instanceOf( RestrictedEditingExceptionEditing );
 	} );
 
 	it( 'should set proper schema rules', () => {
@@ -46,7 +46,7 @@ describe( 'RestrictedDocumentEditing', () => {
 	it( 'should register command', () => {
 		const command = editor.commands.get( 'nonRestricted' );
 
-		expect( command ).to.be.instanceof( RestrictedDocumentCommand );
+		expect( command ).to.be.instanceof( RestrictedEditingExceptionCommand );
 	} );
 
 	describe( 'conversion', () => {

+ 4 - 4
packages/ckeditor5-restricted-editing/tests/restricteddocumentui.js

@@ -10,10 +10,10 @@ import ClassicTestEditor from '@ckeditor/ckeditor5-core/tests/_utils/classictest
 import ButtonView from '@ckeditor/ckeditor5-ui/src/button/buttonview';
 import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph';
 
-import RestrictedDocumentUI from '../src/restricteddocumentui';
-import RestrictedDocument from '../src/restricteddocument';
+import RestrictedEditingExceptionUI from '../src/restricteddocumentui';
+import RestrictedEditingException from '../src/restricteddocument';
 
-describe( 'RestrictedDocumentUI', () => {
+describe( 'RestrictedEditingExceptionUI', () => {
 	let editor, buttonView;
 
 	testUtils.createSinonSandbox();
@@ -23,7 +23,7 @@ describe( 'RestrictedDocumentUI', () => {
 		document.body.appendChild( editorElement );
 
 		editor = await ClassicTestEditor.create( editorElement, {
-			plugins: [ Paragraph, RestrictedDocument, RestrictedDocumentUI ]
+			plugins: [ Paragraph, RestrictedEditingException, RestrictedEditingExceptionUI ]
 		} );
 
 		buttonView = editor.ui.componentFactory.create( 'nonRestricted' );