Skip to content

Commit 7341412

Browse files
authored
Типы значений в пропущенных на первом этапе местах. Добавление двухязычного хранения значений перечислений (#524)
1. использование новой версии common library 2. доработано хранение типов значений, часть классов уехала в common lib 3. все перечисления переведены на хранение двух языков имени 4. для catalog добавлено хранение владельцев
1 parent 8d3bd94 commit 7341412

File tree

268 files changed

+21492
-14501
lines changed

Some content is hidden

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

268 files changed

+21492
-14501
lines changed

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ dependencies {
5858

5959
// прочее
6060
implementation("commons-io", "commons-io", "2.18.0")
61-
implementation("io.github.1c-syntax", "bsl-common-library", "0.9.0.9-SNAPSHOT")
61+
implementation("io.github.1c-syntax", "bsl-common-library", "0.9.0.16-SNAPSHOT")
6262
implementation("io.github.1c-syntax", "utils", "0.6.3")
6363
implementation("io.github.1c-syntax", "supportconf", "0.14.3") {
6464
exclude("io.github.1c-syntax", "bsl-common-library")

docs/ru/examples.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
- [Работа с метаданными](#работа-с-метаданными)
1010
- [Работа с формами](#работа-с-формами)
1111
- [Работа с модулями](#работа-с-модулями)
12-
- [Анализ описания типов данных](#анализ-типов-данных)
12+
- [Анализ типов данных](#анализ-типов-данных)
1313
- [Поиск и фильтрация объектов](#поиск-и-фильтрация-объектов)
1414
- [Практические сценарии](#практические-сценарии)
1515

@@ -317,11 +317,11 @@ if (childMDO.isPresent() && childMDO.get() instanceof Catalog catalog) {
317317
// проверим наименование
318318
assertThat(objectAttribute.getName()).isEqualTo("Реквизит2");
319319

320-
// описание типа `getValueType`
320+
// описание типа доступно через getValueType()
321321
assertThat(objectAttribute.getValueType()).isNotNull();
322-
// убеимся в наличии примитивного типа СТРОКА в составе описания
322+
// убедимся в наличии примитивного типа СТРОКА в составе описания
323323
assertThat(objectAttribute.getValueType().contains(PrimitiveValueType.NUMBER)).isTrue();
324-
// убедимся, что тип не составно
324+
// убедимся, что тип не составной
325325
assertThat(objectAttribute.getValueType().isComposite()).isFalse();
326326
// убедимся, что квалификаторы прочитаны
327327
assertThat(objectAttribute.getValueType().getQualifiers()).hasSize(1);
@@ -330,7 +330,7 @@ if (childMDO.isPresent() && childMDO.get() instanceof Catalog catalog) {
330330
var qualifier = objectAttribute.getValueType().getQualifiers().get(0);
331331
assertThat(qualifier).isInstanceOf(NumberQualifiers.class);
332332

333-
// убаимся, что квалификатор числа содожержит верную информацию
333+
// убедимся, что квалификатор числа содежржит верную информацию
334334
var numberQualifiers = (NumberQualifiers) qualifier;
335335
assertThat(numberQualifiers.getPrecision()).isEqualTo(10); // длина 10
336336
assertThat(numberQualifiers.getScale()).isEqualTo(0); // точность 0
@@ -380,11 +380,11 @@ if (childMDO.isPresent() && childMDO.get() instanceof DefinedType definedType) {
380380
// квалификаторов нет
381381
assertThat(definedType.getValueType().getQualifiers()).isEmpty();
382382

383-
// создадим типа по имени
383+
// создадим тип по имени
384384
var typeContains = MetadataValueType.fromString("EnumRef.ДополнительныеЗначенияДоступа");
385385

386386
assertThat(typeContains).isNotNull();
387-
// полученый тип относится к перечислению
387+
// полученный тип относится к перечислению
388388
assertThat(typeContains.getKind()).isEqualTo(MDOType.ENUM);
389389
// тип не составной
390390
assertThat(typeContains.isComposite()).isFalse();
@@ -398,7 +398,7 @@ if (childMDO.isPresent() && childMDO.get() instanceof DefinedType definedType) {
398398
assertThat(typeNotContains).isNotNull();
399399
// убедимся, что первый тип входит в состав описания
400400
assertThat(definedType.getValueType().contains(typeContains)).isTrue();
401-
// убедимся, что второй тип нпе входит в состав
401+
// убедимся, что второй тип не входит в состав
402402
assertThat(definedType.getValueType().contains(typeNotContains)).isFalse();
403403
}
404404
```

src/main/java/com/github/_1c_syntax/bsl/mdclasses/CF.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@
2828
import com.github._1c_syntax.bsl.mdo.Subsystem;
2929
import com.github._1c_syntax.bsl.mdo.support.ApplicationRunMode;
3030
import com.github._1c_syntax.bsl.mdo.support.InterfaceCompatibilityMode;
31-
import com.github._1c_syntax.bsl.mdo.support.ScriptVariant;
3231
import com.github._1c_syntax.bsl.mdo.support.UsePurposes;
3332
import com.github._1c_syntax.bsl.support.CompatibilityMode;
3433
import com.github._1c_syntax.bsl.types.MdoReference;
3534
import com.github._1c_syntax.bsl.types.ModuleType;
35+
import com.github._1c_syntax.bsl.types.ScriptVariant;
3636

3737
import java.net.URI;
3838
import java.util.Collections;
@@ -162,7 +162,9 @@ default List<Subsystem> includedSubsystems(MdoReference mdoReference, boolean ad
162162
}
163163

164164
/**
165-
* Возвращает локализованное представление ссылки на объект метаданных с учетом используемого варианта языка разработки
165+
* Возвращает локализованное представление ссылки на объект метаданных с учетом используемого варианта языка
166+
* разработки
167+
*
166168
* @param md Объект метаданных, принадлежащий MDClasses
167169
* @return Строковое представление ссылки
168170
*/

src/main/java/com/github/_1c_syntax/bsl/mdclasses/Configuration.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,8 @@
7474
import com.github._1c_syntax.bsl.mdo.support.ApplicationRunMode;
7575
import com.github._1c_syntax.bsl.mdo.support.DataLockControlMode;
7676
import com.github._1c_syntax.bsl.mdo.support.InterfaceCompatibilityMode;
77-
import com.github._1c_syntax.bsl.mdo.support.MultiLanguageString;
7877
import com.github._1c_syntax.bsl.mdo.support.ObjectBelonging;
7978
import com.github._1c_syntax.bsl.mdo.support.RoleRight;
80-
import com.github._1c_syntax.bsl.mdo.support.ScriptVariant;
8179
import com.github._1c_syntax.bsl.mdo.support.UseMode;
8280
import com.github._1c_syntax.bsl.mdo.support.UsePurposes;
8381
import com.github._1c_syntax.bsl.mdo.utils.LazyLoader;
@@ -86,6 +84,8 @@
8684
import com.github._1c_syntax.bsl.types.ConfigurationSource;
8785
import com.github._1c_syntax.bsl.types.MdoReference;
8886
import com.github._1c_syntax.bsl.types.ModuleType;
87+
import com.github._1c_syntax.bsl.types.MultiLanguageString;
88+
import com.github._1c_syntax.bsl.types.ScriptVariant;
8989
import com.github._1c_syntax.utils.Lazy;
9090
import lombok.Builder;
9191
import lombok.Builder.Default;

src/main/java/com/github/_1c_syntax/bsl/mdclasses/ConfigurationExtension.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,17 +74,17 @@
7474
import com.github._1c_syntax.bsl.mdo.support.ApplicationRunMode;
7575
import com.github._1c_syntax.bsl.mdo.support.ConfigurationExtensionPurpose;
7676
import com.github._1c_syntax.bsl.mdo.support.InterfaceCompatibilityMode;
77-
import com.github._1c_syntax.bsl.mdo.support.MultiLanguageString;
7877
import com.github._1c_syntax.bsl.mdo.support.ObjectBelonging;
7978
import com.github._1c_syntax.bsl.mdo.support.RoleRight;
80-
import com.github._1c_syntax.bsl.mdo.support.ScriptVariant;
8179
import com.github._1c_syntax.bsl.mdo.support.UsePurposes;
8280
import com.github._1c_syntax.bsl.mdo.utils.LazyLoader;
8381
import com.github._1c_syntax.bsl.support.CompatibilityMode;
8482
import com.github._1c_syntax.bsl.support.SupportVariant;
8583
import com.github._1c_syntax.bsl.types.ConfigurationSource;
8684
import com.github._1c_syntax.bsl.types.MdoReference;
8785
import com.github._1c_syntax.bsl.types.ModuleType;
86+
import com.github._1c_syntax.bsl.types.MultiLanguageString;
87+
import com.github._1c_syntax.bsl.types.ScriptVariant;
8888
import com.github._1c_syntax.utils.Lazy;
8989
import lombok.Builder;
9090
import lombok.Builder.Default;

src/main/java/com/github/_1c_syntax/bsl/mdclasses/ExternalDataProcessor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@
2828
import com.github._1c_syntax.bsl.mdo.children.ObjectCommand;
2929
import com.github._1c_syntax.bsl.mdo.children.ObjectForm;
3030
import com.github._1c_syntax.bsl.mdo.children.ObjectTemplate;
31-
import com.github._1c_syntax.bsl.mdo.support.MultiLanguageString;
3231
import com.github._1c_syntax.bsl.mdo.utils.LazyLoader;
3332
import com.github._1c_syntax.bsl.types.ConfigurationSource;
3433
import com.github._1c_syntax.bsl.types.MdoReference;
34+
import com.github._1c_syntax.bsl.types.MultiLanguageString;
3535
import com.github._1c_syntax.utils.Lazy;
3636
import lombok.Builder;
3737
import lombok.Builder.Default;

src/main/java/com/github/_1c_syntax/bsl/mdclasses/ExternalReport.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@
2828
import com.github._1c_syntax.bsl.mdo.children.ObjectCommand;
2929
import com.github._1c_syntax.bsl.mdo.children.ObjectForm;
3030
import com.github._1c_syntax.bsl.mdo.children.ObjectTemplate;
31-
import com.github._1c_syntax.bsl.mdo.support.MultiLanguageString;
3231
import com.github._1c_syntax.bsl.mdo.utils.LazyLoader;
3332
import com.github._1c_syntax.bsl.types.ConfigurationSource;
3433
import com.github._1c_syntax.bsl.types.MdoReference;
34+
import com.github._1c_syntax.bsl.types.MultiLanguageString;
3535
import com.github._1c_syntax.utils.Lazy;
3636
import lombok.Builder;
3737
import lombok.Builder.Default;

src/main/java/com/github/_1c_syntax/bsl/mdclasses/MDClasses.java

Lines changed: 23 additions & 23 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 - 2025
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 - 2025
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 com.github._1c_syntax.bsl.reader.MDOReader;
2525
import com.github._1c_syntax.bsl.types.MDOType;
@@ -196,7 +196,7 @@ private Set<String> mdoTypeGroupNames() {
196196
&& type != MDOType.EXTERNAL_DATA_PROCESSOR
197197
&& type != MDOType.UNKNOWN
198198
)
199-
.map(MDOType::getGroupName)
199+
.map(MDOType::groupName)
200200
.collect(Collectors.toSet());
201201
}
202202
}

src/main/java/com/github/_1c_syntax/bsl/mdo/AccountingRegister.java

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
1-
/*
2-
* This file is a part of MDClasses.
3-
*
4-
* Copyright (c) 2019 - 2025
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.mdo;
1+
/*
2+
* This file is a part of MDClasses.
3+
*
4+
* Copyright (c) 2019 - 2025
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.mdo;
2323

2424
import com.github._1c_syntax.bsl.mdo.children.Dimension;
2525
import com.github._1c_syntax.bsl.mdo.children.ObjectCommand;
2626
import com.github._1c_syntax.bsl.mdo.children.ObjectForm;
2727
import com.github._1c_syntax.bsl.mdo.children.ObjectTemplate;
2828
import com.github._1c_syntax.bsl.mdo.children.Resource;
29-
import com.github._1c_syntax.bsl.mdo.support.MultiLanguageString;
3029
import com.github._1c_syntax.bsl.mdo.support.ObjectBelonging;
3130
import com.github._1c_syntax.bsl.mdo.support.RoleRight;
3231
import com.github._1c_syntax.bsl.mdo.utils.LazyLoader;
3332
import com.github._1c_syntax.bsl.support.SupportVariant;
3433
import com.github._1c_syntax.bsl.types.MdoReference;
34+
import com.github._1c_syntax.bsl.types.MultiLanguageString;
3535
import com.github._1c_syntax.utils.Lazy;
3636
import lombok.Builder;
3737
import lombok.Builder.Default;

src/main/java/com/github/_1c_syntax/bsl/mdo/AccumulationRegister.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@
2626
import com.github._1c_syntax.bsl.mdo.children.ObjectForm;
2727
import com.github._1c_syntax.bsl.mdo.children.ObjectTemplate;
2828
import com.github._1c_syntax.bsl.mdo.children.Resource;
29-
import com.github._1c_syntax.bsl.mdo.support.MultiLanguageString;
3029
import com.github._1c_syntax.bsl.mdo.support.ObjectBelonging;
3130
import com.github._1c_syntax.bsl.mdo.support.RoleRight;
3231
import com.github._1c_syntax.bsl.mdo.utils.LazyLoader;
3332
import com.github._1c_syntax.bsl.support.SupportVariant;
3433
import com.github._1c_syntax.bsl.types.MdoReference;
34+
import com.github._1c_syntax.bsl.types.MultiLanguageString;
3535
import com.github._1c_syntax.utils.Lazy;
3636
import lombok.Builder;
3737
import lombok.Builder.Default;

0 commit comments

Comments
 (0)