Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Merge pull request #1805 from ckeditor/i/5649
Browse files Browse the repository at this point in the history
Other: Split debug tools between the engine files. You do not need to add debug plugin to the editor if you want to use `--debug engine` building flag anymore. Closes ckeditor/ckeditor5#5649.
  • Loading branch information
Piotr Jasiun authored Oct 25, 2019
2 parents f3358cc + c47ea8a commit 353f091
Show file tree
Hide file tree
Showing 29 changed files with 457 additions and 1,299 deletions.
14 changes: 13 additions & 1 deletion src/controller/editingcontroller.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ import ObservableMixin from '@ckeditor/ckeditor5-utils/src/observablemixin';
import mix from '@ckeditor/ckeditor5-utils/src/mix';
import { convertSelectionChange } from '../conversion/upcasthelpers';

// @if CK_DEBUG_ENGINE // const { dumpTrees, initDocumentDumping } = require( '../dev-utils/utils' );

/**
* Controller for the editing pipeline. The editing pipeline controls {@link ~EditingController#model model} rendering,
* including selection handling. It also creates the {@link ~EditingController#view view} which builds a
Expand Down Expand Up @@ -73,7 +75,7 @@ export default class EditingController {
// model's change, they might trigger view rendering before the conversion is completed (e.g. before the selection
// is converted). We disable rendering for the length of the outermost model change() block to prevent that.
//
// See https://github.com/ckeditor/ckeditor5-engine/issues/1528
// See https://github.com/ckeditor/ckeditor5-engine/issues/1528
this.listenTo( this.model, '_beforeChanges', () => {
this.view._disableRendering( true );
}, { priority: 'highest' } );
Expand Down Expand Up @@ -121,6 +123,16 @@ export default class EditingController {

return viewRoot;
} );

// @if CK_DEBUG_ENGINE // initDocumentDumping( this.model.document );
// @if CK_DEBUG_ENGINE // initDocumentDumping( this.view.document );

// @if CK_DEBUG_ENGINE // dumpTrees( this.model.document, this.model.document.version );
// @if CK_DEBUG_ENGINE // dumpTrees( this.view.document, this.model.document.version );

// @if CK_DEBUG_ENGINE // this.model.document.on( 'change', () => {
// @if CK_DEBUG_ENGINE // dumpTrees( this.view.document, this.model.document.version );
// @if CK_DEBUG_ENGINE // }, { priority: 'lowest' } );
}

/**
Expand Down
Loading

0 comments on commit 353f091

Please sign in to comment.