Skip to content

Formatting modes

Luca Bellonda edited this page May 18, 2017 · 1 revision

Formatting modes

Insert meta:

  • is meta is not on
  • set meta = on
  • assign current formatting options
  • if there is a directive, it is updated
    • if the directive is up to date, do nothing
  • if there is no directive, it is inserted Undo: undo insert or update reset formatting to previous values set meta to its previous value

Remove meta:

  • if flag is on
    • set flag off
    • values are untouched
  • if a directive is present
    • remove directive

Undo:

  • set flag to previous state
  • if the directive has been removed
    • insert directive

Enable management:

  • when reading
    • if exists directive
      • flag on
      • apply formatting
  • when writing
    • if flag on
      • apply formatting
      • if found directive
        • update directive
  • when new
    • insert metainfo if option is set

Managment:

Enabled NotEnabled
Flag ON Mod val/ins non mod
Flag OFF non mod/ins non mod

Meta format: ?qxmledit type="formatting" indent="on/off" indentValue="n" sortAlphaAttr="on/off" attrLineLen="off/n" Sample: <?qxmledit type="formatting" indent="off" indentValue="0" sortAlphaAttr="off" attrLineLen="off"?>

Clone this wiki locally