Skip to content

Commit 2fe80ff

Browse files
committed
дополнил имя правила
замечания по ревью
1 parent 46b3e08 commit 2fe80ff

File tree

3 files changed

+47
-3
lines changed

3 files changed

+47
-3
lines changed
Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,45 @@
1-
/* * This file is a part of BSL Language Server. * * Copyright (c) 2018-2023 * Alexey Sosnoviy <labotamy@gmail.com>, Nikita Fedkin <nixel2007@gmail.com> and contributors * * SPDX-License-Identifier: LGPL-3.0-or-later * * BSL Language Server is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 3.0 of the License, or (at your option) any later version. * * BSL Language Server is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with BSL Language Server. */package com.github._1c_syntax.bsl.languageserver.utils;import com.github._1c_syntax.bsl.languageserver.context.DocumentContext;import com.github._1c_syntax.bsl.mdo.MD;import com.github._1c_syntax.bsl.mdo.support.ScriptVariant;import lombok.experimental.UtilityClass;@UtilityClasspublic class MdoReferences { public String getLocaleMdoRef(DocumentContext documentContext, MD mdo) { final var mdoReference = mdo.getMdoReference(); if (documentContext.getServerContext().getConfiguration().getScriptVariant() == ScriptVariant.ENGLISH) { return mdoReference.getMdoRef(); } return mdoReference.getMdoRefRu(); } public String getLocaleOwnerMdoName(DocumentContext documentContext, MD mdo) { final var names = getLocaleMdoRef(documentContext, mdo).split("\\."); return names[0].concat(".").concat(names[1]); }}
1+
/*
2+
* This file is a part of BSL Language Server.
3+
*
4+
* Copyright (c) 2018-2023
5+
* Alexey Sosnoviy <labotamy@gmail.com>, Nikita Fedkin <nixel2007@gmail.com> and contributors
6+
*
7+
* SPDX-License-Identifier: LGPL-3.0-or-later
8+
*
9+
* BSL Language Server is free software; you can redistribute it and/or
10+
* modify it under the terms of the GNU Lesser General Public
11+
* License as published by the Free Software Foundation; either
12+
* version 3.0 of the License, or (at your option) any later version.
13+
*
14+
* BSL Language Server is distributed in the hope that it will be useful,
15+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17+
* Lesser General Public License for more details.
18+
*
19+
* You should have received a copy of the GNU Lesser General Public
20+
* License along with BSL Language Server.
21+
*/
22+
package com.github._1c_syntax.bsl.languageserver.utils;
23+
24+
import com.github._1c_syntax.bsl.languageserver.context.DocumentContext;
25+
import com.github._1c_syntax.bsl.mdo.MD;
26+
import com.github._1c_syntax.bsl.mdo.support.ScriptVariant;
27+
import lombok.experimental.UtilityClass;
28+
29+
@UtilityClass
30+
public class MdoReferences {
31+
32+
public String getLocaleMdoRef(DocumentContext documentContext, MD mdo) {
33+
final var mdoReference = mdo.getMdoReference();
34+
if (documentContext.getServerContext().getConfiguration().getScriptVariant() == ScriptVariant.ENGLISH) {
35+
return mdoReference.getMdoRef();
36+
}
37+
return mdoReference.getMdoRefRu();
38+
}
39+
40+
public String getLocaleOwnerMdoName(DocumentContext documentContext, MD mdo) {
41+
final var names = getLocaleMdoRef(documentContext, mdo).split("\\.");
42+
return names[0].concat(".").concat(names[1]);
43+
}
44+
45+
}
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
diagnosticMessage=The "Deny incomplete values" flag is not specified for the "%s" dimension of the "%s" metadata
2-
diagnosticName=Deny incomplete values
2+
diagnosticName=Deny incomplete values for dimensions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
diagnosticMessage=Не указан флаг "Запрет незаполненных значений" у измерения "%s" метаданного "%s"
2-
diagnosticName=Запрет незаполненных значений
2+
diagnosticName=Запрет незаполненных значений у измерений регистров

0 commit comments

Comments
 (0)