Appends items to the editor
511133
function(html) {

      var x, newNode, node, firstChild;

      // create a new node
      newNode = document.createElement('div');
      newNode.innerHTML = html;

      // get new new node
      newNode = newNode.childNodes[0];
      newNode.setAttribute('hashedit-element', '');

      hashedit.setupElementMenu(newNode);

      // get existing node
      node = document.querySelector('[hashedit-sortable] [data-selector]');

      if (node === null) {

        if (hashedit.current.node !== null) {

          // insert after current node
          hashedit.current.node.parentNode.insertBefore(newNode, hashedit.current.node.nextSibling);

        }

      }
      else {
        // replace existing node with newNode
        node.parentNode.replaceChild(newNode, node);
      }

      var types = 'p, h1, h2, h3, h4, h5, li, td, th, blockquote, pre';

      // set editable children
      var editable = newNode.querySelectorAll(types);

      for (x = 0; x < editable.length; x += 1) {
        editable[x].setAttribute('contentEditable', 'true');
      }

      if (types.indexOf(newNode.nodeName.toLowerCase()) != -1) {
        newNode.setAttribute('contentEditable', 'true');
      }

      // select element
      function selectElementContents(el) {
        var range = document.createRange();
        range.selectNodeContents(el);
        var sel = window.getSelection();
        sel.removeAllRanges();
        sel.addRange(range);
      }

      // focus on first element
      if (editable.length > 0) {

        editable[0].focus();
        selectElementContents(editable[0]);

        // show edit options for the text
        hashedit.showTextOptions(editable[0]);

        // select editable contents, #ref: http://bit.ly/1jxd8er
        hashedit.selectElementContents(editable[0]);
      }
      else {

        if(newNode.matches(types)) {

          newNode.focus();
          selectElementContents(newNode);

        }

      }

      return newNode;

    }
8109
function () {
		var items = _.flatten(arguments);
		for (var i = 0, l = items.length; i < l; i++) {
			this.addItem(items[i], this.items.length);
		}
	}
1076749
function editors () {
  editors.textBox = form.textBox = ace.edit("text-box");
  form.textBox.setTheme(ACE_THEME);
  var session = form.textBox.getSession();
  session.setMode("ace/mode/yaml");
  session.setTabSize(2);

  editors.results = $("#results");
  editors.tabs = editors.results.find(".nav-tabs");
  editors.panes = editors.results.find(".tab-content");
}
956177
function( editor )
		{
			var hr = editor.document.createElement( 'hr' ),
				range = new CKEDITOR.dom.range( editor.document );

			editor.insertElement( hr );

			// If there's nothing or a non-editable block followed by, establish a new paragraph
			// to make sure cursor is not trapped.
			range.moveToPosition( hr, CKEDITOR.POSITION_AFTER_END );
			var next = hr.getNext();
			if ( !next || next.type == CKEDITOR.NODE_ELEMENT && !next.isEditable() )
				range.fixBlock( true, editor.config.enterMode == CKEDITOR.ENTER_DIV ? 'div' : 'p'  );

			range.select();
		}
240191
def save(self):
        
        e = self.editor

        self._style = e.current_style
        self._show_line_numbers = e.show_line_numbers
        self._highlight_search = e.highlight_search
        self._show_ruler = e.show_ruler
        self._relative_number = e.relative_number
        self._cursorcolumn = e.cursorcolumn
        self._cursorline = e.cursorline
        self._colorcolumn = e.colorcolumn
1137160
function () {
        var self = this, items = self.items();

        if (!self.settings.formItemDefaults) {
          self.settings.formItemDefaults = {
            layout: 'flex',
            autoResize: "overflow",
            defaults: { flex: 1 }
          };
        }

        // Wrap any labeled items in FormItems
        items.each(function (ctrl) {
          var formItem, label = ctrl.settings.label;

          if (label) {
            formItem = new FormItem(Tools.extend({
              items: {
                type: 'label',
                id: ctrl._id + '-l',
                text: label,
                flex: 0,
                forId: ctrl._id,
                disabled: ctrl.disabled()
              }
            }, self.settings.formItemDefaults));

            formItem.type = 'formitem';
            ctrl.aria('labelledby', ctrl._id + '-l');

            if (typeof ctrl.settings.flex == "undefined") {
              ctrl.settings.flex = 1;
            }

            self.replace(ctrl, formItem);
            formItem.add(ctrl);
          }
        });
      }
1712
function updateEditorElement() {
		var element = this.element;

		// Some editor creation mode will not have the
		// associated element.
		if ( element && this.elementMode != CKEDITOR.ELEMENT_MODE_APPENDTO ) {
			var data = this.getData();

			if ( this.config.htmlEncodeOutput )
				data = CKEDITOR.tools.htmlEncode( data );

			if ( element.is( 'textarea' ) )
				element.setValue( data );
			else
				element.setHtml( data );

			return true;
		}
		return false;
	}
921829
def append!(view_or_constant, style=nil, opts = {}, &block)
      opts[:raw_block] = block if block
      append(view_or_constant, style, opts).get
    end
246214
function insertTemplate( html ) {
			var dialog = CKEDITOR.dialog.getCurrent(),
				isReplace = dialog.getValueOf( 'selectTpl', 'chkInsertOpt' );

			if ( isReplace ) {
				editor.fire( 'saveSnapshot' );
				// Everything should happen after the document is loaded (#4073).
				editor.setData( html, function() {
					dialog.hide();

					// Place the cursor at the first editable place.
					var range = editor.createRange();
					range.moveToElementEditStart( editor.editable() );
					range.select();
					setTimeout( function() {
						editor.fire( 'saveSnapshot' );
					}, 0 );

				} );
			} else {
				editor.insertHtml( html );
				dialog.hide();
			}
		}
1097295
def set_current_editor(self, editor, update):
        """"""
        editor_id = editor.get_id()
        if editor_id in list(self.editor_ids.values()):
            item = self.editor_items[editor_id]
            if not self.freeze:
                self.scrollToItem(item)
                self.root_item_selected(item)
                self.__hide_or_show_root_items(item)
            if update:
                self.save_expanded_state()
                tree_cache = self.editor_tree_cache[editor_id]
                self.populate_branch(editor, item, tree_cache)
                self.restore_expanded_state()
        else:
            root_item = FileRootItem(editor.fname, self, editor.is_python())
            root_item.set_text(fullpath=self.show_fullpath)
            tree_cache = self.populate_branch(editor, root_item)
            self.__hide_or_show_root_items(root_item)
            self.root_item_selected(root_item)
            self.editor_items[editor_id] = root_item
            self.editor_tree_cache[editor_id] = tree_cache
            self.resizeColumnToContents(0)
        if editor not in self.editor_ids:
            self.editor_ids[editor] = editor_id
            self.ordered_editor_ids.append(editor_id)
            self.__sort_toplevel_items()
        self.current_editor = editor
604182
function(editor) {
    if (editor.blockless) return;

    var config = editor.config,
      lang = editor.lang.format;

    // Gets the list of tags from the settings.
    var tags = config.format_tags.split(';');

    // Create style objects for all defined styles.
    var styles = {},
      stylesCount = 0,
      allowedContent = [];
    for (var i = 0; i < tags.length; i++) {
      var tag = tags[i];
      // @EDIT: formatting tag name here, try to handle custom-elements
      var formatted_tag = tag.replace('-', '_');
      var style = new CKEDITOR.style(config['format_' + formatted_tag]);
      if (!editor.filter.customConfig || editor.filter.check(style)) {
        stylesCount++;
        styles[formatted_tag] = style;
        styles[formatted_tag]._.enterMode = editor.config.enterMode;
        allowedContent.push(style);
      }
    }

    // Hide entire combo when all formats are rejected.
    if (stylesCount === 0) return;

    editor.ui.addRichCombo('Format', {
      label: lang.label,
      title: lang.panelTitle,
      toolbar: 'styles,20',
      allowedContent: allowedContent,

      panel: {
        css: [CKEDITOR.skin.getPath('editor')].concat(config.contentsCss),
        multiSelect: false,
        attributes: { 'aria-label': lang.panelTitle },
      },

      init: function() {
        this.startGroup(lang.panelTitle);

        for (var tag in styles) {
          var label = lang['tag_' + tag];

          // Add the tag entry to the panel list.
          this.add(tag, styles[tag].buildPreview(label), label);
        }
      },

      onClick: function(value) {
        editor.focus();
        editor.fire('saveSnapshot');

        var style = styles[value],
          elementPath = editor.elementPath();

        // Always apply style, do not allow to toggle it by clicking on corresponding list item (#584).
        if (!style.checkActive(elementPath, editor)) {
          editor.applyStyle(style);
        }

        // Save the undo snapshot after all changes are affected. (https://dev.ckeditor.com/ticket/4899)
        setTimeout(function() {
          editor.fire('saveSnapshot');
        }, 0);
      },

      onRender: function() {
        editor.on(
          'selectionChange',
          function(ev) {
            var currentTag = this.getValue(),
              elementPath = ev.data.path;

            this.refresh();

            for (var tag in styles) {
              if (styles[tag].checkActive(elementPath, editor)) {
                if (tag != currentTag)
                  this.setValue(tag, editor.lang.format['tag_' + tag]);
                return;
              }
            }

            // If no styles match, just empty it.
            this.setValue('');
          },
          this,
        );
      },

      onOpen: function() {
        this.showAll();
        for (var name in styles) {
          var style = styles[name];

          // Check if that style is enabled in activeFilter.
          if (!editor.activeFilter.check(style)) this.hideItem(name);
        }
      },

      refresh: function() {
        var elementPath = editor.elementPath();

        if (!elementPath) return;

        // Check if element path contains 'p' element.
        if (!elementPath.isContextFor('p')) {
          this.setState(CKEDITOR.TRISTATE_DISABLED);
          return;
        }

        // Check if there is any available style.
        for (var name in styles) {
          if (editor.activeFilter.check(styles[name])) return;
        }
        this.setState(CKEDITOR.TRISTATE_DISABLED);
      },
    });
  }
592123
function append() {
      var items = this.items;
      var _Components$Html = Components.Html,
          wrapper = _Components$Html.wrapper,
          slides = _Components$Html.slides;


      var half = Math.floor(items.length / 2);
      var prepend = items.slice(0, half).reverse();
      var append = items.slice(half, items.length);
      var width = Components.Sizes.slideWidth + 'px';

      for (var i = 0; i < append.length; i++) {
        wrapper.appendChild(append[i]);
      }

      for (var _i2 = 0; _i2 < prepend.length; _i2++) {
        wrapper.insertBefore(prepend[_i2], slides[0]);
      }

      for (var _i3 = 0; _i3 < items.length; _i3++) {
        items[_i3].style.width = width;
      }
    }
594905
function (editor, size) {
      var toolbars = [], settings = editor.settings;

      var addToolbar = function (items) {
        if (items) {
          toolbars.push(createToolbar(editor, items, size));
          return true;
        }
      };

      // Convert toolbar array to multiple options
      if (Tools.isArray(settings.toolbar)) {
        // Empty toolbar array is the same as a disabled toolbar
        if (settings.toolbar.length === 0) {
          return;
        }

        Tools.each(settings.toolbar, function (toolbar, i) {
          settings["toolbar" + (i + 1)] = toolbar;
        });

        delete settings.toolbar;
      }

      // Generate toolbar<n>
      for (var i = 1; i < 10; i++) {
        if (!addToolbar(settings["toolbar" + i])) {
          break;
        }
      }

      // Generate toolbar or default toolbar unless it's disabled
      if (!toolbars.length && settings.toolbar !== false) {
        addToolbar(settings.toolbar || defaultToolbar);
      }

      if (toolbars.length) {
        return {
          type: 'panel',
          layout: 'stack',
          classes: "toolbar-grp",
          ariaRoot: true,
          ariaRemember: true,
          items: toolbars
        };
      }
    }
525216
def append(event, frame, arg)
      item = EventStruct.new(event, arg, frame)
      @pos = self.succ_pos
      @marks.shift if @marks[0] == @pos
      @buf[@pos] = item
      @size     += 1 unless @maxsize && @size == @maxsize
    end
415879
function() {
      var editor = $('<div></div>').addClass('kelmu-editor').css('z-order', '60000');
      editor.css('position', 'absolute').css('top', '10px').css('left', (container.children('div').last().outerWidth() + 100) + 'px');
      editor.css('border-radius', '5px').css('box-shadow', '3px 3px 5px #888888').css('background-color', '#FFFAE5');
      editor.css('padding', '10').css('cursor', 'move').draggable();
      editor.appendTo(container);

      editor.append($('<h3>Annotation editor</h3>').css('margin', '5px 0px'));

      // *********************************************************************************************************

      var statusView = $('<div></div>').text('Step 1, substep 1 of 1').addClass('kelmu-editor-status');
      statusView.appendTo(editor);

      // *********************************************************************************************************

      var generalButtons = $('<div></div>').addClass('kelmu-editor-general-buttons');
      generalButtons.appendTo(editor);

      $('<button></button>').text('Settings').addClass('btn').appendTo(generalButtons).click(function(e) {
        e.preventDefault();
        container.find('.kelmu-editor-pane').remove();
        editor.css('height', '');
        editor.css('width', '');
        window.kelmu.data[id].selectedElementNumber = -1;
        window.kelmu.data[id].previousSelectedElementNumber = -1;

        var settingsPanel = $('<div></div>').addClass('kelmu-editor-pane').appendTo(editor);

        addComponent('Length (ms)', settingsPanel, 'kelmu-editor-animation-length', window.kelmu.data[id].settings.animationLength, 'text');

        var helpShown = false;

        var pickerFunction = function() {

          if (!helpShown) {
            alert('Move the mouse cursor on top of the button and\nkeep moving the cursor until it gets a green border.');
            helpShown = true;
          }

          buttonPickerEnabled = true;
          element.find('a, button').css('border', '');
          if (!buttonPickerCreated) {
            createButtonPicker();
          }
        };

        addComponent('Begin button', settingsPanel, 'kelmu-editor-begin-button', window.kelmu.data[id].settings.begin, 'text');
        $('<br>').appendTo(settingsPanel);
        $('<button></button>').text('Point Begin button').appendTo(settingsPanel).click(function(e) {
          e.preventDefault();
          buttonToPick = 'begin';
          pickerFunction();
        });
        $('<br>').appendTo(settingsPanel);

        addComponent('Undo button', settingsPanel, 'kelmu-editor-undo-button', window.kelmu.data[id].settings.undo, 'text');
        $('<br>').appendTo(settingsPanel);
        $('<button></button>').text('Point Undo button').appendTo(settingsPanel).click(function(e) {
          e.preventDefault();
          buttonToPick = 'undo';
          pickerFunction();
        });
        $('<br>').appendTo(settingsPanel);

        addComponent('Step button', settingsPanel, 'kelmu-editor-step-button', window.kelmu.data[id].settings.step, 'text');
        $('<br>').appendTo(settingsPanel);
        $('<button></button>').text('Point Step button').appendTo(settingsPanel).click(function(e) {
          e.preventDefault();
          buttonToPick = 'step';
          pickerFunction();
        });
        $('<br>').appendTo(settingsPanel);

        addComponent('Redo button', settingsPanel, 'kelmu-editor-redo-button', window.kelmu.data[id].settings.redo, 'text');
        $('<br>').appendTo(settingsPanel);
        $('<button></button>').text('Point Redo button').appendTo(settingsPanel).click(function(e) {
          e.preventDefault();
          buttonToPick = 'redo';
          pickerFunction();
        });
        $('<br>').appendTo(settingsPanel);

        $('<button></button>').text('Save settings').appendTo($('<p></p>').appendTo(settingsPanel)).click(function(e) {
          e.preventDefault();

          window.kelmu.data[id].settings.animationLength = parseInt(settingsPanel.find('.kelmu-editor-animation-length').val(), 10);
          window.kelmu.data[id].settings.undo = settingsPanel.find('.kelmu-editor-undo-button').val();
          window.kelmu.data[id].settings.step = settingsPanel.find('.kelmu-editor-step-button').val();
          window.kelmu.data[id].settings.redo = settingsPanel.find('.kelmu-editor-redo-button').val();
          window.kelmu.data[id].settings.begin = settingsPanel.find('.kelmu-editor-begin-button').val();

          buttonPickerEnabled = false;

          window.kelmu.data[id].actions.update();
          updateView(true, true);
          window.kelmu.data[id].actions.initButtons();

          alert('Settings saved.');

        });

      });

      $('<button></button>').text('Import').addClass('btn').appendTo(generalButtons).click(function(e) {
        e.preventDefault();
        container.find('.kelmu-editor-pane').remove();
        editor.css('height', '');
        editor.css('width', '');
        window.kelmu.data[id].selectedElementNumber = -1;
        window.kelmu.data[id].previousSelectedElementNumber = -1;

        var importPanel = $('<div></div>').addClass('kelmu-editor-pane').appendTo(editor);
        var helpLabel = $('<p></p>').css('font-size', '11px').appendTo(importPanel);
        helpLabel.text('Copy and paste the definition below.');
        var textarea = $('<textarea></textarea>').appendTo(importPanel);
        textarea.css('font-size', '10px').css('min-height', '200px');
        $('<button></button>').text('Import').appendTo($('<p></p>').appendTo(importPanel)).click(function(e) {
          e.preventDefault();

          var text = textarea.val().trim();
          if (text.indexOf('kelmuCb(') >= 0) {
            text = text.substring(8, text.length - 1);
          }

          try {
            var parsed = JSON.parse(text);
            if (parsed[id] && parsed[id].settings && parsed[id].definitions) {
              window.kelmu.data[id].settings = parsed[id].settings;
              window.kelmu.data[id].definitions = parsed[id].definitions;
              alert('Definitions succesfully imported.');
              window.kelmu.data[id].actions.update();
              updateView(true, true);
              window.kelmu.data[id].actions.initButtons();
            } else {
              alert('Definition for ' + id + ' was not found or it is incomplete!');
            }
          } catch (error) {
            alert('Malformed definition!');
          }

        });
      });

      $('<button></button>').text('Export').addClass('btn').appendTo(generalButtons).click(function(e) {
        e.preventDefault();
        container.find('.kelmu-editor-pane').remove();
        editor.css('height', '');
        editor.css('width', '');
        window.kelmu.data[id].selectedElementNumber = -1;
        window.kelmu.data[id].previousSelectedElementNumber = -1;

        var exportedData = {};
        exportedData[id] = { definitions: window.kelmu.data[id].definitions, settings: window.kelmu.data[id].settings };

        var exportPanel = $('<div></div>').addClass('kelmu-editor-pane').appendTo(editor);
        var helpLabel = $('<p></p>').css('font-size', '11px').appendTo(exportPanel);
        helpLabel.text('Copy and paste the following definition in a file with extension .jsonp');
        var textarea = $('<textarea></textarea>').appendTo(exportPanel);
        textarea.css('font-size', '10px').css('min-height', '200px');
        textarea.val('kelmuCb(' + JSON.stringify(exportedData) + ')');
      });

      // *********************************************************************************************************

      var buttons = $('<div></div>').addClass('kelmu-editor-move-buttons');
      buttons.appendTo(editor);

      // Previous substep
      $('<button></button>').text('<').addClass('btn').appendTo(buttons).click(function(e) {
        e.preventDefault();
        if (window.kelmu.data[id].subStepNumber > 0) {
          window.kelmu.data[id].actions.setSubstep(window.kelmu.data[id].subStepNumber - 1);
        }
        window.kelmu.data[id].selectedElementNumber = -1;
        updateView(true, false);
      });

      // Next substep
      $('<button></button>').text('>').addClass('btn').appendTo(buttons).click(function(e) {
        e.preventDefault();
        if (window.kelmu.data[id].subStepNumber < (window.kelmu.data[id].definitions['step' + window.kelmu.data[id].stepNumber] || []).length - 1) {
          window.kelmu.data[id].actions.setSubstep(window.kelmu.data[id].subStepNumber + 1);
        }
        window.kelmu.data[id].selectedElementNumber = -1;
        updateView(true, false);
      });

      // New substep
      $('<button></button>').text('+Substep').addClass('btn').appendTo(buttons).click(function(e) {
        e.preventDefault();

        if (!window.kelmu.data[id].definitions['step' + window.kelmu.data[id].stepNumber]) {
          // Create new definition block for the substep
          window.kelmu.data[id].definitions['step' + window.kelmu.data[id].stepNumber] = [[]];
        }

        window.kelmu.data[id].definitions['step' + window.kelmu.data[id].stepNumber].splice(window.kelmu.data[id].subStepNumber + 1, 0, []);
        window.kelmu.data[id].actions.setSubstep(window.kelmu.data[id].subStepNumber + 1);
        window.kelmu.data[id].selectedElementNumber = -1;
        updateView(true, false);
        notifyModifications();
      });

      // Remove substep
      $('<button></button>').text('-Substep').addClass('btn').appendTo(buttons).click(function(e) {
        e.preventDefault();
        if ((window.kelmu.data[id].definitions['step' + window.kelmu.data[id].stepNumber] || []).length > 1) {
          if (confirm('Do you really want to remove this substep?')) {
            // Remove the definition block and make sure that the substep in the editor exists
            window.kelmu.data[id].definitions['step' + window.kelmu.data[id].stepNumber].splice(window.kelmu.data[id].subStepNumber, 1);
            window.kelmu.data[id].actions.setSubstep(Math.max(window.kelmu.data[id].subStepNumber - 1, 0));
          }

          window.kelmu.data[id].selectedElementNumber = -1;
          updateView(true, false);
          notifyModifications();
        } else {
          alert('You cannot remove the only substep!');
        }
      });

      // *********************************************************************************************************

      var newButtons = $('<div></div>').addClass('kelmu-editor-new-buttons');
      newButtons.appendTo(editor);

      var createNewButton = function(name, defaults, values) {
        return $('<button></button>').text(name).addClass('btn').appendTo(newButtons).click(function(e) {
          e.preventDefault();
          var data = window.kelmu.data[id];

          // Create new definition array for this step if it doesn't exist
          if (!data.definitions['step' + data.stepNumber]) {
            data.definitions['step' + data.stepNumber] = [[]];
          }

          data.definitions['step' + data.stepNumber][data.subStepNumber].push($.extend({}, values, defaults));
          data.selectedElementNumber = data.definitions['step' + data.stepNumber][data.subStepNumber].length - 1;
          data.actions.update();
          updateView(true, true);
          notifyModifications();
        });
      };

      // New text annotation
      createNewButton('+Text', window.kelmu.defaults.text, {
        text: 'New text',
        width: 400,
        height: 80,
        left: 10,
        top: 10
      }).appendTo(newButtons);

      // New arrow
      createNewButton('+Arrow', window.kelmu.defaults.arrow, {
        y1: 10,
        x1: 10,
        y2: 60,
        x2: 60
      }).appendTo(newButtons);

      // New line annotation
      createNewButton('+Line', window.kelmu.defaults.line, {
        y1: 10,
        x1: 10,
        y2: 60,
        x2: 60
      }).appendTo(newButtons);

      // New button
      createNewButton('+Button', window.kelmu.defaults.button, {}).appendTo(newButtons);

      // New action event
      createNewButton('+Action', window.kelmu.defaults.action, {}).appendTo(newButtons);

      // New sound
      createNewButton('+Sound', window.kelmu.defaults.sound, {}).click(function(e) {
        e.preventDefault();
        container.find('.kelmu-sound-control').show();
      }).appendTo(newButtons);

      // *********************************************************************************************************
      var componentPanel = $('<div></div>').addClass('kelmu-editor-components');
      componentPanel.appendTo(editor);

      // *********************************************************************************************************

      return editor;

    }
351445
void appendTo( @Nullable String[] mainSelector, CssFormatter formatter ) {
        try {
            String[] sel = selectors;

            for( int s = 0; s < sel.length; s++ ) {
                final String selector = sel[s];
                String str = SelectorUtils.replacePlaceHolder( formatter, selector, this );
                if( selector != str ) {
                    if( sel == selectors ) {
                        sel = sel.clone(); // we does not want change the declaration of this selectors
                    }
                    sel[s] = str;
                }
            }

            if( mainSelector == null ) {        // main ruls
                for( int i = 0; i < sel.length; i++ ) {
                    sel[i] = SelectorUtils.fastReplace( sel[i], "&", "" );
                }
            } else if( sel[0].charAt( 0 ) == '@' ) {
                // media
                bubbling( sel, mainSelector, formatter );
                return;
            } else {
                sel = SelectorUtils.merge( mainSelector, sel );
            }
            formatter.addMixin( this, null, variables );

            if( sel[0].startsWith( "@" ) ) {
                ruleset( sel, formatter );
            } else {
                if( properties.size() > 0 ) {
                    int size0 = formatter.getOutputSize();
                    CssFormatter block = formatter.startBlock( sel );
                    int size1 = block.getOutputSize();
                    appendPropertiesTo( block );
                    int size2 = block.getOutputSize();
                    block.endBlock();
                    if( block == formatter && size1 == size2 ) {
                        formatter.setOutputSize( size0 );
                    }
                }

                for( Formattable prop : properties ) {
                    if( prop instanceof Mixin ) {
                        ((Mixin)prop).appendSubRules( sel, formatter );
                    }
                }

                for( Rule rule : subrules ) {
                    if( rule.isValidCSS( formatter ) && !rule.isInlineRule( formatter) ) {
                        rule.appendTo( params != null ? mainSelector : sel, formatter );
                    }
                }
            }
            formatter.removeMixin();
        } catch( LessException ex ) {
            ex.addPosition( filename, line, column );
            throw ex;
        } catch( Exception ex ) {
            throw createException( ex );
        }
    }
757196
def setEditorData(self, editor, index):
        
        data = unwrapVariant(index.data())
        editor.setCurrentIndex(editor.findText(data))