mirror of
https://github.com/1C-Company/v8-code-style.git
synced 2024-12-01 02:32:18 +02:00
Добавлена проверка области событий (#1081)
* Добавлена проверка области событий #773 #330
This commit is contained in:
parent
1c6632acb0
commit
2232919a08
@ -46,6 +46,7 @@
|
||||
1. Mежду "НачатьТранзакцию()" и "Попытка" есть исполняемый код, который может вызвать исключение
|
||||
2. Не найден оператор "Попытка" после вызова "НачатьТранзакцию()"
|
||||
- Отсутствует удаление временного файла после использования.
|
||||
- Структура модуля. Добавлена проверка области событий.
|
||||
- Отсутствует включение безопасного режима перед вызовом метода "Выполнить" или "Вычислить"
|
||||
|
||||
|
||||
|
@ -0,0 +1,37 @@
|
||||
# The Event handlers section contains the event handlers of the object module (OnWrite, Posting, and so on)
|
||||
|
||||
Checks the region of event handlers for methods related only to handlers
|
||||
|
||||
## Noncompliant Code Example
|
||||
|
||||
```bsl
|
||||
|
||||
#Region EventHandlers
|
||||
|
||||
Procedure Test()
|
||||
//TODO: Insert the handler content
|
||||
EndProcedure
|
||||
|
||||
#EndRegion
|
||||
|
||||
```bsl
|
||||
|
||||
## Compliant Solution
|
||||
|
||||
```bsl
|
||||
|
||||
#Region EventHandlers
|
||||
|
||||
Procedure FormGetProcessing(FormType, Parameters, SelectedForm, AdditionalInformation, StandardProcessing)
|
||||
//TODO: Insert the handler content
|
||||
EndProcedure
|
||||
|
||||
#EndRegion
|
||||
|
||||
```bsl
|
||||
|
||||
## See
|
||||
|
||||
|
||||
- [Module structure](https://1c-dn.com/library/module_structure/)
|
||||
- [Module structure](https://support.1ci.com/hc/en-us/articles/360011002360-Module-structure)
|
@ -0,0 +1,34 @@
|
||||
# Раздел «Обработчики событий» содержит только методы являющиеся обработчиками событий
|
||||
|
||||
Проверяет регион обработчиков событий на методов относящихся только к обработчикам
|
||||
|
||||
## Неправильно
|
||||
|
||||
```bsl
|
||||
|
||||
#Область ОбработчикиСобытий
|
||||
|
||||
Процедура Тест()
|
||||
КонецПроцедуры
|
||||
|
||||
#КонецОбласти
|
||||
|
||||
```
|
||||
|
||||
## Правильно
|
||||
|
||||
```bsl
|
||||
|
||||
#Область ОбработчикиСобытий
|
||||
|
||||
Процедура ОбработкаПолученияФормы(ВидФормы, Параметры, ВыбраннаяФорма, ДополнительнаяИнформация, СтандартнаяОбработка)
|
||||
КонецПроцедуры
|
||||
|
||||
#КонецОбласти
|
||||
|
||||
```
|
||||
|
||||
## См.
|
||||
|
||||
|
||||
- [Структура модуля](https://its.1c.ru/db/v8std#content:455:hdoc)
|
@ -251,6 +251,10 @@
|
||||
category="com.e1c.v8codestyle.bsl"
|
||||
class="com.e1c.v8codestyle.internal.bsl.ExecutableExtensionFactory:com.e1c.v8codestyle.bsl.check.FormSelfReferenceOutdatedCheck">
|
||||
</check>
|
||||
<check
|
||||
category="com.e1c.v8codestyle.bsl"
|
||||
class="com.e1c.v8codestyle.internal.bsl.ExecutableExtensionFactory:com.e1c.v8codestyle.bsl.check.ModuleStructureEventRegionsCheck">
|
||||
</check>
|
||||
<check
|
||||
category="com.e1c.v8codestyle.bsl"
|
||||
class="com.e1c.v8codestyle.internal.bsl.ExecutableExtensionFactory:com.e1c.v8codestyle.bsl.check.CommonModuleNamedSelfReferenceCheck">
|
||||
|
@ -69,7 +69,7 @@ public abstract class AbstractModuleStructureCheck
|
||||
* @param object the region to find the parent, cannot be {@code null}.
|
||||
* @return the parent region, cannot return {@code null}.
|
||||
*/
|
||||
protected Optional<RegionPreprocessor> getParentRegion(RegionPreprocessor object)
|
||||
protected Optional<RegionPreprocessor> getFirstParentRegion(RegionPreprocessor object)
|
||||
{
|
||||
EObject parent = object.eContainer();
|
||||
PreprocessorItem lastItem = null;
|
||||
@ -97,4 +97,39 @@ public abstract class AbstractModuleStructureCheck
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the top parent region.
|
||||
*
|
||||
* @param object the object, cannot be {@code null}.
|
||||
* @return the top parent region, cannot return {@code null}.
|
||||
*/
|
||||
protected Optional<RegionPreprocessor> getTopParentRegion(EObject object)
|
||||
{
|
||||
EObject parent = object.eContainer();
|
||||
PreprocessorItem lastItem = null;
|
||||
RegionPreprocessor region = null;
|
||||
do
|
||||
{
|
||||
if (parent instanceof RegionPreprocessor)
|
||||
{
|
||||
RegionPreprocessor parentRegion = (RegionPreprocessor)parent;
|
||||
if (lastItem != null && parentRegion.getItem().equals(lastItem))
|
||||
{
|
||||
region = parentRegion;
|
||||
}
|
||||
else
|
||||
{
|
||||
lastItem = null;
|
||||
}
|
||||
}
|
||||
else if (parent instanceof PreprocessorItem)
|
||||
{
|
||||
lastItem = (PreprocessorItem)parent;
|
||||
}
|
||||
parent = parent.eContainer();
|
||||
}
|
||||
while (parent != null);
|
||||
|
||||
return Optional.ofNullable(region);
|
||||
}
|
||||
}
|
||||
|
@ -146,6 +146,14 @@ final class Messages
|
||||
public static String ModuleUnusedLocalVariableCheck_Unused_local_variable__0;
|
||||
public static String ModuleUnusedLocalVariableCheck_Probably_variable_not_initilized_yet__0;
|
||||
|
||||
public static String ModuleStructureEventRegionsCheck_Description;
|
||||
|
||||
public static String ModuleStructureEventRegionsCheck_Event_handler__0__not_region__1;
|
||||
|
||||
public static String ModuleStructureEventRegionsCheck_Only_event_methods__0;
|
||||
|
||||
public static String ModuleStructureEventRegionsCheck_Title;
|
||||
|
||||
public static String QueryInLoop_check_query_in_infinite_loop;
|
||||
public static String QueryInLoop_description;
|
||||
public static String QueryInLoop_Loop_has_method_with_query__0;
|
||||
|
@ -0,0 +1,117 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (C) 2022, 1C-Soft LLC and others.
|
||||
*
|
||||
* This program and the accompanying materials are made
|
||||
* available under the terms of the Eclipse Public License 2.0
|
||||
* which is available at https://www.eclipse.org/legal/epl-2.0/
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*
|
||||
* Contributors:
|
||||
* 1C-Soft LLC - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package com.e1c.v8codestyle.bsl.check;
|
||||
|
||||
import static com._1c.g5.v8.dt.bsl.model.BslPackage.Literals.METHOD;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
import java.util.Optional;
|
||||
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
|
||||
import com._1c.g5.v8.dt.bsl.model.Method;
|
||||
import com._1c.g5.v8.dt.bsl.model.ModuleType;
|
||||
import com._1c.g5.v8.dt.bsl.model.RegionPreprocessor;
|
||||
import com._1c.g5.v8.dt.core.platform.IV8Project;
|
||||
import com._1c.g5.v8.dt.core.platform.IV8ProjectManager;
|
||||
import com._1c.g5.v8.dt.mcore.McorePackage;
|
||||
import com._1c.g5.v8.dt.metadata.mdclass.ScriptVariant;
|
||||
import com.e1c.g5.v8.dt.check.CheckComplexity;
|
||||
import com.e1c.g5.v8.dt.check.ICheckParameters;
|
||||
import com.e1c.g5.v8.dt.check.components.ModuleTopObjectNameFilterExtension;
|
||||
import com.e1c.g5.v8.dt.check.settings.IssueSeverity;
|
||||
import com.e1c.g5.v8.dt.check.settings.IssueType;
|
||||
import com.e1c.v8codestyle.bsl.ModuleStructureSection;
|
||||
import com.e1c.v8codestyle.check.StandardCheckExtension;
|
||||
import com.e1c.v8codestyle.internal.bsl.BslPlugin;
|
||||
import com.google.inject.Inject;
|
||||
|
||||
/**
|
||||
* Checks the region of event handlers for methods related only to handlers.
|
||||
*
|
||||
* @author Artem Iliukhin
|
||||
*
|
||||
*/
|
||||
public class ModuleStructureEventRegionsCheck
|
||||
extends AbstractModuleStructureCheck
|
||||
{
|
||||
private static final String CHECK_ID = "module-structure-event-regions"; //$NON-NLS-1$
|
||||
|
||||
private final IV8ProjectManager v8ProjectManager;
|
||||
|
||||
@Inject
|
||||
public ModuleStructureEventRegionsCheck(IV8ProjectManager v8ProjectManager)
|
||||
{
|
||||
super();
|
||||
this.v8ProjectManager = v8ProjectManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCheckId()
|
||||
{
|
||||
return CHECK_ID;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configureCheck(CheckConfigurer builder)
|
||||
{
|
||||
builder.title(Messages.ModuleStructureEventRegionsCheck_Title)
|
||||
.description(Messages.ModuleStructureEventRegionsCheck_Description)
|
||||
.complexity(CheckComplexity.NORMAL)
|
||||
.severity(IssueSeverity.MINOR)
|
||||
.issueType(IssueType.CODE_STYLE)
|
||||
.extension(new ModuleTopObjectNameFilterExtension())
|
||||
.extension(new StandardCheckExtension(getCheckId(), BslPlugin.PLUGIN_ID))
|
||||
.module()
|
||||
.checkedObjectType(METHOD);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void check(Object object, ResultAcceptor resultAceptor, ICheckParameters parameters,
|
||||
IProgressMonitor monitor)
|
||||
{
|
||||
Method method = (Method)object;
|
||||
|
||||
IV8Project project = v8ProjectManager.getProject(method);
|
||||
|
||||
ScriptVariant scriptVariant = project.getScriptVariant();
|
||||
|
||||
ModuleType moduleType = getModuleType(method);
|
||||
if (ModuleType.FORM_MODULE.equals(moduleType))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Optional<RegionPreprocessor> region = getTopParentRegion(method);
|
||||
if (region.isEmpty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
String name = region.get().getName();
|
||||
String eventHandlersName = ModuleStructureSection.EVENT_HANDLERS.getName(scriptVariant);
|
||||
if (eventHandlersName.equals(name) && !method.isEvent())
|
||||
{
|
||||
resultAceptor.addIssue(
|
||||
MessageFormat.format(Messages.ModuleStructureEventRegionsCheck_Only_event_methods__0, name),
|
||||
McorePackage.Literals.NAMED_ELEMENT__NAME);
|
||||
}
|
||||
else if (!eventHandlersName.equals(name) && method.isEvent())
|
||||
{
|
||||
resultAceptor.addIssue(
|
||||
MessageFormat.format(Messages.ModuleStructureEventRegionsCheck_Event_handler__0__not_region__1,
|
||||
method.getName(), eventHandlersName), McorePackage.Literals.NAMED_ELEMENT__NAME);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -98,7 +98,7 @@ public class ModuleStructureTopRegionCheck
|
||||
return;
|
||||
}
|
||||
|
||||
Optional<RegionPreprocessor> parent = getParentRegion(region);
|
||||
Optional<RegionPreprocessor> parent = getFirstParentRegion(region);
|
||||
if (parent.isPresent())
|
||||
{
|
||||
resultAceptor.addIssue(Messages.ModuleStructureTopRegionCheck_error_message, NAMED_ELEMENT__NAME);
|
||||
|
@ -211,6 +211,14 @@ ModuleUnusedMethodCheck_Title = Unused method check
|
||||
|
||||
ModuleUnusedMethodCheck_Unused_method__0 = Unused method "{0}"
|
||||
|
||||
ModuleStructureEventRegionsCheck_Description=Checks the region of event handlers for the existence of methods related only to handlers
|
||||
|
||||
ModuleStructureEventRegionsCheck_Event_handler__0__not_region__1=The event handler "{0}" should be placed in the "{1}" region
|
||||
|
||||
ModuleStructureEventRegionsCheck_Only_event_methods__0=Only event methods can be placed in the "{0}" region
|
||||
|
||||
ModuleStructureEventRegionsCheck_Title=Checks the region of event handlers for the existence of methods related only to handlers
|
||||
|
||||
NewColorCheck_Use_style_elements=To change the design, you should use style elements, and not set specific values directly in the controls
|
||||
|
||||
NewColorCheck_Use_style_elements_not_specific_values=To change the design, you should use style elements, and not set specific values directly in the controls. This is required in order for similar controls to look the same in all forms where they occur.
|
||||
|
@ -220,6 +220,14 @@ ModuleUnusedMethodCheck_Title = Проверка неиспользуемых м
|
||||
|
||||
ModuleUnusedMethodCheck_Unused_method__0 = Неиспользуемый метод "{0}"
|
||||
|
||||
ModuleStructureEventRegionsCheck_Only_event_methods__0 = В области ''{0}'' следует размещать только обработчики событий
|
||||
|
||||
ModuleStructureEventRegionsCheck_Description=Проверяет область обработчиков событий на наличие методов относящихся только к обработчикам
|
||||
|
||||
ModuleStructureEventRegionsCheck_Event_handler__0__not_region__1=Обработчик событий "{0}" следует разместить в область "{1}"
|
||||
|
||||
ModuleStructureEventRegionsCheck_Title=Проверяет область обработчиков событий на наличие методов относящихся только к обработчикам
|
||||
|
||||
NewColorCheck_Use_style_elements=Для изменения оформления следует использовать элементы стиля, а не задавать конкретные значения непосредственно в элементах управления
|
||||
|
||||
NewColorCheck_Use_style_elements_not_specific_values=Для изменения оформления следует использовать элементы стиля, а не задавать конкретные значения непосредственно в элементах управления. Это требуется для того, чтобы аналогичные элементы управления выглядели одинаково во всех формах, где они встречаются.
|
||||
|
@ -0,0 +1,99 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (C) 2022, 1C-Soft LLC and others.
|
||||
*
|
||||
* This program and the accompanying materials are made
|
||||
* available under the terms of the Eclipse Public License 2.0
|
||||
* which is available at https://www.eclipse.org/legal/epl-2.0/
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*
|
||||
* Contributors:
|
||||
* 1C-Soft LLC - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package com.e1c.v8codestyle.bsl.check.itests;
|
||||
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import com._1c.g5.v8.bm.core.IBmObject;
|
||||
import com._1c.g5.v8.dt.bsl.model.Module;
|
||||
import com._1c.g5.v8.dt.core.platform.IDtProject;
|
||||
import com._1c.g5.v8.dt.metadata.mdclass.Catalog;
|
||||
import com._1c.g5.v8.dt.validation.marker.Marker;
|
||||
import com.e1c.g5.v8.dt.testing.check.SingleProjectReadOnlyCheckTestBase;
|
||||
import com.e1c.v8codestyle.bsl.check.ModuleStructureEventRegionsCheck;
|
||||
|
||||
/**
|
||||
* Tests for {@link ModuleStructureEventRegionsCheck} check.
|
||||
*
|
||||
* @author Artem Iliukhin
|
||||
*/
|
||||
public class ModuleStructureEventRegionsCheckTest
|
||||
extends SingleProjectReadOnlyCheckTestBase
|
||||
{
|
||||
|
||||
private static final String CHECK_ID = "module-structure-event-regions"; //$NON-NLS-1$
|
||||
private static final String PROJECT_NAME = "StructureModule";
|
||||
|
||||
private static final String FQN_CATALOG_MODULE_MANAGER_EVENT = "Catalog.CatalogInRegion";
|
||||
private static final String FQN_CATALOG_MODULE_MANAGER_EVENT_WRONG_REGION = "Catalog.CatalogInWrongRegion";
|
||||
private static final String FQN_CATALOG_MODULE_MANAGER_EVENT_WRONG_METHOD = "Catalog.CatalogInRegionWrongMethod";
|
||||
|
||||
@Override
|
||||
protected String getTestConfigurationName()
|
||||
{
|
||||
return PROJECT_NAME;
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testEventModuleManagerInWrongRegion() throws Exception
|
||||
{
|
||||
IDtProject dtProject = dtProjectManager.getDtProject(PROJECT_NAME);
|
||||
assertNotNull(dtProject);
|
||||
|
||||
IBmObject mdObject = getTopObjectByFqn(FQN_CATALOG_MODULE_MANAGER_EVENT_WRONG_REGION, dtProject);
|
||||
assertTrue(mdObject instanceof Catalog);
|
||||
|
||||
Module module = ((Catalog)mdObject).getManagerModule();
|
||||
assertNotNull(module);
|
||||
|
||||
Marker marker = getFirstMarker(CHECK_ID, module.eResource().getURI(), getProject());
|
||||
assertNotNull(marker);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testEventModuleManagerInRegion() throws Exception
|
||||
{
|
||||
IDtProject dtProject = dtProjectManager.getDtProject(PROJECT_NAME);
|
||||
assertNotNull(dtProject);
|
||||
|
||||
IBmObject mdObject = getTopObjectByFqn(FQN_CATALOG_MODULE_MANAGER_EVENT, dtProject);
|
||||
assertTrue(mdObject instanceof Catalog);
|
||||
|
||||
Module module = ((Catalog)mdObject).getManagerModule();
|
||||
assertNotNull(module);
|
||||
|
||||
Marker marker = getFirstMarker(CHECK_ID, module.eResource().getURI(), getProject());
|
||||
assertNull(marker);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testEventModuleManagerInRegionWrongMethod() throws Exception
|
||||
{
|
||||
IDtProject dtProject = dtProjectManager.getDtProject(PROJECT_NAME);
|
||||
assertNotNull(dtProject);
|
||||
|
||||
IBmObject mdObject = getTopObjectByFqn(FQN_CATALOG_MODULE_MANAGER_EVENT_WRONG_METHOD, dtProject);
|
||||
assertTrue(mdObject instanceof Catalog);
|
||||
|
||||
Module module = ((Catalog)mdObject).getManagerModule();
|
||||
assertNotNull(module);
|
||||
|
||||
Marker marker = getFirstMarker(CHECK_ID, module.eResource().getURI(), getProject());
|
||||
assertNotNull(marker);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>StructureModule</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
|
||||
<nature>com._1c.g5.v8.dt.core.V8ConfigurationNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
@ -0,0 +1,2 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
@ -0,0 +1,2 @@
|
||||
Manifest-Version: 1.0
|
||||
Runtime-Version: 8.3.19
|
@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<mdclass:Catalog xmlns:mdclass="http://g5.1c.ru/v8/dt/metadata/mdclass" uuid="7554fd7b-1aae-4c2b-9b8e-7db1ef2ce0e7">
|
||||
<producedTypes>
|
||||
<objectType typeId="41fd1664-4ad7-433a-b025-d8c97a245a92" valueTypeId="6f02f9f5-e229-4fef-9e9c-c27d8e151763"/>
|
||||
<refType typeId="43837336-2bb9-485f-9679-94c5f0b95793" valueTypeId="305ebe64-eda2-4b70-bbbf-9074298a553c"/>
|
||||
<selectionType typeId="337cfed5-14bf-411e-ae5c-de406a46d809" valueTypeId="eacd6325-3fe5-4ed6-bf7e-5d8275505338"/>
|
||||
<listType typeId="ddb0ce02-6c0e-43be-9b04-30f12017a170" valueTypeId="5169b33b-0544-4cc0-bf5f-15195f7d05f3"/>
|
||||
<managerType typeId="724de0d2-b37c-4e8c-8a0d-8b3f612121bb" valueTypeId="7aba68d3-e10a-45eb-b433-f057018e1b20"/>
|
||||
</producedTypes>
|
||||
<name>CatalogInRegion</name>
|
||||
<synonym>
|
||||
<key>en</key>
|
||||
<value>Catalog in region</value>
|
||||
</synonym>
|
||||
<useStandardCommands>true</useStandardCommands>
|
||||
<inputByString>Catalog.CatalogInRegion.StandardAttribute.Code</inputByString>
|
||||
<inputByString>Catalog.CatalogInRegion.StandardAttribute.Description</inputByString>
|
||||
<fullTextSearchOnInputByString>DontUse</fullTextSearchOnInputByString>
|
||||
<createOnInput>Use</createOnInput>
|
||||
<dataLockControlMode>Managed</dataLockControlMode>
|
||||
<fullTextSearch>Use</fullTextSearch>
|
||||
<levelCount>2</levelCount>
|
||||
<foldersOnTop>true</foldersOnTop>
|
||||
<codeLength>9</codeLength>
|
||||
<descriptionLength>25</descriptionLength>
|
||||
<codeType>String</codeType>
|
||||
<codeAllowedLength>Variable</codeAllowedLength>
|
||||
<checkUnique>true</checkUnique>
|
||||
<autonumbering>true</autonumbering>
|
||||
<defaultPresentation>AsDescription</defaultPresentation>
|
||||
<editType>InDialog</editType>
|
||||
<choiceMode>BothWays</choiceMode>
|
||||
</mdclass:Catalog>
|
@ -0,0 +1,21 @@
|
||||
|
||||
#Region Public
|
||||
// Enter code here.
|
||||
#EndRegion
|
||||
|
||||
#Region EventHandlers
|
||||
|
||||
Procedure FormGetProcessing(FormType, Parameters, SelectedForm, AdditionalInformation, StandardProcessing)
|
||||
//TODO: Insert the handler content
|
||||
EndProcedure
|
||||
|
||||
#EndRegion
|
||||
|
||||
#Region Internal
|
||||
// Enter code here.
|
||||
#EndRegion
|
||||
|
||||
#Region Private
|
||||
// Enter code here.
|
||||
#EndRegion
|
||||
|
@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<mdclass:Catalog xmlns:mdclass="http://g5.1c.ru/v8/dt/metadata/mdclass" uuid="c3e00100-bd0f-44c9-8a49-ba0b4598dad6">
|
||||
<producedTypes>
|
||||
<objectType typeId="02d0241e-b30d-47a8-a999-562ab1aab28e" valueTypeId="7e870701-b99a-4dbf-94a8-1c2d9e6c7619"/>
|
||||
<refType typeId="216dbcfd-492c-456c-a2fb-25578626cbb6" valueTypeId="94b0a442-4f15-4771-861b-83cb8c399a44"/>
|
||||
<selectionType typeId="2aa00218-ef55-44a5-b469-ec45dd8f6c43" valueTypeId="47e171f7-c798-4df2-8912-40e76bed8cfe"/>
|
||||
<listType typeId="d67b3a8f-c52c-4558-a492-c1d9a36e31a9" valueTypeId="1b754282-1fff-4618-b9b9-3767f81596c9"/>
|
||||
<managerType typeId="886bb169-6f40-4147-acae-6037083257bb" valueTypeId="551c5fdc-3a85-4a1a-a4a4-c1ab6cee0804"/>
|
||||
</producedTypes>
|
||||
<name>CatalogInRegionWrongMethod</name>
|
||||
<synonym>
|
||||
<key>en</key>
|
||||
<value>Catalog in region wrong method</value>
|
||||
</synonym>
|
||||
<useStandardCommands>true</useStandardCommands>
|
||||
<inputByString>Catalog.CatalogInRegionWrongMethod.StandardAttribute.Code</inputByString>
|
||||
<inputByString>Catalog.CatalogInRegionWrongMethod.StandardAttribute.Description</inputByString>
|
||||
<fullTextSearchOnInputByString>DontUse</fullTextSearchOnInputByString>
|
||||
<createOnInput>Use</createOnInput>
|
||||
<dataLockControlMode>Managed</dataLockControlMode>
|
||||
<fullTextSearch>Use</fullTextSearch>
|
||||
<levelCount>2</levelCount>
|
||||
<foldersOnTop>true</foldersOnTop>
|
||||
<codeLength>9</codeLength>
|
||||
<descriptionLength>25</descriptionLength>
|
||||
<codeType>String</codeType>
|
||||
<codeAllowedLength>Variable</codeAllowedLength>
|
||||
<checkUnique>true</checkUnique>
|
||||
<autonumbering>true</autonumbering>
|
||||
<defaultPresentation>AsDescription</defaultPresentation>
|
||||
<editType>InDialog</editType>
|
||||
<choiceMode>BothWays</choiceMode>
|
||||
</mdclass:Catalog>
|
@ -0,0 +1,21 @@
|
||||
|
||||
#Region Public
|
||||
// Enter code here.
|
||||
#EndRegion
|
||||
|
||||
#Region EventHandlers
|
||||
|
||||
Procedure WrongMethod()
|
||||
//TODO: Insert the handler content
|
||||
EndProcedure
|
||||
|
||||
#EndRegion
|
||||
|
||||
#Region Internal
|
||||
// Enter code here.
|
||||
#EndRegion
|
||||
|
||||
#Region Private
|
||||
// Enter code here.
|
||||
#EndRegion
|
||||
|
@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<mdclass:Catalog xmlns:mdclass="http://g5.1c.ru/v8/dt/metadata/mdclass" uuid="02ef69dd-5bf4-46a2-baf7-17bd9be7db0b">
|
||||
<producedTypes>
|
||||
<objectType typeId="867df026-2827-4e71-bb0f-a4174a95bc66" valueTypeId="a551543e-fefd-4daa-a3ce-d350b84bff05"/>
|
||||
<refType typeId="e53c6094-b618-4184-9257-a78a0d5ee2f8" valueTypeId="c58fc64c-9018-4222-abf0-b4c9956a86f1"/>
|
||||
<selectionType typeId="a001e89a-971a-4b6c-abbb-ff53648a9e2f" valueTypeId="33c9a7a7-1c08-404a-9a9f-23e2c29f26ae"/>
|
||||
<listType typeId="b6f0af87-c1ad-48f3-aa53-c7137ae78d8c" valueTypeId="575d5e1d-16fd-4149-ac22-54aba6977243"/>
|
||||
<managerType typeId="daaa6826-1ab3-431a-ab8e-3655bad16fc2" valueTypeId="1c52dab2-3608-429c-bf4a-6b823c49ae49"/>
|
||||
</producedTypes>
|
||||
<name>CatalogInWrongRegion</name>
|
||||
<synonym>
|
||||
<key>en</key>
|
||||
<value>Catalog in wrong region</value>
|
||||
</synonym>
|
||||
<useStandardCommands>true</useStandardCommands>
|
||||
<inputByString>Catalog.CatalogInWrongRegion.StandardAttribute.Code</inputByString>
|
||||
<inputByString>Catalog.CatalogInWrongRegion.StandardAttribute.Description</inputByString>
|
||||
<fullTextSearchOnInputByString>DontUse</fullTextSearchOnInputByString>
|
||||
<createOnInput>Use</createOnInput>
|
||||
<dataLockControlMode>Managed</dataLockControlMode>
|
||||
<fullTextSearch>Use</fullTextSearch>
|
||||
<levelCount>2</levelCount>
|
||||
<foldersOnTop>true</foldersOnTop>
|
||||
<codeLength>9</codeLength>
|
||||
<descriptionLength>25</descriptionLength>
|
||||
<codeType>String</codeType>
|
||||
<codeAllowedLength>Variable</codeAllowedLength>
|
||||
<checkUnique>true</checkUnique>
|
||||
<autonumbering>true</autonumbering>
|
||||
<defaultPresentation>AsDescription</defaultPresentation>
|
||||
<editType>InDialog</editType>
|
||||
<choiceMode>BothWays</choiceMode>
|
||||
</mdclass:Catalog>
|
@ -0,0 +1,21 @@
|
||||
|
||||
#Region Public
|
||||
// Enter code here.
|
||||
#EndRegion
|
||||
|
||||
#Region EventHandlers
|
||||
// Enter code here.
|
||||
#EndRegion
|
||||
|
||||
#Region Internal
|
||||
// Enter code here.
|
||||
#EndRegion
|
||||
|
||||
#Region Private
|
||||
|
||||
Procedure FormGetProcessing(FormType, Parameters, SelectedForm, AdditionalInformation, StandardProcessing)
|
||||
//TODO: Insert the handler content
|
||||
EndProcedure
|
||||
|
||||
#EndRegion
|
||||
|
@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<cmi:CommandInterface xmlns:cmi="http://g5.1c.ru/v8/dt/cmi"/>
|
@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<mdclass:Configuration xmlns:mdclass="http://g5.1c.ru/v8/dt/metadata/mdclass" uuid="da3da622-85c7-4a68-9cb7-0ee5aa7448e7">
|
||||
<name>StructureModule</name>
|
||||
<synonym>
|
||||
<key>en</key>
|
||||
<value>Structure module</value>
|
||||
</synonym>
|
||||
<containedObjects classId="9cd510cd-abfc-11d4-9434-004095e12fc7" objectId="11fab9f4-1ac8-4b90-974c-148dd1f1ee29"/>
|
||||
<containedObjects classId="9fcd25a0-4822-11d4-9414-008048da11f9" objectId="23524e35-34a7-4bc8-94d1-c314704aad64"/>
|
||||
<containedObjects classId="e3687481-0a87-462c-a166-9f34594f9bba" objectId="bf5898bf-f470-4416-bbdf-78425a7ed95d"/>
|
||||
<containedObjects classId="9de14907-ec23-4a07-96f0-85521cb6b53b" objectId="b1d7c42c-2468-422c-aae9-22ca0f17d470"/>
|
||||
<containedObjects classId="51f2d5d8-ea4d-4064-8892-82951750031e" objectId="95b2fb6a-d0b0-4bba-933f-f25846ff134c"/>
|
||||
<containedObjects classId="e68182ea-4237-4383-967f-90c1e3370bc7" objectId="212dac74-8939-4083-bd96-464aef7f5c0a"/>
|
||||
<containedObjects classId="fb282519-d103-4dd3-bc12-cb271d631dfc" objectId="536422e3-5396-4bae-99a5-bdb058bfc993"/>
|
||||
<configurationExtensionCompatibilityMode>8.3.20</configurationExtensionCompatibilityMode>
|
||||
<defaultRunMode>ManagedApplication</defaultRunMode>
|
||||
<usePurposes>PersonalComputer</usePurposes>
|
||||
<usedMobileApplicationFunctionalities>
|
||||
<functionality>
|
||||
<use>true</use>
|
||||
</functionality>
|
||||
<functionality>
|
||||
<functionality>OSBackup</functionality>
|
||||
<use>true</use>
|
||||
</functionality>
|
||||
</usedMobileApplicationFunctionalities>
|
||||
<defaultLanguage>Language.English</defaultLanguage>
|
||||
<dataLockControlMode>Managed</dataLockControlMode>
|
||||
<objectAutonumerationMode>NotAutoFree</objectAutonumerationMode>
|
||||
<modalityUseMode>DontUse</modalityUseMode>
|
||||
<synchronousPlatformExtensionAndAddInCallUseMode>DontUse</synchronousPlatformExtensionAndAddInCallUseMode>
|
||||
<compatibilityMode>8.3.20</compatibilityMode>
|
||||
<languages uuid="52ec6aa9-b177-434c-b409-1c456749c996">
|
||||
<name>English</name>
|
||||
<synonym>
|
||||
<key>en</key>
|
||||
<value>English</value>
|
||||
</synonym>
|
||||
<languageCode>en</languageCode>
|
||||
</languages>
|
||||
<catalogs>Catalog.CatalogInRegion</catalogs>
|
||||
<catalogs>Catalog.CatalogInRegionWrongMethod</catalogs>
|
||||
<catalogs>Catalog.CatalogInWrongRegion</catalogs>
|
||||
</mdclass:Configuration>
|
@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<cmi:CommandInterface xmlns:cmi="http://g5.1c.ru/v8/dt/cmi"/>
|
Loading…
Reference in New Issue
Block a user