mirror of
https://github.com/1C-Company/v8-code-style.git
synced 2025-02-03 18:02:08 +02:00
#266 Правки по замечаниям
This commit is contained in:
parent
832bc70665
commit
8a2f6f7b99
@ -1,6 +1,6 @@
|
||||
# Check if Use Always flag is enabled for the Reference attribute in dynamic list
|
||||
|
||||
In developing print commands (the Print subsystem of **Standard Subsystems Library**), the **Reference** attribute with the **Always Use** flag is required for these commands.
|
||||
In developing print commands (the Print subsystem of **Standard Subsystems Library**), the **Reference** attribute with the **Use Always** flag is required for these commands.
|
||||
|
||||
## Noncompliant Code Example
|
||||
|
||||
|
@ -17,7 +17,6 @@ import static com._1c.g5.v8.dt.form.model.FormPackage.Literals.FORM_ATTRIBUTE;
|
||||
import static com._1c.g5.v8.dt.form.model.FormPackage.Literals.FORM_ATTRIBUTE__NOT_DEFAULT_USE_ALWAYS_ATTRIBUTES;
|
||||
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.eclipse.emf.ecore.EObject;
|
||||
|
||||
import com._1c.g5.v8.dt.form.model.DynamicListExtInfo;
|
||||
import com._1c.g5.v8.dt.form.model.FormAttribute;
|
||||
@ -39,7 +38,7 @@ public class FormListRefUseAlwaysFlagDisabledCheck
|
||||
{
|
||||
|
||||
private static final String CHECK_ID = "form-list-ref-use-always-flag-disabled"; //$NON-NLS-1$
|
||||
private static final String REF_ABSTRACT_DATA_PATH = "List/Ref"; //$NON-NLS-1$
|
||||
private static final String REF_ABSTRACT_DATA_PATH = "/List/Ref"; //$NON-NLS-1$
|
||||
|
||||
@Override
|
||||
public String getCheckId()
|
||||
@ -66,18 +65,21 @@ public class FormListRefUseAlwaysFlagDisabledCheck
|
||||
IProgressMonitor monitor)
|
||||
{
|
||||
|
||||
FormAttribute formAttribute = (FormAttribute)object;
|
||||
|
||||
if (monitor.isCanceled() || !(object instanceof EObject))
|
||||
if (monitor.isCanceled() || !(object instanceof FormAttribute))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (formAttribute.getExtInfo() instanceof DynamicListExtInfo
|
||||
&& !formAttribute.getNotDefaultUseAlwaysAttributes().toString().trim().contains(REF_ABSTRACT_DATA_PATH))
|
||||
FormAttribute formAttribute = (FormAttribute)object;
|
||||
if (formAttribute.getExtInfo() instanceof DynamicListExtInfo && formAttribute.getNotDefaultUseAlwaysAttributes()
|
||||
.stream()
|
||||
.noneMatch(p -> p.toString().equals(REF_ABSTRACT_DATA_PATH)))
|
||||
{
|
||||
resultAceptor.addIssue(Messages.FormListRefUseAlwaysFlagDisabledCheck_UseAlways_flag_is_disabled_for_the_Ref_field, formAttribute);
|
||||
resultAceptor.addIssue(
|
||||
Messages.FormListRefUseAlwaysFlagDisabledCheck_UseAlways_flag_is_disabled_for_the_Ref_field,
|
||||
formAttribute);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
#Generated by ResourceBundle Editor (http://essiembre.github.io/eclipse-rbe/)
|
||||
###############################################################################
|
||||
# Copyright (C) 2022, 1C-Soft LLC and others.
|
||||
# Copyright (C) 2021-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
|
||||
|
@ -1,6 +1,6 @@
|
||||
#Generated by ResourceBundle Editor (http://essiembre.github.io/eclipse-rbe/)
|
||||
###############################################################################
|
||||
# Copyright (C) 2022, 1C-Soft LLC and others.
|
||||
# Copyright (C) 2021-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
|
||||
@ -19,8 +19,6 @@ FormListRefUseAlwaysFlagDisabledCheck_description = У реквизита "Сс
|
||||
|
||||
FormListRefUseAlwaysFlagDisabledCheck_title = У реквизита "Ссылка" динамического списка выключен признак "Использовать всегда"
|
||||
|
||||
InputFieldListChoiceMode_Form_input_field_the_list_choice_mode_not_set_with_filled_choice_list =
|
||||
|
||||
InputFieldListChoiceMode_Form_input_field_the_list_choice_mode_not_set_with_filled_choice_list = У поля ввода формы с заполненным списком выбора отключено свойство "Режим выбора из списка"
|
||||
|
||||
InputFieldListChoiceMode_description = Проверяет, что поле ввода содержит корректный режим ввыбора из списка, если список выбора заполнен
|
||||
|
Loading…
x
Reference in New Issue
Block a user