Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#504 У поля "Ссылка" таблицы динамического списка не отключена пользовательская видимость #1025

Prev Previous commit
Next Next commit
#504 Правки по замечаниям
  • Loading branch information
olga355 committed May 4, 2022
commit 9e154c88a75fc2acd78acdd81630bf34382da4c1
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ public class FormListRefUserVisibilityEnabledCheck
{

private static final String CHECK_ID = "form-list-ref-user-visibility-enabled"; //$NON-NLS-1$
private static final List<String> REF_ABSTRACT_DATA_PATH = List.of("List", "Ref"); //$NON-NLS-1$ //$NON-NLS-2$
private static final List<String> REF_ABSTRACT_DATA_PATH_RU = List.of("Список", "Ссылка"); //$NON-NLS-1$ //$NON-NLS-2$
private static final List<String> LIST_SEGMENT = List.of("List", "Список"); //$NON-NLS-1$ //$NON-NLS-2$
marmyshev marked this conversation as resolved.
Show resolved Hide resolved
private static final List<String> REF_SEGMENT = List.of("Ref", "Ссылка"); //$NON-NLS-1$ //$NON-NLS-2$

@Override
public String getCheckId()
Expand Down Expand Up @@ -93,21 +93,6 @@ private boolean pathCheck(EList<EObject> eContents)

EList<String> segments = ((AbstractDataPath)eContents.get(1)).getSegments();

if (segments.size() != 2)
{
return false;
}

if (!segments.get(0).equals(REF_ABSTRACT_DATA_PATH.get(0))
&& !segments.get(0).equals(REF_ABSTRACT_DATA_PATH_RU.get(0)))
{
return false;
}
if (!segments.get(1).equals(REF_ABSTRACT_DATA_PATH.get(1))
&& !segments.get(1).equals(REF_ABSTRACT_DATA_PATH_RU.get(1)))
{
return false;
}
return true;
return segments.size() == 2 && LIST_SEGMENT.contains(segments.get(0)) && REF_SEGMENT.contains(segments.get(1));
}
}