mirror of
https://github.com/1C-Company/v8-code-style.git
synced 2024-12-01 02:32:18 +02:00
parent
f91fc28cbc
commit
dcc2c41577
@ -34,6 +34,7 @@
|
||||
- Проверка ОбменДанными.Загрузка в обработчике события
|
||||
- Конструкция "Попытка...Исключение...КонецПопытки" не содержит кода в исключении
|
||||
- Аннотация для метода написана канонически
|
||||
- Используется аннотация &ИзменениеИКонтроль вместо &Вместо
|
||||
|
||||
#### Запросы
|
||||
|
||||
|
@ -0,0 +1,34 @@
|
||||
# Use pragma &ChangeAndControl instead of &Around
|
||||
|
||||
Starting with the platform 8.3.16, you can use pragma &ChangeAndControl instead of pragma &Around in cases where there is no ProceedWithCall call inside the method
|
||||
|
||||
## Noncompliant Code Example
|
||||
|
||||
```bsl
|
||||
&Around("MyFunction")
|
||||
Function Ext1_MyFunction()
|
||||
|
||||
//Return 1;
|
||||
Return 2;
|
||||
|
||||
EndFunction
|
||||
```
|
||||
|
||||
## Compliant Solution
|
||||
|
||||
```bsl
|
||||
&ChangeAndValidate("MyFunction")
|
||||
Function Ext1_MyFunction()
|
||||
|
||||
#Delete
|
||||
Return 1;
|
||||
#EndDelete
|
||||
#Insert
|
||||
Return 2;
|
||||
#EndInsert
|
||||
|
||||
EndFunction
|
||||
```
|
||||
|
||||
## See
|
||||
|
@ -0,0 +1,34 @@
|
||||
# Используется аннотация &ИзменениеИКонтроль вместо &Вместо
|
||||
|
||||
Начиная с релиза платформы 8.3.16, можно использовать аннотацию &ИзменениеИКонтроль вместо аннотации &Вместо в тех случаях, когда внутри метода отсутствует вызов ПродолжитьВызов
|
||||
|
||||
## Неправильно
|
||||
|
||||
```bsl
|
||||
&Вместо("МояФункция")
|
||||
Функция Расш1_МояФункция()
|
||||
|
||||
//Возврат 1;
|
||||
Возврат 2;
|
||||
|
||||
КонецФункции
|
||||
```
|
||||
|
||||
## Правильно
|
||||
|
||||
```bsl
|
||||
&ИзменениеИКонтроль("МояФункция")
|
||||
Функция Расш1_МояФункция()
|
||||
|
||||
#Удаление
|
||||
Возврат 1;
|
||||
#КонецУдаления
|
||||
#Вставка
|
||||
Возврат 2;
|
||||
#КонецВставки
|
||||
|
||||
КонецФункции
|
||||
```
|
||||
|
||||
## См.
|
||||
|
@ -11,8 +11,7 @@
|
||||
|
||||
Contributors:
|
||||
1C-Soft LLC - initial API and implementation
|
||||
Aleksandr Kapralov - issue #17
|
||||
Aleksandr Kapralov - issue #449
|
||||
Aleksandr Kapralov - issue #17, #449, #458
|
||||
-->
|
||||
|
||||
<plugin>
|
||||
@ -46,6 +45,10 @@
|
||||
category="com.e1c.v8codestyle.bsl"
|
||||
class="com.e1c.v8codestyle.internal.bsl.ExecutableExtensionFactory:com.e1c.v8codestyle.bsl.check.CanonicalPragmaCheck">
|
||||
</check>
|
||||
<check
|
||||
category="com.e1c.v8codestyle.bsl"
|
||||
class="com.e1c.v8codestyle.internal.bsl.ExecutableExtensionFactory:com.e1c.v8codestyle.bsl.check.ChangeAndValidateInsteadOfAroundCheck">
|
||||
</check>
|
||||
|
||||
</extension>
|
||||
|
||||
|
@ -0,0 +1,131 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (C) 2021, 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:
|
||||
* Aleksandr Kapralov - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package com.e1c.v8codestyle.bsl.check;
|
||||
|
||||
import static com._1c.g5.v8.dt.bsl.model.BslPackage.Literals.PRAGMA;
|
||||
import static com._1c.g5.v8.dt.bsl.model.BslPackage.Literals.PRAGMA__SYMBOL;
|
||||
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.eclipse.xtext.EcoreUtil2;
|
||||
|
||||
import com._1c.g5.v8.dt.bsl.common.Symbols;
|
||||
import com._1c.g5.v8.dt.bsl.model.Method;
|
||||
import com._1c.g5.v8.dt.bsl.model.Pragma;
|
||||
import com._1c.g5.v8.dt.bsl.model.StaticFeatureAccess;
|
||||
import com._1c.g5.v8.dt.lcore.util.CaseInsensitiveString;
|
||||
import com._1c.g5.v8.dt.platform.version.IRuntimeVersionSupport;
|
||||
import com._1c.g5.v8.dt.platform.version.Version;
|
||||
import com.e1c.g5.v8.dt.check.CheckComplexity;
|
||||
import com.e1c.g5.v8.dt.check.ICheckParameters;
|
||||
import com.e1c.g5.v8.dt.check.components.BasicCheck;
|
||||
import com.e1c.g5.v8.dt.check.settings.IssueSeverity;
|
||||
import com.e1c.g5.v8.dt.check.settings.IssueType;
|
||||
import com.google.inject.Inject;
|
||||
|
||||
/**
|
||||
* Checks that pragma &ChangeAndControl is used when there is no call ProceedWithCall
|
||||
*
|
||||
* @author Aleksandr Kapralov
|
||||
*
|
||||
*/
|
||||
public class ChangeAndValidateInsteadOfAroundCheck
|
||||
extends BasicCheck
|
||||
{
|
||||
private static final String CHECK_ID = "change-and-validate-instead-of-around"; //$NON-NLS-1$
|
||||
|
||||
private static final String PROCEED_WITH_CALL = "ProceedWithCall"; //$NON-NLS-1$
|
||||
private static final String PROCEED_WITH_CALL_RUS = "ПродолжитьВызов"; //$NON-NLS-1$
|
||||
|
||||
private final IRuntimeVersionSupport versionSupport;
|
||||
|
||||
/**
|
||||
* Creates new instance which helps to check &Around pragma.
|
||||
*
|
||||
* @param versionSupport runtime version support manager, cannot be {@code null}.
|
||||
*/
|
||||
@Inject
|
||||
public ChangeAndValidateInsteadOfAroundCheck(IRuntimeVersionSupport versionSupport)
|
||||
{
|
||||
super();
|
||||
|
||||
this.versionSupport = versionSupport;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCheckId()
|
||||
{
|
||||
return CHECK_ID;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void check(Object object, ResultAcceptor resultAceptor, ICheckParameters parameters,
|
||||
IProgressMonitor monitor)
|
||||
{
|
||||
if (monitor.isCanceled())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Pragma pragma = (Pragma)object;
|
||||
|
||||
if (!Symbols.AROUND_ANNOTATION_SYMBOLS.contains(new CaseInsensitiveString(pragma.getSymbol())))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Version platformVersion = versionSupport.getRuntimeVersionOrDefault(pragma, Version.LATEST);
|
||||
if (platformVersion.isLessThan(Version.V8_3_16))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Method method = EcoreUtil2.getContainerOfType(pragma, Method.class);
|
||||
|
||||
if (method == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
boolean hasProceedWithCall = false;
|
||||
for (StaticFeatureAccess sfa : EcoreUtil2.eAllOfType(method, StaticFeatureAccess.class))
|
||||
{
|
||||
String featureName = sfa.getName();
|
||||
if (PROCEED_WITH_CALL.equalsIgnoreCase(featureName) || PROCEED_WITH_CALL_RUS.equalsIgnoreCase(featureName))
|
||||
{
|
||||
hasProceedWithCall = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!hasProceedWithCall)
|
||||
{
|
||||
resultAceptor.addIssue(
|
||||
Messages.ChangeAndValidateInsteadOfAroundCheck_Use_ChangeAndValidate_instead_of_Around, pragma,
|
||||
PRAGMA__SYMBOL);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configureCheck(CheckConfigurer configurer)
|
||||
{
|
||||
configurer.title(Messages.ChangeAndValidateInsteadOfAroundCheck_title)
|
||||
.description(Messages.ChangeAndValidateInsteadOfAroundCheck_description)
|
||||
.complexity(CheckComplexity.NORMAL)
|
||||
.severity(IssueSeverity.TRIVIAL)
|
||||
.issueType(IssueType.CODE_STYLE)
|
||||
.module()
|
||||
.checkedObjectType(PRAGMA);
|
||||
}
|
||||
|
||||
}
|
@ -9,8 +9,7 @@
|
||||
*
|
||||
* Contributors:
|
||||
* 1C-Soft LLC - initial API and implementation
|
||||
* Aleksandr Kapralov - issue #17
|
||||
* Aleksandr Kapralov - issue #449
|
||||
* Aleksandr Kapralov - issue #17, #449, #458
|
||||
*******************************************************************************/
|
||||
package com.e1c.v8codestyle.bsl.check;
|
||||
|
||||
@ -29,6 +28,10 @@ final class Messages
|
||||
public static String CanonicalPragmaCheck_Pragma_0_is_not_written_canonically_correct_spelling_is_1;
|
||||
public static String CanonicalPragmaCheck_title;
|
||||
|
||||
public static String ChangeAndValidateInsteadOfAroundCheck_description;
|
||||
public static String ChangeAndValidateInsteadOfAroundCheck_Use_ChangeAndValidate_instead_of_Around;
|
||||
public static String ChangeAndValidateInsteadOfAroundCheck_title;
|
||||
|
||||
public static String EmptyExceptStatementCheck_description;
|
||||
public static String EmptyExceptStatementCheck_title;
|
||||
|
||||
|
@ -10,9 +10,8 @@
|
||||
#
|
||||
# Contributors:
|
||||
# 1C-Soft LLC - initial API and implementation
|
||||
# Aleksandr Kapralov - issue #17
|
||||
# Aleksandr Kapralov - issue #17, #449, #458
|
||||
# Viktor Gukov - issue #394
|
||||
# Aleksandr Kapralov - issue #449
|
||||
###############################################################################
|
||||
|
||||
CanonicalPragmaCheck_Pragma_0_is_not_written_canonically_correct_spelling_is_1 = Annotation {0} is not written canonically, correct spelling is {1}
|
||||
@ -21,6 +20,12 @@ CanonicalPragmaCheck_description = Check pragma is written canonically
|
||||
|
||||
CanonicalPragmaCheck_title = Pragma is written canonically
|
||||
|
||||
ChangeAndValidateInsteadOfAroundCheck_Use_ChangeAndValidate_instead_of_Around = It's recommended to use pragma &ChangeAndControl instead of &Around
|
||||
|
||||
ChangeAndValidateInsteadOfAroundCheck_description = Checks that pragma &ChangeAndControl is used when there is no call ProceedWithCall
|
||||
|
||||
ChangeAndValidateInsteadOfAroundCheck_title = Use pragma &ChangeAndControl instead of &Around
|
||||
|
||||
EmptyExceptStatementCheck_description = Empty except statement
|
||||
|
||||
EmptyExceptStatementCheck_title = Empty except statement
|
||||
|
@ -10,9 +10,8 @@
|
||||
#
|
||||
# Contributors:
|
||||
# 1C-Soft LLC - initial API and implementation
|
||||
# Aleksandr Kapralov - issue #17
|
||||
# Aleksandr Kapralov - issue #17, #449, #458
|
||||
# Viktor Gukov - issue #394
|
||||
# Aleksandr Kapralov - issue #449
|
||||
###############################################################################
|
||||
|
||||
CanonicalPragmaCheck_Pragma_0_is_not_written_canonically_correct_spelling_is_1 = Аннотация {0} написана неканонически, правильное написание {1}
|
||||
@ -21,6 +20,12 @@ CanonicalPragmaCheck_description = Проверяет что аннотация
|
||||
|
||||
CanonicalPragmaCheck_title = Аннотация написана канонически
|
||||
|
||||
ChangeAndValidateInsteadOfAroundCheck_Use_ChangeAndValidate_instead_of_Around = Рекомендуется использовать аннотацию &ИзменениеИКонтроль вместо &Вместо
|
||||
|
||||
ChangeAndValidateInsteadOfAroundCheck_description = Проверяет, что при отсутствии вызова ПродолжитьВызов используется аннотация &ИзменениеИКонтроль
|
||||
|
||||
ChangeAndValidateInsteadOfAroundCheck_title = Используется аннотация &ИзменениеИКонтроль вместо &Вместо
|
||||
|
||||
EmptyExceptStatementCheck_description = "Попытка...Исключение" не содержит кода в исключении
|
||||
|
||||
EmptyExceptStatementCheck_title = "Попытка...Исключение" не содержит кода в исключении
|
||||
|
@ -0,0 +1,116 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (C) 2021, 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:
|
||||
* Aleksandr Kapralov - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package com.e1c.v8codestyle.bsl.check.itests;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.emf.ecore.util.EcoreUtil;
|
||||
import org.eclipse.xtext.EcoreUtil2;
|
||||
import org.junit.Test;
|
||||
|
||||
import com._1c.g5.v8.bm.core.IBmObject;
|
||||
import com._1c.g5.v8.dt.bsl.model.Method;
|
||||
import com._1c.g5.v8.dt.bsl.model.Module;
|
||||
import com._1c.g5.v8.dt.bsl.model.Pragma;
|
||||
import com._1c.g5.v8.dt.core.platform.IDtProject;
|
||||
import com._1c.g5.v8.dt.metadata.mdclass.CommonModule;
|
||||
import com._1c.g5.v8.dt.validation.marker.IExtraInfoKeys;
|
||||
import com._1c.g5.v8.dt.validation.marker.Marker;
|
||||
import com.e1c.g5.v8.dt.testing.check.CheckTestBase;
|
||||
import com.e1c.v8codestyle.bsl.check.ChangeAndValidateInsteadOfAroundCheck;
|
||||
|
||||
/**
|
||||
* Tests for {@link ChangeAndValidateInsteadOfAroundCheck} check.
|
||||
*
|
||||
* @author Aleksandr Kapralov
|
||||
*/
|
||||
public class ChangeAndValidateInsteadOfAroundCheckTest
|
||||
extends CheckTestBase
|
||||
{
|
||||
|
||||
private static final String PROJECT_NAME = "ChangeAndValidateInsteadOfAround";
|
||||
private static final String EXTENSION_NAME = "ChangeAndValidateInsteadOfAroundExtension";
|
||||
|
||||
private static final String CHECK_ID = "change-and-validate-instead-of-around"; //$NON-NLS-1$
|
||||
|
||||
@Test
|
||||
public void testChangeAndValidateInsteadOfAround() throws Exception
|
||||
{
|
||||
IProject project = testingWorkspace.setUpProject(PROJECT_NAME, getClass());
|
||||
IDtProject dtProject = dtProjectManager.getDtProject(project);
|
||||
assertNotNull(dtProject);
|
||||
|
||||
dtProject = openProjectAndWaitForValidationFinish(EXTENSION_NAME);
|
||||
assertNotNull(dtProject);
|
||||
|
||||
IBmObject mdObject = getTopObjectByFqn("CommonModule.CommonModule", dtProject);
|
||||
assertTrue(mdObject instanceof CommonModule);
|
||||
Module module = ((CommonModule)mdObject).getModule();
|
||||
assertNotNull(module);
|
||||
|
||||
String id = module.eResource().getURI().toPlatformString(true);
|
||||
Marker[] markers = markerManager.getMarkers(dtProject.getWorkspaceProject(), id);
|
||||
assertNotNull(markers);
|
||||
|
||||
Set<String> uriErrors = new HashSet<>();
|
||||
|
||||
for (Method method : module.allMethods())
|
||||
{
|
||||
List<Pragma> pragmaList = EcoreUtil2.eAllOfType(method, Pragma.class);
|
||||
|
||||
switch (method.getName())
|
||||
{
|
||||
case "Ext_MyFunction":
|
||||
{
|
||||
// Those methods doesn't have errors
|
||||
break;
|
||||
}
|
||||
|
||||
case "Ext_MyProcedure":
|
||||
{
|
||||
assertEquals(1, pragmaList.size());
|
||||
uriErrors.add(EcoreUtil.getURI(pragmaList.get(0)).toString());
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
throw new IllegalStateException(MessageFormat.format("Unknown method name {0}", method.getName()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (Marker marker : markers)
|
||||
{
|
||||
String checkUid = getCheckIdFromMarker(marker, dtProject);
|
||||
assertNotNull(checkUid);
|
||||
if (!CHECK_ID.equals(checkUid))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
String uriToProblem = marker.getExtraInfo().get(IExtraInfoKeys.TEXT_EXTRA_INFO_URI_TO_PROBLEM_KEY);
|
||||
assertTrue(uriErrors.contains(uriToProblem));
|
||||
uriErrors.remove(uriToProblem);
|
||||
}
|
||||
|
||||
assertEquals(0, uriErrors.size());
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>ChangeAndValidateInsteadOfAround</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,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<mdclass:CommonModule xmlns:mdclass="http://g5.1c.ru/v8/dt/metadata/mdclass" uuid="c43265f1-2902-4556-8364-610d5f59abc4">
|
||||
<name>CommonModule</name>
|
||||
<synonym>
|
||||
<key>en</key>
|
||||
<value>Common module</value>
|
||||
</synonym>
|
||||
<server>true</server>
|
||||
<externalConnection>true</externalConnection>
|
||||
<clientOrdinaryApplication>true</clientOrdinaryApplication>
|
||||
</mdclass:CommonModule>
|
@ -0,0 +1,11 @@
|
||||
Procedure MyProcedure(Param) Export
|
||||
|
||||
Param = 1;
|
||||
|
||||
EndProcedure
|
||||
|
||||
Function MyFunction() Export
|
||||
|
||||
Return 1;
|
||||
|
||||
EndFunction
|
@ -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,42 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<mdclass:Configuration xmlns:mdclass="http://g5.1c.ru/v8/dt/metadata/mdclass" uuid="35a8ccfd-9064-4d58-adcb-93e0e0b7203e">
|
||||
<name>ChangeAndValidateInsteadOfAround</name>
|
||||
<synonym>
|
||||
<key>en</key>
|
||||
<value>Change and validate instead of around</value>
|
||||
</synonym>
|
||||
<containedObjects classId="9cd510cd-abfc-11d4-9434-004095e12fc7" objectId="9355f8c4-cc08-4ff8-8dfe-76b8712e8aea"/>
|
||||
<containedObjects classId="9fcd25a0-4822-11d4-9414-008048da11f9" objectId="f9490099-263c-47ce-b958-7d86d41567a1"/>
|
||||
<containedObjects classId="e3687481-0a87-462c-a166-9f34594f9bba" objectId="1678ebfc-4a2c-4792-afbd-5f4903e08b94"/>
|
||||
<containedObjects classId="9de14907-ec23-4a07-96f0-85521cb6b53b" objectId="7ebc9eb8-27ff-4247-a9df-dae998c2bbb7"/>
|
||||
<containedObjects classId="51f2d5d8-ea4d-4064-8892-82951750031e" objectId="690a2bef-2df4-4489-a9c2-7340505946e7"/>
|
||||
<containedObjects classId="e68182ea-4237-4383-967f-90c1e3370bc7" objectId="2cf53e27-bfcd-477c-be67-8c3affd3cd55"/>
|
||||
<containedObjects classId="fb282519-d103-4dd3-bc12-cb271d631dfc" objectId="56f06036-fae6-4250-ac6a-252f2e16c812"/>
|
||||
<configurationExtensionCompatibilityMode>8.3.19</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.19</compatibilityMode>
|
||||
<languages uuid="a2c4fe99-bc0c-4ca4-9949-387fa4f4398e">
|
||||
<name>English</name>
|
||||
<synonym>
|
||||
<key>en</key>
|
||||
<value>English</value>
|
||||
</synonym>
|
||||
<languageCode>en</languageCode>
|
||||
</languages>
|
||||
<commonModules>CommonModule.CommonModule</commonModules>
|
||||
</mdclass:Configuration>
|
@ -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,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>ChangeAndValidateInsteadOfAroundExtension</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.V8ExtensionNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
@ -0,0 +1,2 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
@ -0,0 +1,3 @@
|
||||
Manifest-Version: 1.0
|
||||
Runtime-Version: 8.3.19
|
||||
Base-Project: ChangeAndValidateInsteadOfAround
|
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<mdclass:CommonModule xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mdclass="http://g5.1c.ru/v8/dt/metadata/mdclass" xmlns:mdclassExtension="http://g5.1c.ru/v8/dt/metadata/mdclass/extension" uuid="c42572d0-1f05-4956-85ca-ea931a2b8379" extendedConfigurationObject="c43265f1-2902-4556-8364-610d5f59abc4">
|
||||
<name>CommonModule</name>
|
||||
<objectBelonging>Adopted</objectBelonging>
|
||||
<extension xsi:type="mdclassExtension:CommonModuleExtension">
|
||||
<extendedConfigurationObject>Checked</extendedConfigurationObject>
|
||||
<module>Extended</module>
|
||||
<global>Checked</global>
|
||||
<clientManagedApplication>Checked</clientManagedApplication>
|
||||
<server>Checked</server>
|
||||
<externalConnection>Checked</externalConnection>
|
||||
<serverCall>Checked</serverCall>
|
||||
<clientOrdinaryApplication>Checked</clientOrdinaryApplication>
|
||||
</extension>
|
||||
<server>true</server>
|
||||
<externalConnection>true</externalConnection>
|
||||
<clientOrdinaryApplication>true</clientOrdinaryApplication>
|
||||
</mdclass:CommonModule>
|
@ -0,0 +1,18 @@
|
||||
&Around("MyProcedure")
|
||||
Procedure Ext_MyProcedure(Param) Export
|
||||
|
||||
//Param = 1;
|
||||
Param = 2;
|
||||
|
||||
EndProcedure
|
||||
|
||||
&Around("MyFunction")
|
||||
Function Ext_MyFunction() Export
|
||||
|
||||
Result = ProceedWithCall();
|
||||
|
||||
Result = Result + 1;
|
||||
|
||||
Return Result;
|
||||
|
||||
EndFunction
|
@ -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,34 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<mdclass:Configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mdclass="http://g5.1c.ru/v8/dt/metadata/mdclass" xmlns:mdclassExtension="http://g5.1c.ru/v8/dt/metadata/mdclass/extension" uuid="4f8304a6-19b7-4476-8336-c7f27ae9cb9e">
|
||||
<name>ChangeAndValidateInsteadOfAroundExtension</name>
|
||||
<synonym>
|
||||
<key>en</key>
|
||||
<value>Change and validate instead of around extension</value>
|
||||
</synonym>
|
||||
<objectBelonging>Adopted</objectBelonging>
|
||||
<extension xsi:type="mdclassExtension:ConfigurationExtension">
|
||||
<defaultRunMode>Checked</defaultRunMode>
|
||||
<usePurposes>Checked</usePurposes>
|
||||
<commandInterface>Extended</commandInterface>
|
||||
<mainSectionCommandInterface>Extended</mainSectionCommandInterface>
|
||||
<interfaceCompatibilityMode>Checked</interfaceCompatibilityMode>
|
||||
<compatibilityMode>Checked</compatibilityMode>
|
||||
<defaultStyle>Extended</defaultStyle>
|
||||
<defaultRoles>Extended</defaultRoles>
|
||||
</extension>
|
||||
<containedObjects classId="9cd510cd-abfc-11d4-9434-004095e12fc7" objectId="b42e32d2-a7de-4413-96ac-f77cd80bab41"/>
|
||||
<containedObjects classId="9fcd25a0-4822-11d4-9414-008048da11f9" objectId="174b3dcf-83cb-46fe-ac5f-cd96d0f3b816"/>
|
||||
<containedObjects classId="e3687481-0a87-462c-a166-9f34594f9bba" objectId="018a2e19-b593-40ae-bd9a-013da1f6a6a6"/>
|
||||
<containedObjects classId="9de14907-ec23-4a07-96f0-85521cb6b53b" objectId="a4eea8b4-d0dd-47e6-9f70-03ff752e9a82"/>
|
||||
<containedObjects classId="51f2d5d8-ea4d-4064-8892-82951750031e" objectId="6d74dc18-8e18-45d6-93a0-0ce25b85b81c"/>
|
||||
<containedObjects classId="e68182ea-4237-4383-967f-90c1e3370bc7" objectId="b0deabb5-e07b-4af2-b6b6-5397614ed922"/>
|
||||
<containedObjects classId="fb282519-d103-4dd3-bc12-cb271d631dfc" objectId="be51d45b-d4de-4fcb-9099-08f8ffc1866a"/>
|
||||
<keepMappingToExtendedConfigurationObjectsByIDs>true</keepMappingToExtendedConfigurationObjectsByIDs>
|
||||
<namePrefix>Ext_</namePrefix>
|
||||
<configurationExtensionCompatibilityMode>8.3.19</configurationExtensionCompatibilityMode>
|
||||
<configurationExtensionPurpose>Customization</configurationExtensionPurpose>
|
||||
<defaultRunMode>ManagedApplication</defaultRunMode>
|
||||
<usePurposes>PersonalComputer</usePurposes>
|
||||
<compatibilityMode>8.3.19</compatibilityMode>
|
||||
<commonModules>CommonModule.CommonModule</commonModules>
|
||||
</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