fix(form-compile,form-decompile): Popup-с-картинкой → PictureDecoration (дизамбигуация типа) + Button DataPath

Корень: тип-детекция элемента видела ключ 'picture' РАНЬШЕ 'popup'/'button' в списке
типов. Но 'picture' это и тип (PictureDecoration), и свойство-иконка у popup/button/cmdBar
(оба строковые → не развязать по значению). Попап «{ popup, picture, representation }»
ошибочно компилировался как <PictureDecoration name="StdPicture.X"> → терялся весь попап
+ каскад. Решение: понизить приоритет picture/picField (в конец TYPE_KEYS) — тип-ключ
владельца выигрывает.

+ Button DataPath: кнопки общих команд несут <DataPath> (Объект.Ref, Items.X.CurrentData.Поле,
2706 в корпусе) — привязка команды к контексту. Не захватывался. Добавлен ключ path у button.

TOTAL diff lines выборки 2.17: 2727 → 2489 (-238). Снапшот button-group (+popup с картинкой)
сертифицирован в 1С (8.3.24). Регресс form-compile 34/34 зелёный на ps + python.
decompile v0.41, compile v1.59.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Nick Shirokov
2026-06-07 15:28:21 +03:00
co-authored by Claude Opus 4.8
parent 5112dbec9e
commit 4430ebc42e
5 changed files with 44 additions and 10 deletions
@@ -22,7 +22,10 @@
{ "button": "Вверх", "command": "Вверх" },
{ "button": "Вниз", "command": "Вниз" }
]},
{ "buttonGroup": "ГруппаГлобальныеКоманды", "commandSource": "FormCommandPanelGlobalCommands" }
{ "buttonGroup": "ГруппаГлобальныеКоманды", "commandSource": "FormCommandPanelGlobalCommands" },
{ "popup": "ПодменюПечать", "title": "Печать", "picture": "StdPicture.Print", "representation": "PictureAndText", "children": [
{ "button": "ПечатьСчёта", "command": "Выполнить" }
]}
]}
],
"attributes": [
@@ -45,11 +45,32 @@
<CommandSource>FormCommandPanelGlobalCommands</CommandSource>
<ExtendedTooltip name="ГруппаГлобальныеКомандыРасширеннаяПодсказка" id="12"/>
</ButtonGroup>
<Popup name="ПодменюПечать" id="13">
<Title>
<v8:item>
<v8:lang>ru</v8:lang>
<v8:content>Печать</v8:content>
</v8:item>
</Title>
<Picture>
<xr:Ref>StdPicture.Print</xr:Ref>
<xr:LoadTransparent>true</xr:LoadTransparent>
</Picture>
<Representation>PictureAndText</Representation>
<ExtendedTooltip name="ПодменюПечатьРасширеннаяПодсказка" id="14"/>
<ChildItems>
<Button name="ПечатьСчёта" id="15">
<Type>CommandBarButton</Type>
<CommandName>Form.Command.Выполнить</CommandName>
<ExtendedTooltip name="ПечатьСчётаРасширеннаяПодсказка" id="16"/>
</Button>
</ChildItems>
</Popup>
</ChildItems>
</CommandBar>
</ChildItems>
<Attributes>
<Attribute name="Объект" id="13">
<Attribute name="Объект" id="17">
<Type>
<v8:Type>cfg:DataProcessorObject.ГруппыКнопок</v8:Type>
</Type>
@@ -57,7 +78,7 @@
</Attribute>
</Attributes>
<Commands>
<Command name="Выполнить" id="14">
<Command name="Выполнить" id="18">
<Title>
<v8:item>
<v8:lang>ru</v8:lang>
@@ -73,7 +94,7 @@
<Action>ВыполнитьОбработка</Action>
<Shortcut>Ctrl+Enter</Shortcut>
</Command>
<Command name="Вверх" id="15">
<Command name="Вверх" id="19">
<Title>
<v8:item>
<v8:lang>ru</v8:lang>
@@ -83,7 +104,7 @@
<Action>ВверхОбработка</Action>
<CurrentRowUse>DontUse</CurrentRowUse>
</Command>
<Command name="Вниз" id="16">
<Command name="Вниз" id="20">
<Title>
<v8:item>
<v8:lang>ru</v8:lang>