fix(cfe-diff): перехватчики в модуле общей формы

Модули заимствованного объекта собирались из Ext/*.bsl без рекурсии и из
Forms/**/Module.bsl; модуль общей формы лежит в CommonForms/X/Ext/Form/Module.bsl
и не попадал никуда. После перехвата методов общей формы (cfe-patch-method
v2.13) такой перехватчик не показывался в отчёте, а проверка переноса (-Mode B)
его пропускала. Теперь модуль общей формы собирается вместе с остальными;
режим A показывает и перехваты событий/команд из её Form.xml — как у форм
владельца. Оба порта, v1.7; вывод портов совпадает.

Кейсы common-form-interceptor и common-form-transfer (на прежней версии падали).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Nick Shirokov
2026-09-28 13:04:08 +03:00
co-authored by Claude Opus 5.5
parent 4f808035c5
commit d070d65cb2
28 changed files with 1204 additions and 2 deletions
+15 -1
View File
@@ -1,4 +1,4 @@
# cfe-diff v1.6 — Analyze and compare 1C configuration extension (CFE)
# cfe-diff v1.7 — Analyze and compare 1C configuration extension (CFE)
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
[CmdletBinding(PositionalBinding=$false)]
param(
@@ -152,6 +152,10 @@ function Get-BslFiles {
foreach ($item in $items) { $bslFiles += $item.FullName }
}
# Модуль общей формы — у неё самой, Ext/Form/Module.bsl (у прочих объектов такого файла нет)
$ownFormModule = Join-Path (Join-Path $extDir "Form") "Module.bsl"
if (Test-Path $ownFormModule) { $bslFiles += (Get-Item $ownFormModule).FullName }
# Forms
$formsDir = Join-Path $objDir "Forms"
if (Test-Path $formsDir) {
@@ -433,6 +437,16 @@ if ($Mode -eq "A") {
}
}
}
# Общая форма — сама форма: перехваты событий и команд из её Ext/Form.xml
if ($obj.Type -eq "CommonForm") {
$cfFormXml = Join-Path (Join-Path (Join-Path (Join-Path $ExtensionPath $info.DirName) $info.Name) "Ext") "Form.xml"
$cfi = Get-FormInterceptors $cfFormXml
if ($cfi -and $cfi.Interceptors.Count -gt 0) {
Write-Host " Form:"
foreach ($ic in $cfi.Interceptors) { Write-Host " $ic" }
}
}
} else {
$ownList += $obj
Write-Host " [OWN] $($obj.Type).$($obj.Name)"
+15 -1
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
# cfe-diff v1.6 — Analyze and compare 1C configuration extension (CFE)
# cfe-diff v1.7 — Analyze and compare 1C configuration extension (CFE)
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
import argparse
@@ -154,6 +154,11 @@ def get_bsl_files(obj_type, obj_name, extension_path):
if item.lower().endswith(".bsl"):
bsl_files.append(os.path.join(ext_dir, item))
# Модуль общей формы — у неё самой, Ext/Form/Module.bsl (у прочих объектов такого файла нет)
own_form_module = os.path.join(ext_dir, "Form", "Module.bsl")
if os.path.isfile(own_form_module):
bsl_files.append(own_form_module)
# Forms
forms_dir = os.path.join(obj_dir, "Forms")
if os.path.isdir(forms_dir):
@@ -444,6 +449,15 @@ def mode_a(objects, extension_path):
print(f" {ic}")
else:
print(f" Form.{fn} ({form_tag})")
# Общая форма — сама форма: перехваты событий и команд из её Ext/Form.xml
if obj["Type"] == "CommonForm":
cf_form_xml = os.path.join(extension_path, info["DirName"], info["Name"], "Ext", "Form.xml")
cfi = get_form_interceptors(cf_form_xml)
if cfi is not None and len(cfi["Interceptors"]) > 0:
print(" Form:")
for ic in cfi["Interceptors"]:
print(f" {ic}")
else:
own_list.append(obj)
print(f" [OWN] {obj['Type']}.{obj['Name']}")