Skip to content

Commit 140e838

Browse files
committed
fix 459
Исправление ошибки чтения англоязычных подсистем
1 parent 9621348 commit 140e838

File tree

148 files changed

+19511
-42
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

148 files changed

+19511
-42
lines changed

src/main/java/com/github/_1c_syntax/bsl/reader/common/converter/SubsystemConverter.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ public class SubsystemConverter implements ReadConverter {
4444

4545
private static final String START_MDOREF_NAME = MDOType.SUBSYSTEM.getName() + ".";
4646
private static final int COUNT_PARTS = 2;
47+
private static final String NAME_SPLITTER = "[\\\\/]" + MDOType.SUBSYSTEM.getGroupName() + "[\\\\/]";
4748

4849
@Override
4950
public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context) {
@@ -63,7 +64,7 @@ public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext co
6364

6465
// определим это самостоятельная или дочерняя
6566
// у дочерней будет несколько вложенных папок подсистемы
66-
if (localRootPath.split(MDOType.SUBSYSTEM.getName()).length > COUNT_PARTS) {
67+
if (localRootPath.split(NAME_SPLITTER).length > COUNT_PARTS) {
6768
return readerContext;
6869
} else {
6970
return readerContext.build();

src/test/java/com/github/_1c_syntax/bsl/mdclasses/ConfigurationTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ class ConfigurationTest {
4949
"false, mdclasses_3_18",
5050
"true, mdclasses_ext, _edt",
5151
"false, mdclasses_ext",
52+
"true, mdclasses_3_24, _edt"
5253
}
5354
)
5455
void test(ArgumentsAccessor argumentsAccessor) {
Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
/*
2-
* This file is a part of MDClasses.
3-
*
4-
* Copyright (c) 2019 - 2024
5-
* Tymko Oleg <olegtymko@yandex.ru>, Maximov Valery <maximovvalery@gmail.com> and contributors
6-
*
7-
* SPDX-License-Identifier: LGPL-3.0-or-later
8-
*
9-
* MDClasses 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-
* MDClasses 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 MDClasses.
21-
*/
22-
package com.github._1c_syntax.bsl.mdclasses;
1+
/*
2+
* This file is a part of MDClasses.
3+
*
4+
* Copyright (c) 2019 - 2024
5+
* Tymko Oleg <olegtymko@yandex.ru>, Maximov Valery <maximovvalery@gmail.com> and contributors
6+
*
7+
* SPDX-License-Identifier: LGPL-3.0-or-later
8+
*
9+
* MDClasses 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+
* MDClasses 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 MDClasses.
21+
*/
22+
package com.github._1c_syntax.bsl.mdclasses;
2323

2424
import org.junit.jupiter.api.Test;
2525

@@ -32,7 +32,7 @@ class MDClassesTest {
3232
void createConfigurations() {
3333
var srcPath = Paths.get("src/test/resources/ext");
3434
var mdcs = MDClasses.createConfigurations(srcPath);
35-
assertThat(mdcs).hasSize(8);
35+
assertThat(mdcs).hasSize(9);
3636

3737
// каталоги с обработками не читаются
3838
srcPath = Paths.get("src/test/resources/ext/edt/external");
@@ -56,6 +56,6 @@ void createExternalSources() {
5656
void create() {
5757
var srcPath = Paths.get("src/test/resources/ext");
5858
var mdcs = MDClasses.create(srcPath);
59-
assertThat(mdcs).hasSize(12);
59+
assertThat(mdcs).hasSize(13);
6060
}
6161
}

src/test/java/com/github/_1c_syntax/bsl/mdo/StyleTest.java

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,31 @@
2020
* License along with MDClasses.
2121
*/
2222
package com.github._1c_syntax.bsl.mdo;
23-
24-
import com.github._1c_syntax.bsl.test_utils.MDTestUtils;
25-
import org.junit.jupiter.params.ParameterizedTest;
26-
import org.junit.jupiter.params.aggregator.ArgumentsAccessor;
27-
import org.junit.jupiter.params.provider.CsvSource;
28-
29-
class StyleTest {
30-
@ParameterizedTest
31-
@CsvSource(
32-
{
33-
"false, mdclasses, Styles.Стиль"
34-
}
35-
)
36-
void test(ArgumentsAccessor argumentsAccessor) {
37-
var mdo = MDTestUtils.getMDWithSimpleTest(argumentsAccessor);
38-
}
39-
23+
24+
import com.github._1c_syntax.bsl.test_utils.MDTestUtils;
25+
import org.junit.jupiter.params.ParameterizedTest;
26+
import org.junit.jupiter.params.aggregator.ArgumentsAccessor;
27+
import org.junit.jupiter.params.provider.CsvSource;
28+
29+
class StyleTest {
30+
@ParameterizedTest
31+
@CsvSource(
32+
{
33+
"false, mdclasses, Styles.Стиль"
34+
}
35+
)
36+
void test(ArgumentsAccessor argumentsAccessor) {
37+
var mdo = MDTestUtils.getMDWithSimpleTest(argumentsAccessor);
38+
}
39+
40+
@ParameterizedTest
41+
@CsvSource(
42+
{
43+
"true, mdclasses_3_24, Styles.Стиль, _edt"
44+
}
45+
)
46+
void test_3_24(ArgumentsAccessor argumentsAccessor) {
47+
var mdo = MDTestUtils.getMDWithSimpleTest(argumentsAccessor);
48+
}
49+
4050
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>configuration</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
</buildSpec>
14+
<natures>
15+
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
16+
<nature>com._1c.g5.v8.dt.core.V8ConfigurationNature</nature>
17+
</natures>
18+
</projectDescription>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
eclipse.preferences.version=1
2+
encoding/<project>=UTF-8
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Manifest-Version: 1.0
2+
Runtime-Version: 8.3.24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<mdclass:AccountingRegister xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:core="http://g5.1c.ru/v8/dt/mcore" xmlns:mdclass="http://g5.1c.ru/v8/dt/metadata/mdclass" uuid="e5930f2f-15d9-48a1-ac69-379ad990b02a">
3+
<producedTypes>
4+
<selectionType typeId="19c9961b-30ac-47ac-b941-e906baf0d32f" valueTypeId="89ecc56d-2c67-4a07-aaee-2cdb00e3db4b"/>
5+
<listType typeId="62afb9f9-2bb8-46fd-b637-bb5d6e43a471" valueTypeId="63fa626f-d24c-4a9f-8f3f-db7197013122"/>
6+
<managerType typeId="83d47f84-dca3-4d8e-adff-d50165a63724" valueTypeId="6ce4bffe-fcd8-4630-a313-f6bfd49e5e47"/>
7+
<recordSetType typeId="5eb2ba83-6f9b-4353-a932-c4b503aadc68" valueTypeId="ae4ef7fd-e676-415d-80db-276c24342974"/>
8+
<recordKeyType typeId="f765ef7c-2217-4c05-b330-ae620a0bd838" valueTypeId="43c6c39d-32a8-47a6-a752-fc7f2ff4dc39"/>
9+
<recordType typeId="d833a3aa-844d-4d3b-b7ce-90cb3c3b2f10" valueTypeId="2f137f49-d7b8-4bbc-9250-1536bea10663"/>
10+
<extDimensionsType typeId="ffdf5693-64ea-4b78-a2b0-1388e855a2c8" valueTypeId="7aefad2d-43a5-4d24-8c4a-13833e75f651"/>
11+
</producedTypes>
12+
<name>РегистрБухгалтерии1</name>
13+
<synonym>
14+
<key>ru</key>
15+
<value>Регистр бухгалтерии</value>
16+
</synonym>
17+
<synonym>
18+
<key>en</key>
19+
<value>Accounting register</value>
20+
</synonym>
21+
<useStandardCommands>true</useStandardCommands>
22+
<chartOfAccounts>ChartOfAccounts.ПланСчетов1</chartOfAccounts>
23+
<dataLockControlMode>Managed</dataLockControlMode>
24+
<enableTotalsSplitting>true</enableTotalsSplitting>
25+
<dimensions uuid="902c08a9-e457-436a-b0fb-b996f0d9bb00">
26+
<name>Измерение1</name>
27+
<type>
28+
<types>String</types>
29+
<stringQualifiers>
30+
<length>10</length>
31+
</stringQualifiers>
32+
</type>
33+
<minValue xsi:type="core:UndefinedValue"/>
34+
<maxValue xsi:type="core:UndefinedValue"/>
35+
<indexing>Index</indexing>
36+
<fullTextSearch>Use</fullTextSearch>
37+
<balance>true</balance>
38+
</dimensions>
39+
<resources uuid="e88df8bd-bf97-41a4-88fc-09c84a51824b">
40+
<name>Ресурс1</name>
41+
<type>
42+
<types>Number</types>
43+
<numberQualifiers>
44+
<precision>10</precision>
45+
</numberQualifiers>
46+
</type>
47+
<minValue xsi:type="core:UndefinedValue"/>
48+
<maxValue xsi:type="core:UndefinedValue"/>
49+
<fullTextSearch>Use</fullTextSearch>
50+
<balance>true</balance>
51+
</resources>
52+
</mdclass:AccountingRegister>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<mdclass:AccumulationRegister xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:core="http://g5.1c.ru/v8/dt/mcore" xmlns:mdclass="http://g5.1c.ru/v8/dt/metadata/mdclass" uuid="8ea07f36-d671-4649-bc7a-94daa939e77f">
3+
<producedTypes>
4+
<selectionType typeId="52e2d320-a2c1-457b-9ab3-31be042c9dce" valueTypeId="56120353-cc95-42f2-aada-3e589f99814e"/>
5+
<listType typeId="3ecc0e29-a605-4d25-83cd-82658780314d" valueTypeId="50baa608-260a-43b3-90ca-6ed8149558fb"/>
6+
<managerType typeId="5b28c444-abfa-4d65-8732-0d89249e476e" valueTypeId="e2db1381-968e-48c7-828f-cff78e9168df"/>
7+
<recordSetType typeId="a60f3ee0-9553-4c98-b339-d2cf52f4b5b7" valueTypeId="2c6e0608-29c8-4e5e-93ae-f2b4f8c650b4"/>
8+
<recordKeyType typeId="f0e917cf-e4ef-45c9-928d-643e28e2ca3d" valueTypeId="7b707178-2151-4600-ac3b-17c1160e7e60"/>
9+
<recordType typeId="8e7ec4e6-0db5-4c54-bb2a-70b2493f4a9b" valueTypeId="96b9bf92-befe-448c-bd8c-ac86cc60582b"/>
10+
</producedTypes>
11+
<name>РегистрНакопления1</name>
12+
<synonym>
13+
<key>ru</key>
14+
<value>Регистр накопления</value>
15+
</synonym>
16+
<useStandardCommands>true</useStandardCommands>
17+
<dataLockControlMode>Managed</dataLockControlMode>
18+
<enableTotalsSplitting>true</enableTotalsSplitting>
19+
<resources uuid="a187a281-f5cd-4e1c-8f3f-37212a840339">
20+
<name>Ресурс1</name>
21+
<type>
22+
<types>Number</types>
23+
<numberQualifiers>
24+
<precision>10</precision>
25+
</numberQualifiers>
26+
</type>
27+
<minValue xsi:type="core:UndefinedValue"/>
28+
<maxValue xsi:type="core:UndefinedValue"/>
29+
<fullTextSearch>Use</fullTextSearch>
30+
</resources>
31+
<dimensions uuid="461cae93-fe90-4bbb-8f79-0963e2d39ec5">
32+
<name>Измерение1</name>
33+
<type>
34+
<types>String</types>
35+
<stringQualifiers>
36+
<length>10</length>
37+
</stringQualifiers>
38+
</type>
39+
<minValue xsi:type="core:UndefinedValue"/>
40+
<maxValue xsi:type="core:UndefinedValue"/>
41+
<fullTextSearch>Use</fullTextSearch>
42+
<useInTotals>true</useInTotals>
43+
</dimensions>
44+
</mdclass:AccumulationRegister>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+

0 commit comments

Comments
 (0)