Skip to content

Commit a00fb92

Browse files
committed
1. добавлен вид интерфейса в конфигурацию и расширение
2. добавлен новый тип мдо ЦветПалитры 3. добавлены начальные тесты для 8.5
1 parent c84044e commit a00fb92

File tree

223 files changed

+7115
-2456
lines changed

Some content is hidden

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

223 files changed

+7115
-2456
lines changed

.github/workflows/check.yml

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,27 @@ jobs:
2929
distribution: 'liberica'
3030
- name: Build with Gradle
3131
run: ./gradlew check --stacktrace
32-
- name: Archive test results
33-
if: always() && matrix.prefix == 'nix'
34-
uses: EnricoMi/publish-unit-test-result-action@v2
32+
- name: Upload Test Results
33+
if: always()
34+
uses: actions/upload-artifact@v4
3535
with:
36-
junit_files: "**/test-results/test/**/*.xml"
37-
- name: Archive test results
38-
if: always() && matrix.prefix != 'nix'
39-
uses: EnricoMi/publish-unit-test-result-action/composite@v2
40-
with:
41-
junit_files: "**/test-results/test/**/*.xml"
36+
name: Test Results (Java ${{ matrix.java_version }}.${{ matrix.os }})
37+
path: "**/test-results/test/**/*.xml"
38+
publish-test-results:
39+
needs: build
40+
runs-on: ubuntu-latest
41+
permissions:
42+
checks: write
43+
pull-requests: write
44+
contents: read
45+
issues: read
46+
if: always()
47+
steps:
48+
- name: Download Artifacts
49+
uses: actions/download-artifact@v4
50+
with:
51+
path: artifacts
52+
- name: Publish Test Results
53+
uses: EnricoMi/publish-unit-test-result-action@v2
54+
with:
55+
junit_files: "artifacts/**/*.xml"

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,6 @@ Gradle_*.xml
1616
/.idea/material_theme_project_new.xml
1717
*.hprof
1818
*.hprof.idom
19+
**/demo25
20+
*.cf
21+
**/ConfigDumpInfo.xml

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ dependencies {
5454
// прочее
5555
implementation("commons-io", "commons-io", "2.18.0")
5656
implementation("io.github.1c-syntax", "utils", "0.6.2")
57-
implementation("io.github.1c-syntax", "bsl-common-library", "0.7.1")
57+
implementation("io.github.1c-syntax", "bsl-common-library", "0.8.0-rc.1")
5858
implementation("io.github.1c-syntax", "supportconf", "0.14.1") {
5959
exclude("io.github.1c-syntax", "bsl-common-library")
6060
}

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import com.github._1c_syntax.bsl.mdo.ModuleOwner;
2828
import com.github._1c_syntax.bsl.mdo.Subsystem;
2929
import com.github._1c_syntax.bsl.mdo.support.ApplicationRunMode;
30+
import com.github._1c_syntax.bsl.mdo.support.InterfaceCompatibilityMode;
3031
import com.github._1c_syntax.bsl.mdo.support.ScriptVariant;
3132
import com.github._1c_syntax.bsl.mdo.support.UsePurposes;
3233
import com.github._1c_syntax.bsl.support.CompatibilityMode;
@@ -51,6 +52,11 @@ public interface CF extends MDClass, ConfigurationTree, CFAccess {
5152
*/
5253
ScriptVariant getScriptVariant();
5354

55+
/**
56+
* Вид интерфейса
57+
*/
58+
InterfaceCompatibilityMode getInterfaceCompatibilityMode();
59+
5460
/**
5561
* Режим совместимости
5662
*/

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
import com.github._1c_syntax.bsl.mdo.Language;
5858
import com.github._1c_syntax.bsl.mdo.MD;
5959
import com.github._1c_syntax.bsl.mdo.Module;
60+
import com.github._1c_syntax.bsl.mdo.PaletteColor;
6061
import com.github._1c_syntax.bsl.mdo.Report;
6162
import com.github._1c_syntax.bsl.mdo.Role;
6263
import com.github._1c_syntax.bsl.mdo.ScheduledJob;
@@ -72,6 +73,7 @@
7273
import com.github._1c_syntax.bsl.mdo.XDTOPackage;
7374
import com.github._1c_syntax.bsl.mdo.support.ApplicationRunMode;
7475
import com.github._1c_syntax.bsl.mdo.support.DataLockControlMode;
76+
import com.github._1c_syntax.bsl.mdo.support.InterfaceCompatibilityMode;
7577
import com.github._1c_syntax.bsl.mdo.support.MultiLanguageString;
7678
import com.github._1c_syntax.bsl.mdo.support.ObjectBelonging;
7779
import com.github._1c_syntax.bsl.mdo.support.RoleRight;
@@ -88,7 +90,6 @@
8890
import lombok.Builder;
8991
import lombok.Builder.Default;
9092
import lombok.EqualsAndHashCode;
91-
import lombok.NonNull;
9293
import lombok.Singular;
9394
import lombok.ToString;
9495
import lombok.Value;
@@ -105,7 +106,6 @@
105106
@Builder
106107
@ToString(of = {"name", "uuid"})
107108
@EqualsAndHashCode(of = {"name", "uuid"})
108-
@NonNull
109109
public class Configuration implements CF {
110110

111111
/**
@@ -140,6 +140,8 @@ public class Configuration implements CF {
140140
@Default
141141
ScriptVariant scriptVariant = ScriptVariant.ENGLISH;
142142
@Default
143+
InterfaceCompatibilityMode interfaceCompatibilityMode = InterfaceCompatibilityMode.VERSION_8_2;
144+
@Default
143145
CompatibilityMode compatibilityMode = new CompatibilityMode();
144146
@Default
145147
CompatibilityMode configurationExtensionCompatibilityMode = new CompatibilityMode();
@@ -208,6 +210,8 @@ public class Configuration implements CF {
208210
@Singular
209211
List<StyleItem> styleItems;
210212
@Singular
213+
List<PaletteColor> paletteColors;
214+
@Singular
211215
List<Style> styles;
212216
@Singular
213217
List<Language> languages;

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
import com.github._1c_syntax.bsl.mdo.Language;
5858
import com.github._1c_syntax.bsl.mdo.MD;
5959
import com.github._1c_syntax.bsl.mdo.Module;
60+
import com.github._1c_syntax.bsl.mdo.PaletteColor;
6061
import com.github._1c_syntax.bsl.mdo.Report;
6162
import com.github._1c_syntax.bsl.mdo.Role;
6263
import com.github._1c_syntax.bsl.mdo.ScheduledJob;
@@ -72,6 +73,7 @@
7273
import com.github._1c_syntax.bsl.mdo.XDTOPackage;
7374
import com.github._1c_syntax.bsl.mdo.support.ApplicationRunMode;
7475
import com.github._1c_syntax.bsl.mdo.support.ConfigurationExtensionPurpose;
76+
import com.github._1c_syntax.bsl.mdo.support.InterfaceCompatibilityMode;
7577
import com.github._1c_syntax.bsl.mdo.support.MultiLanguageString;
7678
import com.github._1c_syntax.bsl.mdo.support.ObjectBelonging;
7779
import com.github._1c_syntax.bsl.mdo.support.RoleRight;
@@ -131,6 +133,8 @@ public class ConfigurationExtension implements CF {
131133
@Default
132134
ScriptVariant scriptVariant = ScriptVariant.ENGLISH;
133135
@Default
136+
InterfaceCompatibilityMode interfaceCompatibilityMode = InterfaceCompatibilityMode.VERSION_8_2;
137+
@Default
134138
CompatibilityMode compatibilityMode = new CompatibilityMode();
135139
@Default
136140
CompatibilityMode configurationExtensionCompatibilityMode = new CompatibilityMode();
@@ -199,6 +203,8 @@ public class ConfigurationExtension implements CF {
199203
@Singular
200204
List<StyleItem> styleItems;
201205
@Singular
206+
List<PaletteColor> paletteColors;
207+
@Singular
202208
List<Style> styles;
203209
@Singular
204210
List<Language> languages;

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
import com.github._1c_syntax.bsl.mdo.IntegrationService;
5656
import com.github._1c_syntax.bsl.mdo.Interface;
5757
import com.github._1c_syntax.bsl.mdo.Language;
58+
import com.github._1c_syntax.bsl.mdo.PaletteColor;
5859
import com.github._1c_syntax.bsl.mdo.Report;
5960
import com.github._1c_syntax.bsl.mdo.Role;
6061
import com.github._1c_syntax.bsl.mdo.ScheduledJob;
@@ -400,6 +401,18 @@ default Optional<StyleItem> findStyleItem(Predicate<? super StyleItem> predicate
400401
return getStyleItems().stream().filter(predicate).findFirst();
401402
}
402403

404+
/**
405+
* Цвет палитры
406+
*/
407+
List<PaletteColor> getPaletteColors();
408+
409+
/**
410+
* Поиск элемента стиля по условию
411+
*/
412+
default Optional<PaletteColor> findPaletteColor(Predicate<? super PaletteColor> predicate) {
413+
return getPaletteColors().stream().filter(predicate).findFirst();
414+
}
415+
403416
/**
404417
* Стили
405418
*/
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
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;
23+
24+
import com.github._1c_syntax.bsl.mdo.support.MultiLanguageString;
25+
import com.github._1c_syntax.bsl.mdo.support.ObjectBelonging;
26+
import com.github._1c_syntax.bsl.support.SupportVariant;
27+
import com.github._1c_syntax.bsl.types.MdoReference;
28+
import lombok.Builder;
29+
import lombok.EqualsAndHashCode;
30+
import lombok.ToString;
31+
import lombok.Value;
32+
33+
import static lombok.Builder.Default;
34+
35+
@Value
36+
@Builder
37+
@ToString(of = {"name", "uuid"})
38+
@EqualsAndHashCode(of = {"name", "uuid"})
39+
public class PaletteColor implements MDObject {
40+
41+
/*
42+
* MDObject
43+
*/
44+
45+
@Default
46+
String uuid = "";
47+
@Default
48+
String name = "";
49+
@Default
50+
MdoReference mdoReference = MdoReference.EMPTY;
51+
@Default
52+
ObjectBelonging objectBelonging = ObjectBelonging.OWN;
53+
@Default
54+
String comment = "";
55+
@Default
56+
MultiLanguageString synonym = MultiLanguageString.EMPTY;
57+
@Default
58+
SupportVariant supportVariant = SupportVariant.NONE;
59+
60+
/*
61+
* Свое
62+
*/
63+
}
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
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.support;
23+
24+
import lombok.AllArgsConstructor;
25+
import lombok.Getter;
26+
import lombok.ToString;
27+
import lombok.experimental.Accessors;
28+
29+
import java.util.Arrays;
30+
31+
/**
32+
* Возможные варианты интерфейсов
33+
*/
34+
@AllArgsConstructor
35+
@ToString
36+
@Getter
37+
public enum InterfaceCompatibilityMode implements EnumWithValue {
38+
TAXI("Taxi"),
39+
TAXI_ENABLE_VERSION_8_2("TaxiEnableVersion8_2"),
40+
TAXI_ENABLE_VERSION_8_5("TaxiEnableVersion8_5"),
41+
VERSION_8_2("Version8_2"),
42+
VERSION_8_2_ENABLE_TAXI("Version8_2EnableTaxi"),
43+
VERSION_8_5("Version8_5"),
44+
VERSION_8_5_ENABLE_TAXI("Version8_5EnableTaxi"),
45+
UNKNOWN("unknown") {
46+
@Override
47+
public boolean isUnknown() {
48+
return true;
49+
}
50+
};
51+
52+
@Accessors(fluent = true)
53+
private final String value;
54+
55+
public static InterfaceCompatibilityMode getByName(String value) {
56+
return Arrays.stream(values())
57+
.filter(interfaceCompMode -> interfaceCompMode.value().equalsIgnoreCase(value))
58+
.findAny()
59+
.orElse(VERSION_8_2);
60+
}
61+
}

src/main/java/com/github/_1c_syntax/bsl/reader/common/xstream/ExtendXStream.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
import com.github._1c_syntax.bsl.mdo.support.DataSeparation;
3737
import com.github._1c_syntax.bsl.mdo.support.FormType;
3838
import com.github._1c_syntax.bsl.mdo.support.IndexingType;
39+
import com.github._1c_syntax.bsl.mdo.support.InterfaceCompatibilityMode;
3940
import com.github._1c_syntax.bsl.mdo.support.MessageDirection;
4041
import com.github._1c_syntax.bsl.mdo.support.ObjectBelonging;
4142
import com.github._1c_syntax.bsl.mdo.support.ReturnValueReuse;
@@ -267,6 +268,7 @@ protected void setupConverters() {
267268
registerConverter(new EnumConverter<>(UseMode.class));
268269
registerConverter(new EnumConverter<>(UsePurposes.class));
269270
registerConverter(new EnumConverter<>(FormElementType.class));
271+
registerConverter(new EnumConverter<>(InterfaceCompatibilityMode.class));
270272
}
271273

272274
private void init() {

0 commit comments

Comments
 (0)