mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-07-29 16:11:01 +03:00
feat(form-decompile,form-compile): commandSource у ButtonGroup/CommandBar
ButtonGroup/CommandBar несут <CommandSource> (источник команд группы): Form (2478), FormCommandPanelGlobalCommands (1267), Item.<ИмяЭлемента> (команды конкретного элемента-таблицы). Декомпилятор не захватывал → LOST в форменных/элементных панелях. Добавлен ключ commandSource (эмитится «как есть», после Title до Representation/Autofill). Декомпилятор захватывает у ButtonGroup и CommandBar. TOTAL diff lines выборки 2.17: 5189 → 5149 (-40). ButtonGroup/CommandBar CommandSource LOST → 0. Снапшот button-group (группа глобальных команд с commandSource) сертифицирован в 1С (8.3.24). Регресс form-compile 33/33 зелёный на ps + python. decompile v0.32, compile v1.50. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
c998139c89
commit
7eb825b3a7
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
# form-compile v1.49 — Compile 1C managed form from JSON or object metadata
|
||||
# form-compile v1.50 — Compile 1C managed form from JSON or object metadata
|
||||
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
||||
import argparse
|
||||
import copy
|
||||
@@ -1780,7 +1780,7 @@ KNOWN_KEYS = {
|
||||
"excludedCommands",
|
||||
"pagesRepresentation",
|
||||
"type", "command", "commandName", "stdCommand", "defaultButton", "locationInCommandBar",
|
||||
"commandBar", "contextMenu",
|
||||
"commandBar", "contextMenu", "commandSource",
|
||||
"src", "valuesPicture", "loadTransparent",
|
||||
"autofill",
|
||||
"choiceMode", "initialTreeView", "enableDrag", "enableStartDrag",
|
||||
@@ -3173,6 +3173,9 @@ def emit_command_bar(lines, el, name, eid, indent):
|
||||
|
||||
emit_title(lines, el, name, inner)
|
||||
|
||||
if el.get('commandSource'):
|
||||
lines.append(f'{inner}<CommandSource>{el["commandSource"]}</CommandSource>')
|
||||
|
||||
if el.get('autofill') is True:
|
||||
lines.append(f'{inner}<Autofill>true</Autofill>')
|
||||
|
||||
@@ -3224,6 +3227,9 @@ def emit_button_group(lines, el, name, eid, indent):
|
||||
|
||||
emit_title(lines, el, name, inner)
|
||||
|
||||
if el.get('commandSource'):
|
||||
lines.append(f'{inner}<CommandSource>{el["commandSource"]}</CommandSource>')
|
||||
|
||||
if el.get('representation'):
|
||||
lines.append(f'{inner}<Representation>{el["representation"]}</Representation>')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user