diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f6baab1a9..62dd2dee7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,10 +28,16 @@ jobs: - uses: actions/checkout@v2 if: ${{ !inputs.analyze }} - - name: Set up JDK 11 - uses: actions/setup-java@v1 +# - name: Set up JDK 17 +# uses: actions/setup-java@v1 +# with: +# java-version: 17 +# java-package: jdk+fx + + - name: Set up Maven 3.9.6 + uses: s4u/setup-maven-action@v1.12.0 with: - java-version: 11 + java-version: 17 java-package: jdk+fx - name: Free disk space @@ -42,15 +48,6 @@ jobs: # docker rmi $(docker image ls -aq) || true df -h - - name: Cache maven repo - uses: actions/cache@v2 - if: github.event_name == 'push' || github.event_name == 'pull_request' || github.event_name == 'pull_request_target' - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-latest-${{ hashFiles('**/pom.xml') }}-${{ hashFiles('targets/default/default.target') }} - restore-keys: | - ${{ runner.os }}-maven-latest- - - name: Build with Maven working-directory: ./ run: | diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 4b6fa9c6e..ab8fd6f5a 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -14,7 +14,7 @@ jobs: name: Build # This build will run on master,release/* push, local PR and PR from forks without label Analyze if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.event.repository.full_name || !contains(github.event.pull_request.labels.*.name, 'Analyze') - uses: 1C-company/v8-code-style/.github/workflows/build.yml@master + uses: 1C-company/v8-code-style/.github/workflows/build.yml@edt-2024-1 with: analyze: ${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.event.repository.full_name }} secrets: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f8a8bc2a9..a3a35c352 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,10 +13,10 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Set up JDK 11 + - name: Set up JDK 17 uses: actions/setup-java@v1 with: - java-version: 11 + java-version: 17 java-package: jdk+fx - name: Cache maven repo diff --git a/bom/pom.xml b/bom/pom.xml index 3d33a8e44..2b7b792eb 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -24,26 +24,26 @@ BOM - 3.6.0 + 3.9.4 - 2.7.0 - 2.7.0 + 4.0.5 + 4.0.5 2.3.1 ${project.basedir} - 3.1.12.2 + 4.8.3.1 3.1.1 8.29 java.header UTF-8 UTF-8 - 11 - 11 - 11 + 17 + 17 + 17 'v'yyyyMMdd-HHmm ${maven.build.timestamp} @@ -51,7 +51,7 @@ http://download.eclipse.org/releases/2022-03/ false - 0.8.6 + 0.8.8 1C-Company_v8-code-style 1c-company @@ -87,6 +87,8 @@ /tests/**/*.java **/*Plugin.java,/tests/**/* + + 1.1.2_p3 @@ -98,7 +100,7 @@ ${tycho.version} p2 - JavaSE-11 + JavaSE-17 false @@ -239,7 +241,7 @@ maven-antrun-plugin 1.8 - + com.ruleoftech markdown-page-generator-plugin @@ -299,6 +301,20 @@ + + org.eclipse.cbi.maven.plugins + eclipse-jarsigner-plugin + ${eclipse.jarsigner.plugin.version} + + ${signer.url}/jarsign.php + true + 5 + + ${env.SIGN_KEYSTORE_PATH} + ${keystorePassword} + + + @@ -380,12 +396,39 @@ com.github.spotbugs spotbugs - 4.0.0-beta2 + 4.8.3 + + + sign + + + + org.eclipse.cbi.maven.plugins + eclipse-jarsigner-plugin + ${eclipse.jarsigner.plugin.version} + + + sign + package + + sign + + + + + true + + + + + + + diff --git a/bundles/com.e1c.v8codestyle.autosort.ui/.classpath b/bundles/com.e1c.v8codestyle.autosort.ui/.classpath index e801ebfb4..81fe078c2 100644 --- a/bundles/com.e1c.v8codestyle.autosort.ui/.classpath +++ b/bundles/com.e1c.v8codestyle.autosort.ui/.classpath @@ -1,6 +1,6 @@ - + diff --git a/bundles/com.e1c.v8codestyle.autosort.ui/.settings/org.eclipse.jdt.core.prefs b/bundles/com.e1c.v8codestyle.autosort.ui/.settings/org.eclipse.jdt.core.prefs index 64d1838c8..6d3ed858f 100644 --- a/bundles/com.e1c.v8codestyle.autosort.ui/.settings/org.eclipse.jdt.core.prefs +++ b/bundles/com.e1c.v8codestyle.autosort.ui/.settings/org.eclipse.jdt.core.prefs @@ -1,8 +1,8 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 -org.eclipse.jdt.core.compiler.compliance=11 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 +org.eclipse.jdt.core.compiler.compliance=17 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning -org.eclipse.jdt.core.compiler.source=11 +org.eclipse.jdt.core.compiler.source=17 diff --git a/bundles/com.e1c.v8codestyle.autosort.ui/META-INF/MANIFEST.MF b/bundles/com.e1c.v8codestyle.autosort.ui/META-INF/MANIFEST.MF index 46dbbce1e..95fe89772 100644 --- a/bundles/com.e1c.v8codestyle.autosort.ui/META-INF/MANIFEST.MF +++ b/bundles/com.e1c.v8codestyle.autosort.ui/META-INF/MANIFEST.MF @@ -9,8 +9,9 @@ Require-Bundle: org.eclipse.ui;bundle-version="[3.118.0,4.0.0)", org.eclipse.core.runtime;bundle-version="[3.20.0,4.0.0)", org.eclipse.core.resources;bundle-version="[3.13.0,4.0.0)", org.eclipse.ui.forms;bundle-version="[3.11.0,4.0.0)", - org.eclipse.emf.ecore;bundle-version="[2.23.0,3.0.0)" -Bundle-RequiredExecutionEnvironment: JavaSE-11 + org.eclipse.emf.ecore;bundle-version="[2.23.0,3.0.0)", + com.google.inject;bundle-version="[7.0.0,8.0.0)" +Bundle-RequiredExecutionEnvironment: JavaSE-17 Automatic-Module-Name: com.e1c.v8codestyle.autosort.ui Bundle-ActivationPolicy: lazy Bundle-Localization: plugin @@ -23,5 +24,4 @@ Import-Package: com._1c.g5.v8.dt.common;version="[6.0.0,7.0.0)", com._1c.g5.wiring;version="[2.2.0,3.0.0)", com._1c.g5.wiring.binder;version="[1.1.0,2.0.0)", com.e1c.v8codestyle.autosort;version="[0.7.0,0.8.0)", - com.google.common.base;version="[30.1.0,31.0.0)", - com.google.inject;version="[5.0.0,6.0.0)" + com.google.common.base;version="[32.1.0,33.0.0)" diff --git a/bundles/com.e1c.v8codestyle.autosort/.classpath b/bundles/com.e1c.v8codestyle.autosort/.classpath index e801ebfb4..81fe078c2 100644 --- a/bundles/com.e1c.v8codestyle.autosort/.classpath +++ b/bundles/com.e1c.v8codestyle.autosort/.classpath @@ -1,6 +1,6 @@ - + diff --git a/bundles/com.e1c.v8codestyle.autosort/.settings/org.eclipse.jdt.core.prefs b/bundles/com.e1c.v8codestyle.autosort/.settings/org.eclipse.jdt.core.prefs index 64d1838c8..6d3ed858f 100644 --- a/bundles/com.e1c.v8codestyle.autosort/.settings/org.eclipse.jdt.core.prefs +++ b/bundles/com.e1c.v8codestyle.autosort/.settings/org.eclipse.jdt.core.prefs @@ -1,8 +1,8 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 -org.eclipse.jdt.core.compiler.compliance=11 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 +org.eclipse.jdt.core.compiler.compliance=17 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning -org.eclipse.jdt.core.compiler.source=11 +org.eclipse.jdt.core.compiler.source=17 diff --git a/bundles/com.e1c.v8codestyle.autosort/META-INF/MANIFEST.MF b/bundles/com.e1c.v8codestyle.autosort/META-INF/MANIFEST.MF index 381dae4fa..f056cb59e 100644 --- a/bundles/com.e1c.v8codestyle.autosort/META-INF/MANIFEST.MF +++ b/bundles/com.e1c.v8codestyle.autosort/META-INF/MANIFEST.MF @@ -9,14 +9,15 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.13.0,4.0.0)", org.eclipse.emf.ecore;bundle-version="[2.12.0,3.0.0)", org.eclipse.core.resources;bundle-version="[3.12.0,4.0.0)", com._1c.g5.wiring;bundle-version="[2.0.0,3.0.0)", - org.eclipse.emf.edit;bundle-version="[2.12.0,3.0.0)" -Bundle-RequiredExecutionEnvironment: JavaSE-11 + org.eclipse.emf.edit;bundle-version="[2.12.0,3.0.0)", + com.google.inject;bundle-version="[7.0.0,8.0.0)" +Bundle-RequiredExecutionEnvironment: JavaSE-17 Automatic-Module-Name: com.e1c.v8codestyle.autosort Bundle-ActivationPolicy: lazy Bundle-Localization: plugin Import-Package: com._1c.g5.v8.activitytracking.core;version="[1.0.0,2.0.0)", com._1c.g5.v8.bm.common.collections;version="[4.0.0,5.0.0)", - com._1c.g5.v8.bm.core;version="[8.0.0,9.0.0)", + com._1c.g5.v8.bm.core;version="[9.0.0,10.0.0)", com._1c.g5.v8.bm.core.event;version="[3.0.0,4.0.0)", com._1c.g5.v8.bm.integration;version="[11.0.0,12.0.0)", com._1c.g5.v8.bm.integration.event;version="[2.0.0,3.0.0)", @@ -28,11 +29,9 @@ Import-Package: com._1c.g5.v8.activitytracking.core;version="[1.0.0,2.0.0)", com._1c.g5.v8.dt.md.sort;version="[1.0.0,2.0.0)", com._1c.g5.v8.dt.metadata.mdclass;version="[9.0.0,10.0.0)", com.e1c.g5.v8.dt.cli.api;version="[2.0.0,3.0.0)", - com.e1c.g5.v8.dt.cli.api.components;version="[2.0.0,3.0.0)", + com.e1c.g5.v8.dt.cli.api.components;version="[3.0.0,4.0.0)", com.e1c.v8codestyle;version="[0.7.0,0.8.0)", - com.google.common.base;version="[30.1.0,31.0.0)", - com.google.inject;version="[5.0.1,6.0.0)", - com.google.inject.binder;version="[5.0.1,6.0.0)", + com.google.common.base;version="[32.1.0,33.0.0)", org.slf4j;version="[1.7.2,2.0.0)" Export-Package: com.e1c.v8codestyle.autosort;version="0.7.0"; uses:="org.eclipse.emf.ecore, diff --git a/bundles/com.e1c.v8codestyle.autosort/src/com/e1c/v8codestyle/internal/autosort/SortService.java b/bundles/com.e1c.v8codestyle.autosort/src/com/e1c/v8codestyle/internal/autosort/SortService.java index 14c545930..f4bea9b89 100644 --- a/bundles/com.e1c.v8codestyle.autosort/src/com/e1c/v8codestyle/internal/autosort/SortService.java +++ b/bundles/com.e1c.v8codestyle.autosort/src/com/e1c/v8codestyle/internal/autosort/SortService.java @@ -119,6 +119,20 @@ public SortService(IDtProjectManager dtProjectManager, IBmModelManager modelMana this.configurationProvider = configurationProvider; this.workspaceOrchestrator = workspaceOrchestrator; this.modelEditingSupport = modelEditingSupport; + workspaceOrchestrator.addListener(event -> { + if (event.isProjectClosing()) + { + IProject project = event.getProject().getWorkspaceProject(); + if (project != null) + { + SortJob job = jobs.remove(project); + if (job != null) + { + job.cancel(); + } + } + } + }); } @LifecycleParticipant(phase = LifecyclePhase.RESOURCE_LOADING, diff --git a/bundles/com.e1c.v8codestyle.bsl.ui/.classpath b/bundles/com.e1c.v8codestyle.bsl.ui/.classpath index e801ebfb4..81fe078c2 100644 --- a/bundles/com.e1c.v8codestyle.bsl.ui/.classpath +++ b/bundles/com.e1c.v8codestyle.bsl.ui/.classpath @@ -1,6 +1,6 @@ - + diff --git a/bundles/com.e1c.v8codestyle.bsl.ui/.settings/org.eclipse.jdt.core.prefs b/bundles/com.e1c.v8codestyle.bsl.ui/.settings/org.eclipse.jdt.core.prefs index 34feba4dd..ab5e755ff 100644 --- a/bundles/com.e1c.v8codestyle.bsl.ui/.settings/org.eclipse.jdt.core.prefs +++ b/bundles/com.e1c.v8codestyle.bsl.ui/.settings/org.eclipse.jdt.core.prefs @@ -1,10 +1,10 @@ eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 -org.eclipse.jdt.core.compiler.compliance=11 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 +org.eclipse.jdt.core.compiler.compliance=17 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=11 +org.eclipse.jdt.core.compiler.source=17 diff --git a/bundles/com.e1c.v8codestyle.bsl.ui/META-INF/MANIFEST.MF b/bundles/com.e1c.v8codestyle.bsl.ui/META-INF/MANIFEST.MF index a1af8b34b..3b0ce22d7 100644 --- a/bundles/com.e1c.v8codestyle.bsl.ui/META-INF/MANIFEST.MF +++ b/bundles/com.e1c.v8codestyle.bsl.ui/META-INF/MANIFEST.MF @@ -13,25 +13,25 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.20.0,4.0.0)", org.eclipse.xtext.ui;bundle-version="[2.24.0,3.0.0)", org.eclipse.handly.xtext.ui;bundle-version="[1.5.0,2.0.0)", org.eclipse.handly;bundle-version="[1.5.0,2.0.0)" -Bundle-RequiredExecutionEnvironment: JavaSE-11 +Bundle-RequiredExecutionEnvironment: JavaSE-17 Automatic-Module-Name: com.e1c.v8codestyle.bsl.ui Bundle-ActivationPolicy: lazy Bundle-Localization: plugin Import-Package: com._1c.g5.ides.ui.texteditor.xtext.embedded;version="[6.0.0,7.0.0)", - com._1c.g5.v8.bm.core;version="[8.0.0,9.0.0)", + com._1c.g5.v8.bm.core;version="[9.0.0,10.0.0)", com._1c.g5.v8.dt.bsl.comment;version="[3.0.0,4.0.0)", - com._1c.g5.v8.dt.bsl.common;version="[6.0.0,7.0.0)", - com._1c.g5.v8.dt.bsl.documentation.comment;version="[4.0.0,5.0.0)", + com._1c.g5.v8.dt.bsl.common;version="[7.0.0,8.0.0)", + com._1c.g5.v8.dt.bsl.documentation.comment;version="[5.0.0,6.0.0)", com._1c.g5.v8.dt.bsl.formatting;version="[3.0.0,4.0.0)", com._1c.g5.v8.dt.bsl.model;version="[5.0.0,6.0.0)", com._1c.g5.v8.dt.bsl.model.util;version="[4.7.0,5.0.0)", com._1c.g5.v8.dt.bsl.resource.owner;version="[2.0.0,3.0.0)", com._1c.g5.v8.dt.bsl.services;version="[7.0.0,8.0.0)", com._1c.g5.v8.dt.bsl.ui;version="[9.0.0,10.0.0)", - com._1c.g5.v8.dt.bsl.ui.contentassist;version="[8.0.0,9.0.0)", - com._1c.g5.v8.dt.bsl.ui.editor;version="[9.0.0,10.0.0)", - com._1c.g5.v8.dt.bsl.ui.event;version="[5.0.0,6.0.0)", - com._1c.g5.v8.dt.bsl.ui.menu;version="[6.0.0,7.0.0)", + com._1c.g5.v8.dt.bsl.ui.contentassist;version="[9.0.0,10.0.0)", + com._1c.g5.v8.dt.bsl.ui.editor;version="[10.0.0,11.0.0)", + com._1c.g5.v8.dt.bsl.ui.event;version="[6.0.0,7.0.0)", + com._1c.g5.v8.dt.bsl.ui.menu;version="[7.0.0,8.0.0)", com._1c.g5.v8.dt.bsl.ui.quickfix;version="[4.1.0,5.0.0)", com._1c.g5.v8.dt.bsl.util;version="[8.0.0,9.0.0)", com._1c.g5.v8.dt.common;version="[6.0.0,7.0.0)", @@ -49,8 +49,8 @@ Import-Package: com._1c.g5.ides.ui.texteditor.xtext.embedded;version="[6.0.0,7.0 com._1c.g5.wiring;version="[2.2.0,3.0.0)", com._1c.g5.wiring.binder;version="[1.1.0,2.0.0)", com.e1c.g5.v8.dt.bsl.check.qfix;version="[3.0.0,4.0.0)", - com.e1c.g5.v8.dt.check.qfix;version="[2.0.0,3.0.0)", + com.e1c.g5.v8.dt.check.qfix;version="[3.0.0,4.0.0)", com.e1c.g5.v8.dt.check.qfix.components;version="[1.0.0,2.0.0)", - com.e1c.g5.v8.dt.check.settings;version="[3.0.0,4.0.0)", + com.e1c.g5.v8.dt.check.settings;version="[4.0.0,5.0.0)", com.e1c.v8codestyle.bsl;version="[0.7.0,0.8.0)", com.e1c.v8codestyle.bsl.strict;version="[0.7.0,0.8.0)" diff --git a/bundles/com.e1c.v8codestyle.bsl.ui/src/com/e1c/v8codestyle/internal/bsl/ui/handlers/FormatDocCommentModuleEditorHandler.java b/bundles/com.e1c.v8codestyle.bsl.ui/src/com/e1c/v8codestyle/internal/bsl/ui/handlers/FormatDocCommentModuleEditorHandler.java index de5cc2425..041adfec7 100644 --- a/bundles/com.e1c.v8codestyle.bsl.ui/src/com/e1c/v8codestyle/internal/bsl/ui/handlers/FormatDocCommentModuleEditorHandler.java +++ b/bundles/com.e1c.v8codestyle.bsl.ui/src/com/e1c/v8codestyle/internal/bsl/ui/handlers/FormatDocCommentModuleEditorHandler.java @@ -165,7 +165,7 @@ private Triple getFormatedDocComment(Module module, IT int methodOffset = lines.get(0).getOffset(); int length = lines.get(lines.size() - 1).getEndOffset() - methodOffset; - String lineFormatter = proposalProvider.getLineFormatter(module, methodOffset, viewer.getDocument()); + String lineFormatter = proposalProvider.getLineFormatter(module, viewer.getDocument(), methodOffset); IV8Project project = v8projectManager.getProject(module); boolean oldFormat = (project != null && project.getProject() != null) ? this.bslPreferences.getDocumentCommentProperties(project.getProject()).oldCommentFormat() : true; diff --git a/bundles/com.e1c.v8codestyle.bsl.ui/src/com/e1c/v8codestyle/internal/bsl/ui/services/BslModuleOffsets.java b/bundles/com.e1c.v8codestyle.bsl.ui/src/com/e1c/v8codestyle/internal/bsl/ui/services/BslModuleOffsets.java index aa358cf94..3637764ab 100644 --- a/bundles/com.e1c.v8codestyle.bsl.ui/src/com/e1c/v8codestyle/internal/bsl/ui/services/BslModuleOffsets.java +++ b/bundles/com.e1c.v8codestyle.bsl.ui/src/com/e1c/v8codestyle/internal/bsl/ui/services/BslModuleOffsets.java @@ -22,7 +22,7 @@ import com.e1c.v8codestyle.internal.bsl.ui.UiPlugin; /** - * Provides offset and suffixes information of module region + * Provides offsets and suffixes information of module region * * @author Kuznetsov Nikita */ @@ -32,6 +32,8 @@ public final class BslModuleOffsets private int endOffset; private int insertOffset; + private boolean needReplace; + private Map suffixes; /** @@ -89,6 +91,24 @@ public int getBeforeEndOffset() return insertOffset; } + /** + * Is need to replace existing module region + * + * @return true if need to replace existing region, false otherwise + */ + public boolean needReplace() + { + return needReplace; + } + + /** + * Sets necessity of replacing existing module region + */ + public void setNeedReplace() + { + needReplace = true; + } + /** * Add suffix of the name of this module region * diff --git a/bundles/com.e1c.v8codestyle.bsl.ui/src/com/e1c/v8codestyle/internal/bsl/ui/services/BslModuleRegionsInfo.java b/bundles/com.e1c.v8codestyle.bsl.ui/src/com/e1c/v8codestyle/internal/bsl/ui/services/BslModuleRegionsInfo.java index 811568fa6..adec7eef2 100644 --- a/bundles/com.e1c.v8codestyle.bsl.ui/src/com/e1c/v8codestyle/internal/bsl/ui/services/BslModuleRegionsInfo.java +++ b/bundles/com.e1c.v8codestyle.bsl.ui/src/com/e1c/v8codestyle/internal/bsl/ui/services/BslModuleRegionsInfo.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (C) 2023, 1C-Soft LLC and others. + * Copyright (C) 2023-2024, 1C-Soft LLC and others. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 @@ -12,8 +12,9 @@ *******************************************************************************/ package com.e1c.v8codestyle.internal.bsl.ui.services; +import org.eclipse.emf.common.util.URI; + import com._1c.g5.v8.dt.bsl.common.IBslModuleTextInsertInfo; -import com._1c.g5.v8.dt.bsl.model.Module; /** * Built-in language module region information with {@link String} region wrap data @@ -23,34 +24,47 @@ public class BslModuleRegionsInfo implements IBslModuleTextInsertInfo { + private final URI resourceURI; private final int insertPosition; - private final Module module; + private final int clearPosition; + private final int clearLength; private final String regionName; /** * {@link BslModuleRegionsInfo} constructor * + * @param resourceURI current module or document resource {@link URI}, cannot be null * @param insertPosition int insertion offset, cannot be negative - * @param module current {@link Module}, cannot be null + * @param clearPosition text clear int position, can be negative if no clear needed + * @param clearLength text clear int length, can be negative if no clear needed * @param regionName {@link String} region name, can be null */ - public BslModuleRegionsInfo(int insertPosition, Module module, String regionName) + public BslModuleRegionsInfo(URI resourceURI, int insertPosition, int clearPosition, int clearLength, + String regionName) { + this.resourceURI = resourceURI; this.insertPosition = insertPosition; - this.module = module; + this.clearPosition = clearPosition; + this.clearLength = clearLength; this.regionName = regionName; } @Override - public int getInsertPosition() + public URI getResourceURI() + { + return resourceURI; + } + + @Override + public int getPosition() { - return insertPosition; + return clearLength > 0 ? clearPosition : insertPosition; } @Override - public Module getModule() + public int getClearLength() { - return module; + return clearLength; } /** diff --git a/bundles/com.e1c.v8codestyle.bsl.ui/src/com/e1c/v8codestyle/internal/bsl/ui/services/BslModuleRegionsInfoService.java b/bundles/com.e1c.v8codestyle.bsl.ui/src/com/e1c/v8codestyle/internal/bsl/ui/services/BslModuleRegionsInfoService.java index 94bc1ef30..bc0be477b 100644 --- a/bundles/com.e1c.v8codestyle.bsl.ui/src/com/e1c/v8codestyle/internal/bsl/ui/services/BslModuleRegionsInfoService.java +++ b/bundles/com.e1c.v8codestyle.bsl.ui/src/com/e1c/v8codestyle/internal/bsl/ui/services/BslModuleRegionsInfoService.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (C) 2023, 1C-Soft LLC and others. + * Copyright (C) 2023-2024, 1C-Soft LLC and others. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 @@ -22,7 +22,9 @@ import org.eclipse.xtext.nodemodel.INode; import org.eclipse.xtext.nodemodel.util.NodeModelUtils; import org.eclipse.xtext.resource.IResourceServiceProvider; +import org.eclipse.xtext.resource.XtextResource; import org.eclipse.xtext.ui.editor.model.IXtextDocument; +import org.eclipse.xtext.util.concurrent.IUnitOfWork; import com._1c.g5.v8.dt.bsl.common.EventItemType; import com._1c.g5.v8.dt.bsl.common.IBslModuleEventData; @@ -33,6 +35,7 @@ import com._1c.g5.v8.dt.bsl.model.util.BslUtil; import com._1c.g5.v8.dt.bsl.resource.owner.BslOwnerComputerService; import com._1c.g5.v8.dt.bsl.ui.BslGeneratorMultiLangProposals; +import com._1c.g5.v8.dt.bsl.ui.editor.BslXtextDocument; import com._1c.g5.v8.dt.bsl.ui.event.BslModuleEventData; import com._1c.g5.v8.dt.common.PreferenceUtils; import com._1c.g5.v8.dt.common.StringUtils; @@ -53,69 +56,90 @@ public class BslModuleRegionsInfoService implements IBslModuleTextInsertInfoService { + @Inject private IModuleStructureProvider moduleStructureProvider; @Override - public IBslModuleTextInsertInfo getEventHandlerTextInsertInfo(IXtextDocument document, Module module, - int defaultPosition, IBslModuleEventData data) + public IBslModuleTextInsertInfo getEventHandlerTextInsertInfo(IXtextDocument document, int defaultPosition, + IBslModuleEventData data) { if (!(data instanceof BslModuleEventData)) { - return () -> defaultPosition; + return IBslModuleTextInsertInfo.getDefaultModuleTextInsertInfo(document, defaultPosition); } - URI moduleResourceUri = module.eResource().getURI(); + BslModuleEventData bslModuleEventData = (BslModuleEventData)data; + URI resourceURI = document.getResourceURI(); IResourceServiceProvider rsp = - IResourceServiceProvider.Registry.INSTANCE.getResourceServiceProvider(moduleResourceUri); + IResourceServiceProvider.Registry.INSTANCE.getResourceServiceProvider(resourceURI); IV8ProjectManager projectManager = rsp.get(IV8ProjectManager.class); - BslOwnerComputerService bslOwnerComputerService = rsp.get(BslOwnerComputerService.class); - IV8Project project = projectManager.getProject(moduleResourceUri); - EClass moduleOwner = bslOwnerComputerService.computeOwnerEClass(module); + IV8Project project = projectManager.getProject(resourceURI); + ModuleInfoUnitOfWork moduleInfoUnitOfWork = new ModuleInfoUnitOfWork(rsp.get(BslOwnerComputerService.class)); + ModuleInfo moduleInfo = document instanceof BslXtextDocument bslXTextDocument + ? bslXTextDocument.readOnlyDataModelWithoutSync(moduleInfoUnitOfWork) + : document.readOnly(moduleInfoUnitOfWork); EObject eventOwner = data.getEventOwner(); BslModuleEventData regionData = (BslModuleEventData)data; EventItemType itemType = regionData.getEventItemType(); - String suffix = getSuffix(eventOwner, itemType); - List regionPreprocessors = BslUtil.getAllRegionPreprocessors(module); + String suffix = getSuffix(eventOwner, itemType, bslModuleEventData.isInternal()); ScriptVariant scriptVariant = project.getScriptVariant(); - String declaredRegionName = getDeclaredRegionName(moduleOwner, itemType, scriptVariant); + String declaredRegionName = + getDeclaredRegionName(moduleInfo.owner, itemType, bslModuleEventData.isInternal(), scriptVariant); Map regionOffsets = - getRegionOffsets(document, regionPreprocessors, declaredRegionName, scriptVariant); + getRegionOffsets(document, moduleInfo.regionPreprocessors, declaredRegionName, scriptVariant); + BslModuleOffsets bslModuleOffsets = regionOffsets.get(declaredRegionName); int offset = getRegionOffset(regionOffsets, declaredRegionName, suffix, defaultPosition, scriptVariant); String regionName = null; - if (!isRegionExists(regionOffsets, declaredRegionName, suffix) && project.getProject() != null + boolean createRegion = !isRegionExists(regionOffsets, declaredRegionName, suffix); + int clearOffset = 0; + int clearLength = 0; + if (bslModuleOffsets != null && bslModuleOffsets.needReplace()) + { + createRegion = true; + String lineSeparator = PreferenceUtils.getLineSeparator(project.getProject()); + int lineSeparatorOffset = + bslModuleOffsets.getStartOffset() >= lineSeparator.length() ? lineSeparator.length() : 0; + clearOffset = bslModuleOffsets.getStartOffset() - lineSeparatorOffset; + clearLength = bslModuleOffsets.getEndOffset() - bslModuleOffsets.getStartOffset() + lineSeparatorOffset; + } + if (createRegion && project.getProject() != null && moduleStructureProvider.canCreateStructure(project.getProject())) { regionName = suffix.isEmpty() ? declaredRegionName : (declaredRegionName + suffix); } - return new BslModuleRegionsInfo(offset, module, regionName); + return new BslModuleRegionsInfo(resourceURI, offset, clearOffset, clearLength, regionName); } @Override public String wrap(IBslModuleTextInsertInfo moduleTextInsertInfo, String content) { - if (moduleTextInsertInfo instanceof BslModuleRegionsInfo) + if (moduleTextInsertInfo instanceof BslModuleRegionsInfo moduleRegionInformation) { - BslModuleRegionsInfo moduleRegionInformation = (BslModuleRegionsInfo)moduleTextInsertInfo; - Module module = moduleTextInsertInfo.getModule(); String regionName = moduleRegionInformation.getRegionName(); - if (module != null && regionName != null) + if (regionName != null) { - URI moduleResourceUri = module.eResource().getURI(); - IResourceServiceProvider rsp = - IResourceServiceProvider.Registry.INSTANCE.getResourceServiceProvider(moduleResourceUri); + IResourceServiceProvider rsp = IResourceServiceProvider.Registry.INSTANCE + .getResourceServiceProvider(moduleTextInsertInfo.getResourceURI()); IV8ProjectManager projectManager = rsp.get(IV8ProjectManager.class); BslGeneratorMultiLangProposals proposals = rsp.get(BslGeneratorMultiLangProposals.class); - IV8Project project = projectManager.getProject(moduleResourceUri); + IV8Project project = projectManager.getProject(moduleTextInsertInfo.getResourceURI()); String lineSeparator = PreferenceUtils.getLineSeparator(project.getProject()); proposals.setRussianLang(ScriptVariant.RUSSIAN.equals(project.getScriptVariant())); String beginRegion = proposals.getBeginRegionPropStr(); String endRegion = proposals.getEndRegionPropStr(); String space = proposals.getSpacePropStr(); StringBuilder builder = new StringBuilder(); - builder.append(lineSeparator).append(beginRegion).append(space).append(regionName); - builder.append(lineSeparator).append(content).append(lineSeparator); + if (moduleTextInsertInfo.getPosition() != 0) + { + builder.append(lineSeparator); + } + builder.append(beginRegion).append(space).append(regionName); + builder.append(content); builder.append(endRegion); - builder.append(lineSeparator); + if (moduleTextInsertInfo.getPosition() == 0) + { + builder.append(lineSeparator); + } return builder.toString(); } } @@ -171,6 +195,10 @@ && isMatchingRegion(preprocessorRegionName, declaredRegionName)) regionOffsets.put(declaredRegionName, moduleRegionInformation); if ((targetRegionName != null) && targetRegionName.equals(preprocessorRegionName)) { + if (node.getLength() == 0) + { + moduleRegionInformation.setNeedReplace(); + } return regionOffsets; } } @@ -188,6 +216,7 @@ private int getRegionOffset(Map regionOffsets, String int offset = defaultOffset; boolean createNewRegion = !isRegionExists(regionOffsets, declaredRegionName, suffix); BslModuleOffsets regionOffset = regionOffsets.get(declaredRegionName); + if (regionOffset != null) { if (!suffix.isEmpty()) @@ -225,6 +254,8 @@ private int getNewRegionOffset(Map regionOffsets, Stri boolean placeBefore = false; int offset = regionOffsets.isEmpty() ? 0 : defaultOffset; ModuleStructureSection[] declaredRegionNames = ModuleStructureSection.values(); + BslModuleOffsets lastRegionInformation = null; + BslModuleOffsets regionInformation = null; for (int regionNameIndex = 0; regionNameIndex < declaredRegionNames.length; regionNameIndex++) { ModuleStructureSection moduleStructuredSection = declaredRegionNames[regionNameIndex]; @@ -233,12 +264,17 @@ private int getNewRegionOffset(Map regionOffsets, Stri { placeBefore = true; } - BslModuleOffsets regionInformation = regionOffsets.get(declaredRegionName); + if (regionInformation != null) + { + lastRegionInformation = regionInformation; + } + regionInformation = regionOffsets.get(declaredRegionName); if (regionInformation != null) { if (placeBefore && (suffix.isEmpty() || !declaredRegionName.equals(regionName))) { - return regionInformation.getStartOffset(); + return lastRegionInformation != null ? lastRegionInformation.getEndOffset() + : regionInformation.getStartOffset(); } offset = placeBefore ? regionInformation.getStartOffset() : regionInformation.getEndOffset(); } @@ -246,20 +282,18 @@ private int getNewRegionOffset(Map regionOffsets, Stri return offset; } - private String getDeclaredRegionName(EClass moduleOwnerClass, EventItemType itemType, ScriptVariant scriptVariant) + private String getDeclaredRegionName(EClass moduleOwnerClass, EventItemType itemType, boolean isInternal, + ScriptVariant scriptVariant) { - String moduleOwnerName = moduleOwnerClass.getName(); - switch (moduleOwnerName) + if (isInternal) { - case "AbstractForm": //$NON-NLS-1$ - return getDeclaredRegionNameForForm(itemType, scriptVariant); - case "WebService": //$NON-NLS-1$ - case "HTTPService": //$NON-NLS-1$ - case "IntegrationService": //$NON-NLS-1$ return getPrivateRegionName(scriptVariant); - default: - return getDefaultRegionName(scriptVariant); } + if (moduleOwnerClass.getName().equals("AbstractForm")) //$NON-NLS-1$ + { + return getDeclaredRegionNameForForm(itemType, scriptVariant); + } + return getDefaultRegionName(scriptVariant); } private String getDeclaredRegionNameForForm(EventItemType itemType, ScriptVariant scriptVariant) @@ -287,8 +321,12 @@ private String getDefaultRegionName(ScriptVariant scriptVariant) return ModuleStructureSection.EVENT_HANDLERS.getName(scriptVariant); } - private String getSuffix(EObject eventOwner, EventItemType itemType) + private String getSuffix(EObject eventOwner, EventItemType itemType, boolean isInternal) { + if (isInternal) + { + return StringUtils.EMPTY; + } if (itemType.equals(EventItemType.TABLE)) { EObject container = eventOwner; @@ -318,4 +356,35 @@ private boolean isMatchingRegion(String regionName, String declaredRegionName) return regionName.length() >= declaredRegionNameLength && regionName.substring(0, declaredRegionNameLength).equals(declaredRegionName); } + + private final class ModuleInfo + { + private final EClass owner; + private final List regionPreprocessors; + + public ModuleInfo(EClass owner, List regionPreprocessors) + { + this.owner = owner; + this.regionPreprocessors = regionPreprocessors; + } + } + + private final class ModuleInfoUnitOfWork + implements IUnitOfWork + { + private final BslOwnerComputerService bslOwnerComputerService; + + public ModuleInfoUnitOfWork(BslOwnerComputerService bslOwnerComputerService) + { + this.bslOwnerComputerService = bslOwnerComputerService; + } + + @Override + public ModuleInfo exec(XtextResource resource) throws Exception + { + Module module = (Module)resource.getParseResult().getRootASTElement(); + return new ModuleInfo(bslOwnerComputerService.computeOwnerEClass(module), + BslUtil.getAllRegionPreprocessors(module)); + } + } } diff --git a/bundles/com.e1c.v8codestyle.bsl.ui/src/com/e1c/v8codestyle/internal/bsl/ui/views/BslDocCommentView.java b/bundles/com.e1c.v8codestyle.bsl.ui/src/com/e1c/v8codestyle/internal/bsl/ui/views/BslDocCommentView.java index 0cbfb36f7..dbedc2efc 100644 --- a/bundles/com.e1c.v8codestyle.bsl.ui/src/com/e1c/v8codestyle/internal/bsl/ui/views/BslDocCommentView.java +++ b/bundles/com.e1c.v8codestyle.bsl.ui/src/com/e1c/v8codestyle/internal/bsl/ui/views/BslDocCommentView.java @@ -14,8 +14,6 @@ import java.text.MessageFormat; -import javax.inject.Inject; - import org.eclipse.jface.action.IMenuManager; import org.eclipse.jface.action.IToolBarManager; import org.eclipse.jface.action.MenuManager; @@ -32,8 +30,8 @@ import org.eclipse.ui.IActionBars; import org.eclipse.ui.ISelectionListener; import org.eclipse.ui.ISharedImages; -import org.eclipse.ui.IWorkbench; import org.eclipse.ui.IWorkbenchActionConstants; +import org.eclipse.ui.PlatformUI; import org.eclipse.ui.part.ViewPart; import org.eclipse.xtext.resource.EObjectAtOffsetHelper; @@ -68,9 +66,6 @@ public class BslDocCommentView */ public static final String ID = "com.e1c.v8codestyle.bsl.ui.views.BslDocCommentView"; //$NON-NLS-1$ - @Inject - private IWorkbench workbench; - private TreeViewer viewer; private ISelectionListener listener; @@ -254,7 +249,7 @@ else if (obj instanceof ReturnSection || obj instanceof Section) { imageKey = ISharedImages.IMG_OBJ_FOLDER; } - return workbench.getSharedImages().getImage(imageKey); + return PlatformUI.getWorkbench().getSharedImages().getImage(imageKey); } } diff --git a/bundles/com.e1c.v8codestyle.bsl/.classpath b/bundles/com.e1c.v8codestyle.bsl/.classpath index e801ebfb4..81fe078c2 100644 --- a/bundles/com.e1c.v8codestyle.bsl/.classpath +++ b/bundles/com.e1c.v8codestyle.bsl/.classpath @@ -1,6 +1,6 @@ - + diff --git a/bundles/com.e1c.v8codestyle.bsl/.settings/org.eclipse.jdt.core.prefs b/bundles/com.e1c.v8codestyle.bsl/.settings/org.eclipse.jdt.core.prefs index 64d1838c8..6d3ed858f 100644 --- a/bundles/com.e1c.v8codestyle.bsl/.settings/org.eclipse.jdt.core.prefs +++ b/bundles/com.e1c.v8codestyle.bsl/.settings/org.eclipse.jdt.core.prefs @@ -1,8 +1,8 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 -org.eclipse.jdt.core.compiler.compliance=11 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 +org.eclipse.jdt.core.compiler.compliance=17 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning -org.eclipse.jdt.core.compiler.source=11 +org.eclipse.jdt.core.compiler.source=17 diff --git a/bundles/com.e1c.v8codestyle.bsl/META-INF/MANIFEST.MF b/bundles/com.e1c.v8codestyle.bsl/META-INF/MANIFEST.MF index 9285a13c1..4bdd51385 100644 --- a/bundles/com.e1c.v8codestyle.bsl/META-INF/MANIFEST.MF +++ b/bundles/com.e1c.v8codestyle.bsl/META-INF/MANIFEST.MF @@ -13,24 +13,24 @@ Require-Bundle: org.eclipse.core.resources;bundle-version="[3.13.0,4.0.0)", org.eclipse.xtext;bundle-version="[2.17.0,3.0.0)", org.eclipse.xtext.builder;bundle-version="[2.18.0,3.0.0)", org.eclipse.jdt.annotation;bundle-version="[2.2.0,3.0.0)";resolution:=optional -Bundle-RequiredExecutionEnvironment: JavaSE-11 +Bundle-RequiredExecutionEnvironment: JavaSE-17 Automatic-Module-Name: com.e1c.v8codestyle.bsl Bundle-ActivationPolicy: lazy -Import-Package: com._1c.g5.v8.bm.core;version="[8.0.0,9.0.0)", +Import-Package: com._1c.g5.v8.bm.core;version="[9.0.0,10.0.0)", com._1c.g5.v8.bm.integration;version="[11.0.0,12.0.0)", com._1c.g5.v8.dt.bm.xtext;version="[15.0.0,16.0.0)", - com._1c.g5.v8.dt.bsl;version="[6.0.0,7.0.0)", + com._1c.g5.v8.dt.bsl;version="[7.0.0,8.0.0)", com._1c.g5.v8.dt.bsl.comment;version="[3.0.0,4.0.0)", - com._1c.g5.v8.dt.bsl.common;version="[6.0.0,7.0.0)", + com._1c.g5.v8.dt.bsl.common;version="[7.0.0,8.0.0)", com._1c.g5.v8.dt.bsl.contextdef;version="[2.0.0,3.0.0)", - com._1c.g5.v8.dt.bsl.documentation.comment;version="[4.0.0,5.0.0)", + com._1c.g5.v8.dt.bsl.documentation.comment;version="[5.0.0,6.0.0)", com._1c.g5.v8.dt.bsl.model;version="[5.0.0,6.0.0)", com._1c.g5.v8.dt.bsl.model.resource.owner;version="[2.0.0,3.0.0)", com._1c.g5.v8.dt.bsl.model.util;version="[4.0.0,5.0.0)", com._1c.g5.v8.dt.bsl.resource;version="[15.0.0,16.0.0)", com._1c.g5.v8.dt.bsl.services;version="[7.0.0,8.0.0)", com._1c.g5.v8.dt.bsl.typesystem;version="[10.0.0,11.0.0)", - com._1c.g5.v8.dt.bsl.typesystem.util;version="[10.0.0,11.0.0)", + com._1c.g5.v8.dt.bsl.typesystem.util;version="[11.0.0,12.0.0)", com._1c.g5.v8.dt.bsl.util;version="[8.0.0,9.0.0)", com._1c.g5.v8.dt.bsl.validation;version="[18.0.0,19.0.0)", com._1c.g5.v8.dt.common;version="[6.0.0,7.0.0)", @@ -47,13 +47,13 @@ Import-Package: com._1c.g5.v8.bm.core;version="[8.0.0,9.0.0)", com._1c.g5.wiring.binder;version="[1.0.0,2.0.0)", com.e1c.g5.dt.core.api.naming;version="1.0.0", com.e1c.g5.dt.core.api.platform;version="[1.1.0,2.0.0)", - com.e1c.g5.v8.dt.bsl.check;version="[2.0.0,3.0.0)", + com.e1c.g5.v8.dt.bsl.check;version="[3.0.0,4.0.0)", com.e1c.g5.v8.dt.bsl.check.qfix;version="[3.0.0,4.0.0)", com.e1c.g5.v8.dt.check;version="[2.0.0,3.0.0)", com.e1c.g5.v8.dt.check.components;version="[2.0.0,3.0.0)", - com.e1c.g5.v8.dt.check.qfix;version="[2.0.0,3.0.0)", + com.e1c.g5.v8.dt.check.qfix;version="[3.0.0,4.0.0)", com.e1c.g5.v8.dt.check.qfix.components;version="[1.0.0,2.0.0)", - com.e1c.g5.v8.dt.check.settings;version="[3.0.0,4.0.0)", + com.e1c.g5.v8.dt.check.settings;version="[4.0.0,5.0.0)", com.e1c.v8codestyle;version="[0.7.0,0.8.0)", com.e1c.v8codestyle.check;version="[0.7.0,0.8.0)" Export-Package: com.e1c.v8codestyle.bsl;version="0.7.0", diff --git a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/check/NotifyDescriptionToServerProcedureCheck.java b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/check/NotifyDescriptionToServerProcedureCheck.java index 2f00bdbb1..55fb805e8 100644 --- a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/check/NotifyDescriptionToServerProcedureCheck.java +++ b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/check/NotifyDescriptionToServerProcedureCheck.java @@ -17,39 +17,38 @@ import java.util.Collection; import java.util.List; +import java.util.stream.StreamSupport; import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.util.EcoreUtil; import org.eclipse.xtext.EcoreUtil2; +import org.eclipse.xtext.naming.QualifiedName; +import org.eclipse.xtext.resource.IEObjectDescription; +import org.eclipse.xtext.scoping.IScope; +import org.eclipse.xtext.scoping.IScopeProvider; -import com._1c.g5.v8.bm.core.IBmTransaction; -import com._1c.g5.v8.bm.integration.IBmModel; -import com._1c.g5.v8.dt.bsl.model.BslIndexPackage; +import com._1c.g5.v8.dt.bsl.model.BslFactory; +import com._1c.g5.v8.dt.bsl.model.BslPackage; import com._1c.g5.v8.dt.bsl.model.DynamicFeatureAccess; import com._1c.g5.v8.dt.bsl.model.Expression; +import com._1c.g5.v8.dt.bsl.model.FeatureAccess; import com._1c.g5.v8.dt.bsl.model.FeatureEntry; +import com._1c.g5.v8.dt.bsl.model.Method; +import com._1c.g5.v8.dt.bsl.model.MethodsScopeSpec; import com._1c.g5.v8.dt.bsl.model.Module; -import com._1c.g5.v8.dt.bsl.model.ModuleContextDefIndex; import com._1c.g5.v8.dt.bsl.model.OperatorStyleCreator; import com._1c.g5.v8.dt.bsl.model.StaticFeatureAccess; import com._1c.g5.v8.dt.bsl.model.StringLiteral; import com._1c.g5.v8.dt.bsl.resource.DynamicFeatureAccessComputer; -import com._1c.g5.v8.dt.bsl.resource.ExportMethodProvider; import com._1c.g5.v8.dt.common.StringUtils; -import com._1c.g5.v8.dt.core.platform.IBmModelManager; -import com._1c.g5.v8.dt.core.platform.IDtProject; -import com._1c.g5.v8.dt.core.platform.IResourceLookup; +import com._1c.g5.v8.dt.mcore.ContextDef; import com._1c.g5.v8.dt.mcore.DerivedProperty; import com._1c.g5.v8.dt.mcore.Environmental; -import com._1c.g5.v8.dt.mcore.Method; import com._1c.g5.v8.dt.mcore.Property; +import com._1c.g5.v8.dt.mcore.Type; +import com._1c.g5.v8.dt.mcore.TypeItem; import com._1c.g5.v8.dt.mcore.util.Environments; import com._1c.g5.v8.dt.mcore.util.McoreUtil; import com._1c.g5.v8.dt.metadata.mdclass.CommonModule; -import com._1c.g5.v8.dt.metadata.mdclass.MdClassPackage; -import com.e1c.g5.dt.core.api.naming.INamingService; import com.e1c.g5.v8.dt.check.CheckComplexity; import com.e1c.g5.v8.dt.check.ICheckParameters; import com.e1c.g5.v8.dt.check.components.BasicCheck; @@ -70,8 +69,6 @@ public class NotifyDescriptionToServerProcedureCheck { private static final String CHECK_ID = "notify-description-to-server-procedure"; //$NON-NLS-1$ - private static final String BSL = "bsl"; //$NON-NLS-1$ - private static final String THIS_OBJECT = "ThisObject"; //$NON-NLS-1$ private static final String THIS_OBJECT_RU = "ЭтотОбъект"; //$NON-NLS-1$ @@ -81,32 +78,21 @@ public class NotifyDescriptionToServerProcedureCheck private final DynamicFeatureAccessComputer dynamicFeatureAccessComputer; - private final ExportMethodProvider exportMethodProvider; - - private final IResourceLookup resourceLookup; - - private final INamingService namingService; - - private final IBmModelManager bmModelManager; - + private final IScopeProvider scopeProvider; /** * Instantiates a new notify description to server procedure check. * * @param dynamicFeatureAccessComputer the dynamic feature access computer service, cannot be {@code null} - * @param exportMethodProvider the export method provider service, cannot be {@code null} + * @param scopeProvider provides actual local methods, cannot be {@code null} */ @Inject public NotifyDescriptionToServerProcedureCheck(DynamicFeatureAccessComputer dynamicFeatureAccessComputer, - ExportMethodProvider exportMethodProvider, IResourceLookup resourceLookup, INamingService namingService, - IBmModelManager bmModelManager) + IScopeProvider scopeProvider) { super(); this.dynamicFeatureAccessComputer = dynamicFeatureAccessComputer; - this.exportMethodProvider = exportMethodProvider; - this.resourceLookup = resourceLookup; - this.namingService = namingService; - this.bmModelManager = bmModelManager; + this.scopeProvider = scopeProvider; } @Override @@ -142,33 +128,13 @@ protected void check(Object object, ResultAcceptor resultAceptor, ICheckParamete } StringLiteral param = (StringLiteral)osc.getParams().get(0); - final String methodName = getCalledProcedureName(param); + String methodName = getCalledProcedureName(param); if (monitor.isCanceled() || StringUtils.isBlank(methodName)) { return; } - String contextDefUriAsString = getBslModuleUri(osc); - - if (monitor.isCanceled() || contextDefUriAsString == null) - { - return; - } - - URI contextDefUri = URI.createURI(contextDefUriAsString, true); - - IDtProject project = resourceLookup.getDtProject(contextDefUri); - String contextDefIndexFqn = namingService.getDependentObjectFqnAsString(contextDefUri, - BslIndexPackage.Literals.MODULE_CONTEXT_DEF_INDEX); - IBmModel model = bmModelManager.getModel(project); - IBmTransaction bmTransaction = model.getEngine().getCurrentTransaction(); - ModuleContextDefIndex index = (ModuleContextDefIndex)bmTransaction.getTopObjectByFqn(contextDefIndexFqn); - if (index == null) - { - return; - } - - Collection methods = exportMethodProvider.getMockMethods(index.getContextDef(), methodName, osc); + Collection methods = getMethods(methodName, osc, monitor); if (methods.isEmpty()) { resultAceptor.addIssue( @@ -177,7 +143,7 @@ protected void check(Object object, ResultAcceptor resultAceptor, ICheckParamete } else { - for (Method method : methods) + for (Environmental method : methods) { Environments calleeEnv = method.environments(); if (calleeEnv.containsAny(Environments.MNG_CLIENTS)) @@ -193,116 +159,85 @@ protected void check(Object object, ResultAcceptor resultAceptor, ICheckParamete } - private String getCalledProcedureName(Expression param) - { - if (param instanceof StringLiteral) - { - StringLiteral literal = (StringLiteral)param; - if (literal.getLines().size() == 1) - { - return literal.lines(true).get(0); - } - } - return null; - } - - private String getBslModuleUri(OperatorStyleCreator osc) + private Collection getMethods(String methodName, OperatorStyleCreator osc, IProgressMonitor monitor) { List params = osc.getParams(); - if (params.size() > 1) { Expression moduleParam = params.get(1); - if (moduleParam instanceof StaticFeatureAccess) - { - return getBslModuleUri((StaticFeatureAccess)moduleParam); - } - else if (moduleParam instanceof DynamicFeatureAccess) - { - return getBslModuleUri((DynamicFeatureAccess)moduleParam); - } - } - - return null; - } - - private String getBslModuleUri(StaticFeatureAccess object) - { - URI uri = null; - if (object.getName().equals(THIS_OBJECT) || object.getName().equals(THIS_OBJECT_RU)) - { - uri = EcoreUtil.getURI(object); - } - else - { - uri = getCommonModuleUri(object); - } - return constructBslUri(uri); - } - - private String getBslModuleUri(DynamicFeatureAccess object) - { - URI uri = getCommonModuleUri(object); - - return constructBslUri(uri); - } - - private String constructBslUri(URI uri) - { - if (uri == null) - { - return null; - } - return uri.trimFragment().trimFileExtension().appendFileExtension(BSL).toString(); - } - - private URI getCommonModuleUri(DynamicFeatureAccess object) - { - Environmental environmental = EcoreUtil2.getContainerOfType(object, Environmental.class); - - List features = dynamicFeatureAccessComputer.getLastObject(object, environmental.environments()); - for (FeatureEntry featureEntry : features) - { - EObject feature = featureEntry.getFeature(); - if (feature instanceof Property && ((Property)feature).getName().equals(THIS_OBJECT)) + if (moduleParam instanceof FeatureAccess featureAccess) { - Expression staticFeatureAccess = object.getSource(); - if (staticFeatureAccess instanceof StaticFeatureAccess) + if (featureAccess instanceof StaticFeatureAccess + && (THIS_OBJECT_RU.equals(featureAccess.getName()) || THIS_OBJECT.equals(featureAccess.getName()))) { - return getCommonModuleUri((StaticFeatureAccess)staticFeatureAccess); + Module module = EcoreUtil2.getContainerOfType(featureAccess, Module.class); + MethodsScopeSpec spec = BslFactory.eINSTANCE.createMethodsScopeSpec(); + spec.setModule(module); + spec.setOnlyModuleItems(true); + spec.setEnvironments(Environments.ALL_CLIENTS); + IScope methodScope = + scopeProvider.getScope(spec, BslPackage.Literals.METHODS_SCOPE_SPEC__METHOD_REF); + return StreamSupport + .stream(methodScope.getElements(QualifiedName.create(methodName)).spliterator(), false) + .map(IEObjectDescription::getEObjectOrProxy) + .filter(Method.class::isInstance) + .map(Method.class::cast) + .filter(Method::isExport) + .map(Environmental.class::cast) + .toList(); } - } - else if (feature instanceof Module) - { - return EcoreUtil.getURI(feature); - } - else if (feature instanceof CommonModule) - { - EObject module = (EObject)feature.eGet(MdClassPackage.Literals.COMMON_MODULE__MODULE, false); - if (module != null) + else { - return EcoreUtil.getURI(module); + Environmental environmental = EcoreUtil2.getContainerOfType(featureAccess, Environmental.class); + List entries = featureAccess instanceof StaticFeatureAccess + ? ((StaticFeatureAccess)featureAccess).getFeatureEntries() : dynamicFeatureAccessComputer + .getLastObject((DynamicFeatureAccess)featureAccess, environmental.environments()); + for (FeatureEntry entry : entries) + { + if (entry.getFeature() instanceof DerivedProperty derivedProperty + && derivedProperty.getSource() instanceof CommonModule) + { + List types = derivedProperty.getTypes(); + if (types != null && types.size() == 1 && types.get(0) instanceof Type) + { + return ((Type)types.get(0)).getContextDef() + .allMethods() + .stream() + .filter(Environmental.class::isInstance) + .filter(item -> methodName.equalsIgnoreCase(item.getName())) + .map(Environmental.class::cast) + .toList(); + } + } + else if (entry.getFeature() instanceof Property property + && THIS_OBJECT.equals(property.getName()) + && property.eContainer() instanceof ContextDef contextDef) + { + return contextDef.allMethods() + .stream() + .filter(Environmental.class::isInstance) + .filter(item -> methodName.equalsIgnoreCase(item.getName())) + .map(Environmental.class::cast) + .toList(); + } + } } } } - return null; + + return List.of(); } - private URI getCommonModuleUri(StaticFeatureAccess object) + private String getCalledProcedureName(Expression param) { - for (FeatureEntry entry : object.getFeatureEntries()) + if (param instanceof StringLiteral) { - EObject f = entry.getFeature(); - if (f instanceof DerivedProperty) + StringLiteral literal = (StringLiteral)param; + if (literal.getLines().size() == 1) { - EObject source = ((DerivedProperty)f).getSource(); - if (source instanceof CommonModule) - { - return EcoreUtil.getURI((EObject)source.eGet(MdClassPackage.Literals.COMMON_MODULE__MODULE, false)); - } + return literal.lines(true).get(0); } } return null; } - } diff --git a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/AbstractDocCommentTypeCheck.java b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/AbstractDocCommentTypeCheck.java index 7e672587e..748eafacc 100644 --- a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/AbstractDocCommentTypeCheck.java +++ b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/AbstractDocCommentTypeCheck.java @@ -33,6 +33,8 @@ import com._1c.g5.v8.dt.common.StringUtils; import com._1c.g5.v8.dt.core.platform.IBmModelManager; import com._1c.g5.v8.dt.core.platform.IResourceLookup; +import com._1c.g5.v8.dt.core.platform.IV8Project; +import com._1c.g5.v8.dt.core.platform.IV8ProjectManager; import com._1c.g5.v8.dt.mcore.Method; import com._1c.g5.v8.dt.mcore.Parameter; import com._1c.g5.v8.dt.mcore.Property; @@ -52,14 +54,15 @@ public abstract class AbstractDocCommentTypeCheck /** * Constructs an instance * - * @param resourceLookup - * @param namingService - * @param bmModelManager + * @param resourceLookup service for look up workspace resources, see {@link IResourceLookup}, cannot be null + * @param namingService service for getting names of EDT object and resources, cannot be null + * @param bmModelManager service for getting instance of Bm Model by {@link EObject}, cannot be null + * @param v8ProjectManager {@link IV8ProjectManager} for getting {@link IV8Project} by {@link EObject}, cannot be null */ protected AbstractDocCommentTypeCheck(IResourceLookup resourceLookup, INamingService namingService, - IBmModelManager bmModelManager) + IBmModelManager bmModelManager, IV8ProjectManager v8ProjectManager) { - super(resourceLookup, namingService, bmModelManager); + super(resourceLookup, namingService, bmModelManager, v8ProjectManager); } /** @@ -172,12 +175,12 @@ protected Optional getLinkPartLastObject(LinkPart linkPart, IScopeProvi || (linkPart.getPartsWithOffset().get(linkPart.getPartsWithOffset().size() - 1)).getFirst().isEmpty())) { return Optional.ofNullable(linkPart.getActualObjectForPart(linkPart.getPartsWithOffset().size() - 2, - scopeProvider, context, typeComputationContext)); + scopeProvider, context, v8ProjectManager, typeComputationContext)); } else { return Optional.ofNullable(linkPart.getActualObjectForPart(linkPart.getPartsWithOffset().size() - 1, - scopeProvider, context, typeComputationContext)); + scopeProvider, context, v8ProjectManager, typeComputationContext)); } } diff --git a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/CollectionTypeDefinitionCheck.java b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/CollectionTypeDefinitionCheck.java index c76d38e49..516de46f8 100644 --- a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/CollectionTypeDefinitionCheck.java +++ b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/CollectionTypeDefinitionCheck.java @@ -17,6 +17,7 @@ import java.util.TreeSet; import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.emf.ecore.EObject; import com._1c.g5.v8.dt.bsl.documentation.comment.BslDocumentationComment; import com._1c.g5.v8.dt.bsl.documentation.comment.IDescriptionPart; @@ -25,6 +26,8 @@ import com._1c.g5.v8.dt.common.StringUtils; import com._1c.g5.v8.dt.core.platform.IBmModelManager; import com._1c.g5.v8.dt.core.platform.IResourceLookup; +import com._1c.g5.v8.dt.core.platform.IV8Project; +import com._1c.g5.v8.dt.core.platform.IV8ProjectManager; import com._1c.g5.v8.dt.platform.IEObjectTypeNames; import com.e1c.g5.dt.core.api.naming.INamingService; import com.e1c.g5.dt.core.api.platform.BmOperationContext; @@ -65,15 +68,16 @@ public class CollectionTypeDefinitionCheck /** * Constructs an instance * - * @param resourceLookup - * @param namingService - * @param bmModelManager + * @param resourceLookup service for look up workspace resources, see {@link IResourceLookup}, cannot be null + * @param namingService service for getting names of EDT object and resources, cannot be null + * @param bmModelManager service for getting instance of Bm Model by {@link EObject}, cannot be null + * @param v8ProjectManager {@link IV8ProjectManager} for getting {@link IV8Project} by {@link EObject}, cannot be null */ @Inject public CollectionTypeDefinitionCheck(IResourceLookup resourceLookup, INamingService namingService, - IBmModelManager bmModelManager) + IBmModelManager bmModelManager, IV8ProjectManager v8ProjectManager) { - super(resourceLookup, namingService, bmModelManager); + super(resourceLookup, namingService, bmModelManager, v8ProjectManager); } @Override diff --git a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/DocCommentUseMinusCheck.java b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/DocCommentUseMinusCheck.java index 99ad3508d..e45cd6eed 100644 --- a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/DocCommentUseMinusCheck.java +++ b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/DocCommentUseMinusCheck.java @@ -17,6 +17,7 @@ import java.util.regex.Pattern; import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.emf.ecore.EObject; import com._1c.g5.v8.dt.bsl.documentation.comment.BslDocumentationComment; import com._1c.g5.v8.dt.bsl.documentation.comment.BslDocumentationComment.Description; @@ -24,6 +25,8 @@ import com._1c.g5.v8.dt.bsl.documentation.comment.TextPart; import com._1c.g5.v8.dt.core.platform.IBmModelManager; import com._1c.g5.v8.dt.core.platform.IResourceLookup; +import com._1c.g5.v8.dt.core.platform.IV8Project; +import com._1c.g5.v8.dt.core.platform.IV8ProjectManager; import com.e1c.g5.dt.core.api.naming.INamingService; import com.e1c.g5.dt.core.api.platform.BmOperationContext; import com.e1c.g5.v8.dt.bsl.check.DocumentationCommentBasicDelegateCheck; @@ -65,11 +68,19 @@ public class DocCommentUseMinusCheck private static final int SHOW_PREV_SYMBOLS = 7; + /** + * Constructs an instance + * + * @param resourceLookup service for look up workspace resources, see {@link IResourceLookup}, cannot be null + * @param namingService service for getting names of EDT object and resources, cannot be null + * @param bmModelManager service for getting instance of Bm Model by {@link EObject}, cannot be null + * @param v8ProjectManager {@link IV8ProjectManager} for getting {@link IV8Project} by {@link EObject}, cannot be null + */ @Inject public DocCommentUseMinusCheck(IResourceLookup resourceLookup, INamingService namingService, - IBmModelManager bmModelManager) + IBmModelManager bmModelManager, IV8ProjectManager v8ProjectManager) { - super(resourceLookup, namingService, bmModelManager); + super(resourceLookup, namingService, bmModelManager, v8ProjectManager); } @Override diff --git a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/ExportFunctionReturnSectionCheck.java b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/ExportFunctionReturnSectionCheck.java index bc474c4b4..f925ac13d 100644 --- a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/ExportFunctionReturnSectionCheck.java +++ b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/ExportFunctionReturnSectionCheck.java @@ -16,6 +16,7 @@ import org.eclipse.core.resources.IProject; import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.emf.ecore.EObject; import org.eclipse.xtext.scoping.IScopeProvider; import com._1c.g5.v8.dt.bsl.comment.DocumentationCommentProperties; @@ -28,6 +29,8 @@ import com._1c.g5.v8.dt.bsl.model.Function; import com._1c.g5.v8.dt.core.platform.IBmModelManager; import com._1c.g5.v8.dt.core.platform.IResourceLookup; +import com._1c.g5.v8.dt.core.platform.IV8Project; +import com._1c.g5.v8.dt.core.platform.IV8ProjectManager; import com.e1c.g5.dt.core.api.naming.INamingService; import com.e1c.g5.dt.core.api.platform.BmOperationContext; import com.e1c.g5.v8.dt.check.CheckComplexity; @@ -61,19 +64,20 @@ public class ExportFunctionReturnSectionCheck /** * Instantiates a new check of export function return section. * - * @param resourceLookup the resource lookup service, cannot be {@code null}. - * @param namingService - * @param bmModelManager + * @param resourceLookup service for look up workspace resources, see {@link IResourceLookup}, cannot be null + * @param namingService service for getting names of EDT object and resources, cannot be null + * @param bmModelManager service for getting instance of Bm Model by {@link EObject}, cannot be null + * @param v8ProjectManager {@link IV8ProjectManager} for getting {@link IV8Project} by {@link EObject}, cannot be null * @param bslPreferences the BSL preferences service, cannot be {@code null}. * @param commentProvider the comment provider service, cannot be {@code null}. * @param scopeProvider the scope provider service, cannot be {@code null}. */ @Inject public ExportFunctionReturnSectionCheck(IResourceLookup resourceLookup, INamingService namingService, - IBmModelManager bmModelManager, IBslPreferences bslPreferences, + IBmModelManager bmModelManager, IV8ProjectManager v8ProjectManager, IBslPreferences bslPreferences, BslMultiLineCommentDocumentationProvider commentProvider, IScopeProvider scopeProvider) { - super(resourceLookup, namingService, bmModelManager); + super(resourceLookup, namingService, bmModelManager, v8ProjectManager); this.resourceLookup = resourceLookup; this.bslPreferences = bslPreferences; this.commentProvider = commentProvider; @@ -117,7 +121,7 @@ protected void checkDocumentationCommentObject(IDescriptionPart object, BslDocum DocumentationCommentProperties props = bslPreferences.getDocumentCommentProperties(project); docComment = BslCommentUtils.getLinkPartCommentContent(linkPart, scopeProvider, commentProvider, - props.oldCommentFormat(), root.getMethod(), typeComputationContext); + props.oldCommentFormat(), root.getMethod(), v8ProjectManager, typeComputationContext); } if (docComment == null || docComment.getReturnSection() == null || isTypeEmptyAndNoLink( diff --git a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/ExportProcedureCommentDescriptionCheck.java b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/ExportProcedureCommentDescriptionCheck.java index 7b3be3bce..1e169f2da 100644 --- a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/ExportProcedureCommentDescriptionCheck.java +++ b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/ExportProcedureCommentDescriptionCheck.java @@ -26,6 +26,8 @@ import com._1c.g5.v8.dt.bsl.model.RegionPreprocessor; import com._1c.g5.v8.dt.core.platform.IBmModelManager; import com._1c.g5.v8.dt.core.platform.IResourceLookup; +import com._1c.g5.v8.dt.core.platform.IV8Project; +import com._1c.g5.v8.dt.core.platform.IV8ProjectManager; import com.e1c.g5.dt.core.api.naming.INamingService; import com.e1c.g5.dt.core.api.platform.BmOperationContext; import com.e1c.g5.v8.dt.check.CheckComplexity; @@ -47,11 +49,19 @@ public class ExportProcedureCommentDescriptionCheck { private static final String CHECK_ID = "doc-comment-export-procedure-description-section"; //$NON-NLS-1$ + /** + * Constructs an instance + * + * @param resourceLookup service for look up workspace resources, see {@link IResourceLookup}, cannot be null + * @param namingService service for getting names of EDT object and resources, cannot be null + * @param bmModelManager service for getting instance of Bm Model by {@link EObject}, cannot be null + * @param v8ProjectManager {@link IV8ProjectManager} for getting {@link IV8Project} by {@link EObject}, cannot be null + */ @Inject public ExportProcedureCommentDescriptionCheck(IResourceLookup resourceLookup, INamingService namingService, - IBmModelManager bmModelManager) + IBmModelManager bmModelManager, IV8ProjectManager v8ProjectManager) { - super(resourceLookup, namingService, bmModelManager); + super(resourceLookup, namingService, bmModelManager, v8ProjectManager); } @Override diff --git a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/FieldDefinitionNameCheck.java b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/FieldDefinitionNameCheck.java index 9551a295d..9423f4c9e 100644 --- a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/FieldDefinitionNameCheck.java +++ b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/FieldDefinitionNameCheck.java @@ -16,6 +16,7 @@ import java.util.List; import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.emf.ecore.EObject; import com._1c.g5.v8.dt.bsl.documentation.comment.BslDocumentationComment; import com._1c.g5.v8.dt.bsl.documentation.comment.IDescriptionPart; @@ -24,6 +25,8 @@ import com._1c.g5.v8.dt.common.StringUtils; import com._1c.g5.v8.dt.core.platform.IBmModelManager; import com._1c.g5.v8.dt.core.platform.IResourceLookup; +import com._1c.g5.v8.dt.core.platform.IV8Project; +import com._1c.g5.v8.dt.core.platform.IV8ProjectManager; import com.e1c.g5.dt.core.api.naming.INamingService; import com.e1c.g5.dt.core.api.platform.BmOperationContext; import com.e1c.g5.v8.dt.bsl.check.DocumentationCommentBasicDelegateCheck; @@ -47,11 +50,19 @@ public class FieldDefinitionNameCheck { private static final String CHECK_ID = "doc-comment-field-name"; //$NON-NLS-1$ + /** + * Constructs an instance + * + * @param resourceLookup service for look up workspace resources, see {@link IResourceLookup}, cannot be null + * @param namingService service for getting names of EDT object and resources, cannot be null + * @param bmModelManager service for getting instance of Bm Model by {@link EObject}, cannot be null + * @param v8ProjectManager {@link IV8ProjectManager} for getting {@link IV8Project} by {@link EObject}, cannot be null + */ @Inject public FieldDefinitionNameCheck(IResourceLookup resourceLookup, INamingService namingService, - IBmModelManager bmModelManager) + IBmModelManager bmModelManager, IV8ProjectManager v8ProjectManager) { - super(resourceLookup, namingService, bmModelManager); + super(resourceLookup, namingService, bmModelManager, v8ProjectManager); } @Override diff --git a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/FieldDefinitionTypeCheck.java b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/FieldDefinitionTypeCheck.java index 3b6af2495..0366c87b7 100644 --- a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/FieldDefinitionTypeCheck.java +++ b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/FieldDefinitionTypeCheck.java @@ -15,12 +15,15 @@ import java.text.MessageFormat; import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.emf.ecore.EObject; import com._1c.g5.v8.dt.bsl.documentation.comment.BslDocumentationComment; import com._1c.g5.v8.dt.bsl.documentation.comment.IDescriptionPart; import com._1c.g5.v8.dt.bsl.documentation.comment.TypeSection.FieldDefinition; import com._1c.g5.v8.dt.core.platform.IBmModelManager; import com._1c.g5.v8.dt.core.platform.IResourceLookup; +import com._1c.g5.v8.dt.core.platform.IV8Project; +import com._1c.g5.v8.dt.core.platform.IV8ProjectManager; import com.e1c.g5.dt.core.api.naming.INamingService; import com.e1c.g5.dt.core.api.platform.BmOperationContext; import com.e1c.g5.v8.dt.check.CheckComplexity; @@ -41,11 +44,19 @@ public class FieldDefinitionTypeCheck { private static final String CHECK_ID = "doc-comment-field-type"; //$NON-NLS-1$ + /** + * Constructs an instance + * + * @param resourceLookup service for look up workspace resources, see {@link IResourceLookup}, cannot be null + * @param namingService service for getting names of EDT object and resources, cannot be null + * @param bmModelManager service for getting instance of Bm Model by {@link EObject}, cannot be null + * @param v8ProjectManager {@link IV8ProjectManager} for getting {@link IV8Project} by {@link EObject}, cannot be null + */ @Inject public FieldDefinitionTypeCheck(IResourceLookup resourceLookup, INamingService namingService, - IBmModelManager bmModelManager) + IBmModelManager bmModelManager, IV8ProjectManager v8ProjectManager) { - super(resourceLookup, namingService, bmModelManager); + super(resourceLookup, namingService, bmModelManager, v8ProjectManager); } @Override diff --git a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/FieldDefinitionTypeWithLinkRefCheck.java b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/FieldDefinitionTypeWithLinkRefCheck.java index 78c436f7d..28c9b53ca 100644 --- a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/FieldDefinitionTypeWithLinkRefCheck.java +++ b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/FieldDefinitionTypeWithLinkRefCheck.java @@ -30,6 +30,8 @@ import com._1c.g5.v8.dt.common.StringUtils; import com._1c.g5.v8.dt.core.platform.IBmModelManager; import com._1c.g5.v8.dt.core.platform.IResourceLookup; +import com._1c.g5.v8.dt.core.platform.IV8Project; +import com._1c.g5.v8.dt.core.platform.IV8ProjectManager; import com._1c.g5.v8.dt.platform.IEObjectTypeNames; import com.e1c.g5.dt.core.api.naming.INamingService; import com.e1c.g5.dt.core.api.platform.BmOperationContext; @@ -81,13 +83,17 @@ public class FieldDefinitionTypeWithLinkRefCheck /** * Instantiates a new field definition type with link reference to constructor function check. * + * @param resourceLookup service for look up workspace resources, see {@link IResourceLookup}, cannot be null + * @param namingService service for getting names of EDT object and resources, cannot be null + * @param bmModelManager service for getting instance of Bm Model by {@link EObject}, cannot be null + * @param v8ProjectManager {@link IV8ProjectManager} for getting {@link IV8Project} by {@link EObject}, cannot be null * @param scopeProvider the scope provider service, cannot be {@code null}. */ @Inject public FieldDefinitionTypeWithLinkRefCheck(IResourceLookup resourceLookup, INamingService namingService, - IBmModelManager bmModelManager, IScopeProvider scopeProvider) + IBmModelManager bmModelManager, IV8ProjectManager v8ProjectManager, IScopeProvider scopeProvider) { - super(resourceLookup, namingService, bmModelManager); + super(resourceLookup, namingService, bmModelManager, v8ProjectManager); this.scopeProvider = scopeProvider; } diff --git a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/FunctionReturnSectionCheck.java b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/FunctionReturnSectionCheck.java index 166a9a6b9..5c16fbdef 100644 --- a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/FunctionReturnSectionCheck.java +++ b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/FunctionReturnSectionCheck.java @@ -18,6 +18,7 @@ import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.emf.ecore.EObject; import org.eclipse.xtext.naming.IQualifiedNameConverter; +import org.eclipse.xtext.naming.QualifiedName; import org.eclipse.xtext.scoping.IScope; import org.eclipse.xtext.scoping.IScopeProvider; @@ -30,6 +31,8 @@ import com._1c.g5.v8.dt.bsl.model.Method; import com._1c.g5.v8.dt.core.platform.IBmModelManager; import com._1c.g5.v8.dt.core.platform.IResourceLookup; +import com._1c.g5.v8.dt.core.platform.IV8Project; +import com._1c.g5.v8.dt.core.platform.IV8ProjectManager; import com._1c.g5.v8.dt.mcore.McorePackage; import com._1c.g5.v8.dt.mcore.TypeItem; import com.e1c.g5.dt.core.api.naming.INamingService; @@ -64,12 +67,25 @@ public class FunctionReturnSectionCheck private final IQualifiedNameConverter qualifiedNameConverter; + /** + * Constructs an instance + * + * @param resourceLookup service for look up workspace resources, see {@link IResourceLookup}, cannot be null + * @param namingService service for getting names of EDT object and resources, cannot be null + * @param bmModelManager service for getting instance of Bm Model by {@link EObject}, cannot be null + * @param v8ProjectManager {@link IV8ProjectManager} for getting {@link IV8Project} by {@link EObject}, cannot be null + * @param bslPreferences service for getting preferences for Built-In language, cannot be null + * @param qualifiedNameConverter service for getting {@link QualifiedName} by {@link EObject}, cannot be null + * @param scopeProvider service for getting {@link IScope} for Built-In language, cannot be null + * @param commentProvider service for getting comments content in Built-In language, cannot be null + */ @Inject public FunctionReturnSectionCheck(IResourceLookup resourceLookup, INamingService namingService, - IBmModelManager bmModelManager, IBslPreferences bslPreferences, IQualifiedNameConverter qualifiedNameConverter, - IScopeProvider scopeProvider, BslMultiLineCommentDocumentationProvider commentProvider) + IBmModelManager bmModelManager, IV8ProjectManager v8ProjectManager, IBslPreferences bslPreferences, + IQualifiedNameConverter qualifiedNameConverter, IScopeProvider scopeProvider, + BslMultiLineCommentDocumentationProvider commentProvider) { - super(resourceLookup, namingService, bmModelManager); + super(resourceLookup, namingService, bmModelManager, v8ProjectManager); this.resourceLookup = resourceLookup; this.bslPreferences = bslPreferences; this.qualifiedNameConverter = qualifiedNameConverter; @@ -119,7 +135,7 @@ protected void checkDocumentationCommentObject(IDescriptionPart object, BslDocum IScope typeScope = scopeProvider.getScope(method, McorePackage.Literals.TYPE_DESCRIPTION__TYPES); Collection computedReturnTypes = - root.computeReturnTypes(typeScope, scopeProvider, qualifiedNameConverter, commentProvider, + root.computeReturnTypes(typeScope, scopeProvider, qualifiedNameConverter, commentProvider, v8ProjectManager, oldCommentFormat(root.getModule()), method, typeComputationContext); if (computedReturnTypes.isEmpty()) diff --git a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/MultilineDescriptionEndsOnDotCheck.java b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/MultilineDescriptionEndsOnDotCheck.java index 516e3035c..7473a46fd 100644 --- a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/MultilineDescriptionEndsOnDotCheck.java +++ b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/MultilineDescriptionEndsOnDotCheck.java @@ -13,6 +13,7 @@ package com.e1c.v8codestyle.bsl.comment.check; import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.emf.ecore.EObject; import com._1c.g5.v8.dt.bsl.documentation.comment.BslDocumentationComment; import com._1c.g5.v8.dt.bsl.documentation.comment.BslDocumentationComment.Description; @@ -20,6 +21,8 @@ import com._1c.g5.v8.dt.bsl.documentation.comment.TextPart; import com._1c.g5.v8.dt.core.platform.IBmModelManager; import com._1c.g5.v8.dt.core.platform.IResourceLookup; +import com._1c.g5.v8.dt.core.platform.IV8Project; +import com._1c.g5.v8.dt.core.platform.IV8ProjectManager; import com.e1c.g5.dt.core.api.naming.INamingService; import com.e1c.g5.dt.core.api.platform.BmOperationContext; import com.e1c.g5.v8.dt.bsl.check.DocumentationCommentBasicDelegateCheck; @@ -40,11 +43,19 @@ public class MultilineDescriptionEndsOnDotCheck private static final String CHECK_ID = "doc-comment-description-ends-on-dot"; //$NON-NLS-1$ + /** + * Constructs an instance + * + * @param resourceLookup service for look up workspace resources, see {@link IResourceLookup}, cannot be null + * @param namingService service for getting names of EDT object and resources, cannot be null + * @param bmModelManager service for getting instance of Bm Model by {@link EObject}, cannot be null + * @param v8ProjectManager {@link IV8ProjectManager} for getting {@link IV8Project} by {@link EObject}, cannot be null + */ @Inject public MultilineDescriptionEndsOnDotCheck(IResourceLookup resourceLookup, INamingService namingService, - IBmModelManager bmModelManager) + IBmModelManager bmModelManager, IV8ProjectManager v8ProjectManager) { - super(resourceLookup, namingService, bmModelManager); + super(resourceLookup, namingService, bmModelManager, v8ProjectManager); } @Override diff --git a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/MultilineDescriptionFieldSuggestionCheck.java b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/MultilineDescriptionFieldSuggestionCheck.java index fbde22e0c..126791ed6 100644 --- a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/MultilineDescriptionFieldSuggestionCheck.java +++ b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/MultilineDescriptionFieldSuggestionCheck.java @@ -16,6 +16,7 @@ import java.util.regex.Pattern; import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.emf.ecore.EObject; import com._1c.g5.v8.dt.bsl.documentation.comment.BslDocumentationComment; import com._1c.g5.v8.dt.bsl.documentation.comment.BslDocumentationComment.Description; @@ -24,6 +25,8 @@ import com._1c.g5.v8.dt.bsl.model.Procedure; import com._1c.g5.v8.dt.core.platform.IBmModelManager; import com._1c.g5.v8.dt.core.platform.IResourceLookup; +import com._1c.g5.v8.dt.core.platform.IV8Project; +import com._1c.g5.v8.dt.core.platform.IV8ProjectManager; import com.e1c.g5.dt.core.api.naming.INamingService; import com.e1c.g5.dt.core.api.platform.BmOperationContext; import com.e1c.g5.v8.dt.bsl.check.DocumentationCommentBasicDelegateCheck; @@ -57,11 +60,19 @@ public class MultilineDescriptionFieldSuggestionCheck private static final Pattern PATTERN_FIELD = Pattern.compile("^\\s*\\*+\\s*\\w+\\s*-", Pattern.UNICODE_CHARACTER_CLASS | Pattern.CASE_INSENSITIVE); //$NON-NLS-1$ + /** + * Constructs an instance + * + * @param resourceLookup service for look up workspace resources, see {@link IResourceLookup}, cannot be null + * @param namingService service for getting names of EDT object and resources, cannot be null + * @param bmModelManager service for getting instance of Bm Model by {@link EObject}, cannot be null + * @param v8ProjectManager {@link IV8ProjectManager} for getting {@link IV8Project} by {@link EObject}, cannot be null + */ @Inject public MultilineDescriptionFieldSuggestionCheck(IResourceLookup resourceLookup, INamingService namingService, - IBmModelManager bmModelManager) + IBmModelManager bmModelManager, IV8ProjectManager v8ProjectManager) { - super(resourceLookup, namingService, bmModelManager); + super(resourceLookup, namingService, bmModelManager, v8ProjectManager); } @Override diff --git a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/MultilineDescriptionParameterSuggestionCheck.java b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/MultilineDescriptionParameterSuggestionCheck.java index 03da8ffff..074004879 100644 --- a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/MultilineDescriptionParameterSuggestionCheck.java +++ b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/MultilineDescriptionParameterSuggestionCheck.java @@ -18,6 +18,7 @@ import java.util.stream.Collectors; import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.emf.ecore.EObject; import com._1c.g5.v8.dt.bsl.documentation.comment.BslDocumentationComment; import com._1c.g5.v8.dt.bsl.documentation.comment.BslDocumentationComment.Description; @@ -27,6 +28,8 @@ import com._1c.g5.v8.dt.common.StringUtils; import com._1c.g5.v8.dt.core.platform.IBmModelManager; import com._1c.g5.v8.dt.core.platform.IResourceLookup; +import com._1c.g5.v8.dt.core.platform.IV8Project; +import com._1c.g5.v8.dt.core.platform.IV8ProjectManager; import com.e1c.g5.dt.core.api.naming.INamingService; import com.e1c.g5.dt.core.api.platform.BmOperationContext; import com.e1c.g5.v8.dt.bsl.check.DocumentationCommentBasicDelegateCheck; @@ -54,11 +57,19 @@ public class MultilineDescriptionParameterSuggestionCheck private static final String CHECK_ID = "doc-comment-parameter-in-description-suggestion"; //$NON-NLS-1$ + /** + * Constructs an instance + * + * @param resourceLookup service for look up workspace resources, see {@link IResourceLookup}, cannot be null + * @param namingService service for getting names of EDT object and resources, cannot be null + * @param bmModelManager service for getting instance of Bm Model by {@link EObject}, cannot be null + * @param v8ProjectManager {@link IV8ProjectManager} for getting {@link IV8Project} by {@link EObject}, cannot be null + */ @Inject public MultilineDescriptionParameterSuggestionCheck(IResourceLookup resourceLookup, INamingService namingService, - IBmModelManager bmModelManager) + IBmModelManager bmModelManager, IV8ProjectManager v8ProjectManager) { - super(resourceLookup, namingService, bmModelManager); + super(resourceLookup, namingService, bmModelManager, v8ProjectManager); } @Override diff --git a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/ParametersSectionCheck.java b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/ParametersSectionCheck.java index 1d04a050d..88ad6dff3 100644 --- a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/ParametersSectionCheck.java +++ b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/ParametersSectionCheck.java @@ -20,6 +20,9 @@ import org.eclipse.core.resources.IProject; import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.xtext.naming.QualifiedName; +import org.eclipse.xtext.scoping.IScope; import org.eclipse.xtext.scoping.IScopeProvider; import com._1c.g5.v8.dt.bsl.comment.DocumentationCommentProperties; @@ -36,6 +39,8 @@ import com._1c.g5.v8.dt.common.StringUtils; import com._1c.g5.v8.dt.core.platform.IBmModelManager; import com._1c.g5.v8.dt.core.platform.IResourceLookup; +import com._1c.g5.v8.dt.core.platform.IV8Project; +import com._1c.g5.v8.dt.core.platform.IV8ProjectManager; import com.e1c.g5.dt.core.api.naming.INamingService; import com.e1c.g5.dt.core.api.platform.BmOperationContext; import com.e1c.g5.v8.dt.check.CheckComplexity; @@ -63,21 +68,30 @@ public class ParametersSectionCheck private static final String PARAMETER_PARMA_SECT_FOR_EXPORT = "requireParameterSectionOnlyForExport"; //$NON-NLS-1$ - private final IResourceLookup resourceLookup; - private final IBslPreferences bslPreferences; private final IScopeProvider scopeProvider; private final BslMultiLineCommentDocumentationProvider commentProvider; + /** + * Constructs an instance + * + * @param resourceLookup service for look up workspace resources, see {@link IResourceLookup}, cannot be null + * @param namingService service for getting names of EDT object and resources, cannot be null + * @param bmModelManager service for getting instance of Bm Model by {@link EObject}, cannot be null + * @param v8ProjectManager {@link IV8ProjectManager} for getting {@link IV8Project} by {@link EObject}, cannot be null + * @param bslPreferences service for getting preferences for Built-In language, cannot be null + * @param qualifiedNameConverter service for getting {@link QualifiedName} by {@link EObject}, cannot be null + * @param scopeProvider service for getting {@link IScope} for Built-In language, cannot be null + * @param commentProvider service for getting comments content in Built-In language, cannot be null + */ @Inject public ParametersSectionCheck(IResourceLookup resourceLookup, INamingService namingService, - IBmModelManager bmModelManager, IBslPreferences bslPreferences, IScopeProvider scopeProvider, - BslMultiLineCommentDocumentationProvider commentProvider) + IBmModelManager bmModelManager, IV8ProjectManager v8ProjectManager, IBslPreferences bslPreferences, + IScopeProvider scopeProvider, BslMultiLineCommentDocumentationProvider commentProvider) { - super(resourceLookup, namingService, bmModelManager); - this.resourceLookup = resourceLookup; + super(resourceLookup, namingService, bmModelManager, v8ProjectManager); this.bslPreferences = bslPreferences; this.scopeProvider = scopeProvider; this.commentProvider = commentProvider; @@ -159,7 +173,7 @@ private void check(BslDocumentationComment object, DocumentationCommentResultAcc DocumentationCommentProperties props = bslPreferences.getDocumentCommentProperties(project); docComment = BslCommentUtils.getLinkPartCommentContent(linkPart, scopeProvider, commentProvider, - props.oldCommentFormat(), object.getMethod(), typeComputationContext); + props.oldCommentFormat(), object.getMethod(), v8ProjectManager, typeComputationContext); } if (docComment == null) { diff --git a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/ProcedureReturnSectionCheck.java b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/ProcedureReturnSectionCheck.java index 1d8636838..206d197de 100644 --- a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/ProcedureReturnSectionCheck.java +++ b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/ProcedureReturnSectionCheck.java @@ -13,6 +13,7 @@ package com.e1c.v8codestyle.bsl.comment.check; import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.emf.ecore.EObject; import com._1c.g5.v8.dt.bsl.documentation.comment.BslDocumentationComment; import com._1c.g5.v8.dt.bsl.documentation.comment.BslDocumentationComment.ReturnSection; @@ -20,6 +21,8 @@ import com._1c.g5.v8.dt.bsl.model.Procedure; import com._1c.g5.v8.dt.core.platform.IBmModelManager; import com._1c.g5.v8.dt.core.platform.IResourceLookup; +import com._1c.g5.v8.dt.core.platform.IV8Project; +import com._1c.g5.v8.dt.core.platform.IV8ProjectManager; import com.e1c.g5.dt.core.api.naming.INamingService; import com.e1c.g5.dt.core.api.platform.BmOperationContext; import com.e1c.g5.v8.dt.bsl.check.DocumentationCommentBasicDelegateCheck; @@ -43,11 +46,19 @@ public class ProcedureReturnSectionCheck private static final String CHECK_ID = "doc-comment-procedure-return-section"; //$NON-NLS-1$ + /** + * Constructs an instance + * + * @param resourceLookup service for look up workspace resources, see {@link IResourceLookup}, cannot be null + * @param namingService service for getting names of EDT object and resources, cannot be null + * @param bmModelManager service for getting instance of Bm Model by {@link EObject}, cannot be null + * @param v8ProjectManager {@link IV8ProjectManager} for getting {@link IV8Project} by {@link EObject}, cannot be null + */ @Inject public ProcedureReturnSectionCheck(IResourceLookup resourceLookup, INamingService namingService, - IBmModelManager bmModelManager) + IBmModelManager bmModelManager, IV8ProjectManager v8ProjectManager) { - super(resourceLookup, namingService, bmModelManager); + super(resourceLookup, namingService, bmModelManager, v8ProjectManager); } @Override diff --git a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/RedundantParametersSectionCheck.java b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/RedundantParametersSectionCheck.java index 7b046fb44..93128e378 100644 --- a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/RedundantParametersSectionCheck.java +++ b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/RedundantParametersSectionCheck.java @@ -13,12 +13,15 @@ package com.e1c.v8codestyle.bsl.comment.check; import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.emf.ecore.EObject; import com._1c.g5.v8.dt.bsl.documentation.comment.BslDocumentationComment; import com._1c.g5.v8.dt.bsl.documentation.comment.BslDocumentationComment.ParametersSection; import com._1c.g5.v8.dt.bsl.documentation.comment.IDescriptionPart; import com._1c.g5.v8.dt.core.platform.IBmModelManager; import com._1c.g5.v8.dt.core.platform.IResourceLookup; +import com._1c.g5.v8.dt.core.platform.IV8Project; +import com._1c.g5.v8.dt.core.platform.IV8ProjectManager; import com.e1c.g5.dt.core.api.naming.INamingService; import com.e1c.g5.dt.core.api.platform.BmOperationContext; import com.e1c.g5.v8.dt.bsl.check.DocumentationCommentBasicDelegateCheck; @@ -41,11 +44,19 @@ public class RedundantParametersSectionCheck { private static final String CHECK_ID = "doc-comment-redundant-parameter-section"; //$NON-NLS-1$ + /** + * Constructs an instance + * + * @param resourceLookup service for look up workspace resources, see {@link IResourceLookup}, cannot be null + * @param namingService service for getting names of EDT object and resources, cannot be null + * @param bmModelManager service for getting instance of Bm Model by {@link EObject}, cannot be null + * @param v8ProjectManager {@link IV8ProjectManager} for getting {@link IV8Project} by {@link EObject}, cannot be null + */ @Inject public RedundantParametersSectionCheck(IResourceLookup resourceLookup, INamingService namingService, - IBmModelManager bmModelManager) + IBmModelManager bmModelManager, IV8ProjectManager v8ProjectManager) { - super(resourceLookup, namingService, bmModelManager); + super(resourceLookup, namingService, bmModelManager, v8ProjectManager); } @Override diff --git a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/RefLinkPartCheck.java b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/RefLinkPartCheck.java index deee01c0c..20d446032 100644 --- a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/RefLinkPartCheck.java +++ b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/RefLinkPartCheck.java @@ -13,6 +13,7 @@ package com.e1c.v8codestyle.bsl.comment.check; import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.emf.ecore.EObject; import org.eclipse.xtext.scoping.IScopeProvider; import com._1c.g5.v8.dt.bsl.documentation.comment.BslDocumentationComment; @@ -22,6 +23,8 @@ import com._1c.g5.v8.dt.common.StringUtils; import com._1c.g5.v8.dt.core.platform.IBmModelManager; import com._1c.g5.v8.dt.core.platform.IResourceLookup; +import com._1c.g5.v8.dt.core.platform.IV8Project; +import com._1c.g5.v8.dt.core.platform.IV8ProjectManager; import com.e1c.g5.dt.core.api.naming.INamingService; import com.e1c.g5.dt.core.api.platform.BmOperationContext; import com.e1c.g5.v8.dt.check.CheckComplexity; @@ -61,13 +64,17 @@ public class RefLinkPartCheck /** * Instantiates a new reference link part check. * + * @param resourceLookup service for look up workspace resources, see {@link IResourceLookup}, cannot be null + * @param namingService service for getting names of EDT object and resources, cannot be null + * @param bmModelManager service for getting instance of Bm Model by {@link EObject}, cannot be null + * @param v8ProjectManager {@link IV8ProjectManager} for getting {@link IV8Project} by {@link EObject}, cannot be null * @param scopeProvider the scope provider service, cannot be {@code null}. */ @Inject public RefLinkPartCheck(IResourceLookup resourceLookup, INamingService namingService, - IBmModelManager bmModelManager, IScopeProvider scopeProvider) + IBmModelManager bmModelManager, IV8ProjectManager v8ProjectManager, IScopeProvider scopeProvider) { - super(resourceLookup, namingService, bmModelManager); + super(resourceLookup, namingService, bmModelManager, v8ProjectManager); this.scopeProvider = scopeProvider; } diff --git a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/TypeDefinitionCheck.java b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/TypeDefinitionCheck.java index cba6cca8f..9c1ec8676 100644 --- a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/TypeDefinitionCheck.java +++ b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/TypeDefinitionCheck.java @@ -15,7 +15,9 @@ import java.text.MessageFormat; import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.emf.ecore.EObject; import org.eclipse.xtext.naming.IQualifiedNameConverter; +import org.eclipse.xtext.naming.QualifiedName; import org.eclipse.xtext.resource.IEObjectDescription; import org.eclipse.xtext.scoping.IScope; import org.eclipse.xtext.scoping.IScopeProvider; @@ -27,6 +29,8 @@ import com._1c.g5.v8.dt.common.StringUtils; import com._1c.g5.v8.dt.core.platform.IBmModelManager; import com._1c.g5.v8.dt.core.platform.IResourceLookup; +import com._1c.g5.v8.dt.core.platform.IV8Project; +import com._1c.g5.v8.dt.core.platform.IV8ProjectManager; import com._1c.g5.v8.dt.mcore.McorePackage; import com.e1c.g5.dt.core.api.naming.INamingService; import com.e1c.g5.dt.core.api.platform.BmOperationContext; @@ -53,11 +57,22 @@ public class TypeDefinitionCheck private final IQualifiedNameConverter qualifiedNameConverter; + /** + * Constructs an instance + * + * @param resourceLookup service for look up workspace resources, see {@link IResourceLookup}, cannot be null + * @param namingService service for getting names of EDT object and resources, cannot be null + * @param bmModelManager service for getting instance of Bm Model by {@link EObject}, cannot be null + * @param v8ProjectManager {@link IV8ProjectManager} for getting {@link IV8Project} by {@link EObject}, cannot be null + * @param qualifiedNameConverter service for getting {@link QualifiedName} by {@link EObject}, cannot be null + * @param scopeProvider service for getting {@link IScope} for Built-In language, cannot be null + */ @Inject public TypeDefinitionCheck(IResourceLookup resourceLookup, INamingService namingService, - IBmModelManager bmModelManager, IQualifiedNameConverter qualifiedNameConverter, IScopeProvider scopeProvider) + IBmModelManager bmModelManager, IV8ProjectManager v8ProjectManager, + IQualifiedNameConverter qualifiedNameConverter, IScopeProvider scopeProvider) { - super(resourceLookup, namingService, bmModelManager); + super(resourceLookup, namingService, bmModelManager, v8ProjectManager); this.qualifiedNameConverter = qualifiedNameConverter; this.scopeProvider = scopeProvider; } diff --git a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/strict/check/AbstractDynamicFeatureAccessTypeCheck.java b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/strict/check/AbstractDynamicFeatureAccessTypeCheck.java index 2f044439d..53232bb75 100644 --- a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/strict/check/AbstractDynamicFeatureAccessTypeCheck.java +++ b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/strict/check/AbstractDynamicFeatureAccessTypeCheck.java @@ -20,6 +20,7 @@ import java.util.TreeSet; import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.emf.ecore.EObject; import org.eclipse.xtext.EcoreUtil2; import org.eclipse.xtext.naming.IQualifiedNameConverter; @@ -32,6 +33,8 @@ import com._1c.g5.v8.dt.common.StringUtils; import com._1c.g5.v8.dt.core.platform.IBmModelManager; import com._1c.g5.v8.dt.core.platform.IResourceLookup; +import com._1c.g5.v8.dt.core.platform.IV8Project; +import com._1c.g5.v8.dt.core.platform.IV8ProjectManager; import com._1c.g5.v8.dt.mcore.Environmental; import com._1c.g5.v8.dt.mcore.TypeItem; import com._1c.g5.v8.dt.mcore.util.Environments; @@ -66,11 +69,15 @@ public abstract class AbstractDynamicFeatureAccessTypeCheck * @param resourceLookup the resource lookup service, cannot be {@code null}. * @param bslPreferences the BSL preferences service, cannot be {@code null}. * @param qualifiedNameConverter the qualified name converter service, cannot be {@code null}. + * @param namingService service for getting names of EDT object and resources, cannot be null + * @param bmModelManager service for getting instance of Bm Model by {@link EObject}, cannot be null + * @param v8ProjectManager {@link IV8ProjectManager} for getting {@link IV8Project} by {@link EObject}, cannot be null */ protected AbstractDynamicFeatureAccessTypeCheck(IResourceLookup resourceLookup, IBslPreferences bslPreferences, - IQualifiedNameConverter qualifiedNameConverter, INamingService namingService, IBmModelManager bmModelManager) + IQualifiedNameConverter qualifiedNameConverter, INamingService namingService, IBmModelManager bmModelManager, + IV8ProjectManager v8ProjectManager) { - super(resourceLookup, bslPreferences, qualifiedNameConverter, namingService, bmModelManager); + super(resourceLookup, bslPreferences, qualifiedNameConverter, namingService, bmModelManager, v8ProjectManager); } @Override diff --git a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/strict/check/AbstractTypeCheck.java b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/strict/check/AbstractTypeCheck.java index 4ea7f905c..17b7b04a6 100644 --- a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/strict/check/AbstractTypeCheck.java +++ b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/strict/check/AbstractTypeCheck.java @@ -55,6 +55,8 @@ import com._1c.g5.v8.dt.core.platform.IBmModelManager; import com._1c.g5.v8.dt.core.platform.IDtProject; import com._1c.g5.v8.dt.core.platform.IResourceLookup; +import com._1c.g5.v8.dt.core.platform.IV8Project; +import com._1c.g5.v8.dt.core.platform.IV8ProjectManager; import com._1c.g5.v8.dt.mcore.Environmental; import com._1c.g5.v8.dt.mcore.McorePackage; import com._1c.g5.v8.dt.mcore.Type; @@ -109,6 +111,11 @@ public abstract class AbstractTypeCheck /** The comment provider service. */ protected final BslMultiLineCommentDocumentationProvider commentProvider; + /** + * {@link IV8ProjectManager} for getting {@link IV8Project} by {@link EObject} + */ + protected final IV8ProjectManager v8ProjectManager; + private final InternalTypeNameRegistry internalTypeNameRegistry; /** @@ -117,15 +124,20 @@ public abstract class AbstractTypeCheck * @param resourceLookup the resource lookup service, cannot be {@code null}. * @param bslPreferences the BSL preferences service, cannot be {@code null}. * @param qualifiedNameConverter the qualified name converter service, cannot be {@code null}. + * @param namingService service for getting names of EDT object and resources, cannot be null + * @param bmModelManager service for getting instance of Bm Model by {@link EObject}, cannot be null + * @param v8ProjectManager {@link IV8ProjectManager} for getting {@link IV8Project} by {@link EObject}, cannot be null */ protected AbstractTypeCheck(IResourceLookup resourceLookup, IBslPreferences bslPreferences, - IQualifiedNameConverter qualifiedNameConverter, INamingService namingService, IBmModelManager bmModelManager) + IQualifiedNameConverter qualifiedNameConverter, INamingService namingService, IBmModelManager bmModelManager, + IV8ProjectManager v8ProjectManager) { super(); this.resourceLookup = resourceLookup; this.namingService = namingService; this.bmModelManager = bmModelManager; this.bslPreferences = bslPreferences; + this.v8ProjectManager = v8ProjectManager; IResourceServiceProvider rsp = IResourceServiceProvider.Registry.INSTANCE.getResourceServiceProvider(URI.createURI("*.bsl")); //$NON-NLS-1$ this.typeComputer = rsp.get(TypesComputer.class); @@ -250,7 +262,7 @@ protected Collection computeCommentTypes(EObject object, IBmTransactio IProject project = resourceLookup.getProject(object); boolean oldFormatComment = bslPreferences.getDocumentCommentProperties(project).oldCommentFormat(); return TypeSystemUtil.computeCommentTypes(object, typeScope, scopeProvider, qualifiedNameConverter, - commentProvider, oldFormatComment, + commentProvider, v8ProjectManager, oldFormatComment, new BmOperationContext(namingService, bmModelManager, bmTransaction)); } diff --git a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/strict/check/DocCommentFieldTypeCheck.java b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/strict/check/DocCommentFieldTypeCheck.java index bb39af082..edfc0935c 100644 --- a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/strict/check/DocCommentFieldTypeCheck.java +++ b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/strict/check/DocCommentFieldTypeCheck.java @@ -17,12 +17,15 @@ import java.text.MessageFormat; import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.emf.ecore.EObject; import com._1c.g5.v8.dt.bsl.documentation.comment.BslDocumentationComment; import com._1c.g5.v8.dt.bsl.documentation.comment.IDescriptionPart; import com._1c.g5.v8.dt.bsl.documentation.comment.TypeSection.FieldDefinition; import com._1c.g5.v8.dt.core.platform.IBmModelManager; import com._1c.g5.v8.dt.core.platform.IResourceLookup; +import com._1c.g5.v8.dt.core.platform.IV8Project; +import com._1c.g5.v8.dt.core.platform.IV8ProjectManager; import com.e1c.g5.dt.core.api.naming.INamingService; import com.e1c.g5.dt.core.api.platform.BmOperationContext; import com.e1c.g5.v8.dt.check.CheckComplexity; @@ -46,15 +49,18 @@ public class DocCommentFieldTypeCheck private static final String CHECK_ID = "doc-comment-field-type-strict"; //$NON-NLS-1$ /** - * @param resourceLookup - * @param namingService - * @param bmModelManager + * Constructs an instance + * + * @param resourceLookup service for look up workspace resources, see {@link IResourceLookup}, cannot be null + * @param namingService service for getting names of EDT object and resources, cannot be null + * @param bmModelManager service for getting instance of Bm Model by {@link EObject}, cannot be null + * @param v8ProjectManager {@link IV8ProjectManager} for getting {@link IV8Project} by {@link EObject}, cannot be null */ @Inject public DocCommentFieldTypeCheck(IResourceLookup resourceLookup, INamingService namingService, - IBmModelManager bmModelManager) + IBmModelManager bmModelManager, IV8ProjectManager v8ProjectManager) { - super(resourceLookup, namingService, bmModelManager); + super(resourceLookup, namingService, bmModelManager, v8ProjectManager); } @Override diff --git a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/strict/check/DynamicFeatureAccessMethodNotFoundCheck.java b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/strict/check/DynamicFeatureAccessMethodNotFoundCheck.java index 9d85bcd17..f44a8803a 100644 --- a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/strict/check/DynamicFeatureAccessMethodNotFoundCheck.java +++ b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/strict/check/DynamicFeatureAccessMethodNotFoundCheck.java @@ -14,12 +14,15 @@ import java.text.MessageFormat; +import org.eclipse.emf.ecore.EObject; import org.eclipse.xtext.naming.IQualifiedNameConverter; import com._1c.g5.v8.dt.bsl.common.IBslPreferences; import com._1c.g5.v8.dt.bsl.model.DynamicFeatureAccess; import com._1c.g5.v8.dt.core.platform.IBmModelManager; import com._1c.g5.v8.dt.core.platform.IResourceLookup; +import com._1c.g5.v8.dt.core.platform.IV8Project; +import com._1c.g5.v8.dt.core.platform.IV8ProjectManager; import com.e1c.g5.dt.core.api.naming.INamingService; import com.google.inject.Inject; @@ -40,12 +43,16 @@ public class DynamicFeatureAccessMethodNotFoundCheck * @param resourceLookup the resource lookup service, cannot be {@code null}. * @param bslPreferences the BSL preferences service, cannot be {@code null}. * @param qualifiedNameConverter the qualified name converter service, cannot be {@code null}. + * @param namingService service for getting names of EDT object and resources, cannot be null + * @param bmModelManager service for getting instance of Bm Model by {@link EObject}, cannot be null + * @param v8ProjectManager {@link IV8ProjectManager} for getting {@link IV8Project} by {@link EObject}, cannot be null */ @Inject public DynamicFeatureAccessMethodNotFoundCheck(IResourceLookup resourceLookup, IBslPreferences bslPreferences, - IQualifiedNameConverter qualifiedNameConverter, INamingService namingService, IBmModelManager bmModelManager) + IQualifiedNameConverter qualifiedNameConverter, INamingService namingService, IBmModelManager bmModelManager, + IV8ProjectManager v8ProjectManager) { - super(resourceLookup, bslPreferences, qualifiedNameConverter, namingService, bmModelManager); + super(resourceLookup, bslPreferences, qualifiedNameConverter, namingService, bmModelManager, v8ProjectManager); } @Override diff --git a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/strict/check/DynamicFeatureAccessTypeCheck.java b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/strict/check/DynamicFeatureAccessTypeCheck.java index d038b27cb..7885981f2 100644 --- a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/strict/check/DynamicFeatureAccessTypeCheck.java +++ b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/strict/check/DynamicFeatureAccessTypeCheck.java @@ -14,12 +14,15 @@ import java.text.MessageFormat; +import org.eclipse.emf.ecore.EObject; import org.eclipse.xtext.naming.IQualifiedNameConverter; import com._1c.g5.v8.dt.bsl.common.IBslPreferences; import com._1c.g5.v8.dt.bsl.model.DynamicFeatureAccess; import com._1c.g5.v8.dt.core.platform.IBmModelManager; import com._1c.g5.v8.dt.core.platform.IResourceLookup; +import com._1c.g5.v8.dt.core.platform.IV8Project; +import com._1c.g5.v8.dt.core.platform.IV8ProjectManager; import com.e1c.g5.dt.core.api.naming.INamingService; import com.google.inject.Inject; @@ -39,12 +42,16 @@ public class DynamicFeatureAccessTypeCheck * @param resourceLookup the resource lookup service, cannot be {@code null}. * @param bslPreferences the BSL preferences service, cannot be {@code null}. * @param qualifiedNameConverter the qualified name converter service, cannot be {@code null}. + * @param namingService service for getting names of EDT object and resources, cannot be null + * @param bmModelManager service for getting instance of Bm Model by {@link EObject}, cannot be null + * @param v8ProjectManager {@link IV8ProjectManager} for getting {@link IV8Project} by {@link EObject}, cannot be null */ @Inject public DynamicFeatureAccessTypeCheck(IResourceLookup resourceLookup, IBslPreferences bslPreferences, - IQualifiedNameConverter qualifiedNameConverter, INamingService namingService, IBmModelManager bmModelManager) + IQualifiedNameConverter qualifiedNameConverter, INamingService namingService, IBmModelManager bmModelManager, + IV8ProjectManager v8ProjectManager) { - super(resourceLookup, bslPreferences, qualifiedNameConverter, namingService, bmModelManager); + super(resourceLookup, bslPreferences, qualifiedNameConverter, namingService, bmModelManager, v8ProjectManager); } @Override diff --git a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/strict/check/FunctionCtorReturnSectionCheck.java b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/strict/check/FunctionCtorReturnSectionCheck.java index ab739f559..1729dc6e8 100644 --- a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/strict/check/FunctionCtorReturnSectionCheck.java +++ b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/strict/check/FunctionCtorReturnSectionCheck.java @@ -29,6 +29,7 @@ import org.eclipse.core.resources.IProject; import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.xtext.EcoreUtil2; import org.eclipse.xtext.naming.IQualifiedNameConverter; @@ -47,6 +48,7 @@ import com._1c.g5.v8.dt.bsl.model.ReturnStatement; import com._1c.g5.v8.dt.bsl.resource.DynamicFeatureAccessComputer; import com._1c.g5.v8.dt.bsl.resource.TypesComputer; +import com._1c.g5.v8.dt.bsl.util.BslUtil; import com._1c.g5.v8.dt.core.platform.IBmModelManager; import com._1c.g5.v8.dt.core.platform.IResourceLookup; import com._1c.g5.v8.dt.core.platform.IV8Project; @@ -96,10 +98,6 @@ public class FunctionCtorReturnSectionCheck private final BslMultiLineCommentDocumentationProvider commentProvider; - private final IResourceLookup resourceLookup; - - private final IV8ProjectManager v8ProjectManager; - private final IBslPreferences bslPreferences; /** @@ -113,22 +111,23 @@ public class FunctionCtorReturnSectionCheck * @param dynamicComputer the dynamic computer service, cannot be {@code null}. * @param scopeProvider the scope provider service, cannot be {@code null}. * @param commentProvider the comment provider service, cannot be {@code null}. + * @param namingService service for getting names of EDT object and resources, cannot be null + * @param bmModelManager service for getting instance of Bm Model by {@link EObject}, cannot be null + * @param v8ProjectManager {@link IV8ProjectManager} for getting {@link IV8Project} by {@link EObject}, cannot be null */ @Inject - public FunctionCtorReturnSectionCheck(IResourceLookup resourceLookup, IV8ProjectManager v8ProjectManager, + public FunctionCtorReturnSectionCheck(IResourceLookup resourceLookup, IQualifiedNameConverter qualifiedNameConverter, IBslPreferences bslPreferences, TypesComputer typesComputer, DynamicFeatureAccessComputer dynamicComputer, IScopeProvider scopeProvider, BslMultiLineCommentDocumentationProvider commentProvider, INamingService namingService, - IBmModelManager bmModelManager) + IBmModelManager bmModelManager, IV8ProjectManager v8ProjectManager) { - super(resourceLookup, namingService, bmModelManager); + super(resourceLookup, namingService, bmModelManager, v8ProjectManager); this.typesComputer = typesComputer; this.dynamicComputer = dynamicComputer; this.scopeProvider = scopeProvider; this.commentProvider = commentProvider; this.qualifiedNameConverter = qualifiedNameConverter; - this.resourceLookup = resourceLookup; - this.v8ProjectManager = v8ProjectManager; this.bslPreferences = bslPreferences; } @@ -181,14 +180,11 @@ protected void checkDocumentationCommentObject(IDescriptionPart object, BslDocum boolean oldFormat = props.oldCommentFormat(); Collection computedReturnTypes = root.computeReturnTypes(typeScope, scopeProvider, - qualifiedNameConverter, commentProvider, oldFormat, method, context); + qualifiedNameConverter, commentProvider, v8ProjectManager, oldFormat, method, context); Set checkTypes = getCheckTypes(parameters); - Set computedReturnTypeNames = computedReturnTypes.stream() - .map(McoreUtil::getTypeName) - .filter(Objects::nonNull) - .collect(Collectors.toSet()); + Collection computedReturnTypeNames = BslUtil.computeTypeNames(computedReturnTypes, method); if (isUserDataTypes(computedReturnTypeNames, checkTypes)) { @@ -271,11 +267,8 @@ private void checkTypeProperties(Function function, ReturnStatement statment, bo { String propertyName = useRussianScript ? declaredProperty.getNameRu() : declaredProperty.getName(); declaredProertyNames.add(propertyName); - List declaredType = declaredProperty.getTypes() - .stream() - .map(McoreUtil::getTypeName) - .filter(Objects::nonNull) - .collect(Collectors.toList()); + Collection declaredType = + com._1c.g5.v8.dt.bsl.util.BslUtil.computeTypeNames(declaredProperty.getTypes(), function); if (declaredType.isEmpty()) { continue; @@ -289,7 +282,7 @@ private void checkTypeProperties(Function function, ReturnStatement statment, bo .collect(Collectors.toList()); List missingTypes = types.stream().filter(t -> { - String typeName = McoreUtil.getTypeName(t); + String typeName = McoreUtil.getTypeCategory(t); if (typeName != null) { if (!declaredType.contains(typeName)) diff --git a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/strict/check/FunctionReturnTypeCheck.java b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/strict/check/FunctionReturnTypeCheck.java index a781e2b18..2a2d4a275 100644 --- a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/strict/check/FunctionReturnTypeCheck.java +++ b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/strict/check/FunctionReturnTypeCheck.java @@ -21,6 +21,8 @@ import com._1c.g5.v8.dt.bsl.model.BslPackage; import com._1c.g5.v8.dt.core.platform.IBmModelManager; import com._1c.g5.v8.dt.core.platform.IResourceLookup; +import com._1c.g5.v8.dt.core.platform.IV8Project; +import com._1c.g5.v8.dt.core.platform.IV8ProjectManager; import com._1c.g5.v8.dt.mcore.McorePackage; import com.e1c.g5.dt.core.api.naming.INamingService; import com.e1c.g5.v8.dt.check.CheckComplexity; @@ -46,12 +48,16 @@ public class FunctionReturnTypeCheck * @param resourceLookup the resource lookup service, cannot be {@code null}. * @param bslPreferences the BSL preferences service, cannot be {@code null}. * @param qualifiedNameConverter the qualified name converter service, cannot be {@code null}. + * @param namingService service for getting names of EDT object and resources, cannot be null + * @param bmModelManager service for getting instance of Bm Model by {@link EObject}, cannot be null + * @param v8ProjectManager {@link IV8ProjectManager} for getting {@link IV8Project} by {@link EObject}, cannot be null */ @Inject public FunctionReturnTypeCheck(IResourceLookup resourceLookup, IBslPreferences bslPreferences, - IQualifiedNameConverter qualifiedNameConverter, INamingService namingService, IBmModelManager bmModelManager) + IQualifiedNameConverter qualifiedNameConverter, INamingService namingService, IBmModelManager bmModelManager, + IV8ProjectManager v8ProjectManager) { - super(resourceLookup, bslPreferences, qualifiedNameConverter, namingService, bmModelManager); + super(resourceLookup, bslPreferences, qualifiedNameConverter, namingService, bmModelManager, v8ProjectManager); } @Override diff --git a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/strict/check/InvocationParamIntersectionCheck.java b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/strict/check/InvocationParamIntersectionCheck.java index 9f4cb91ee..d21413a53 100644 --- a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/strict/check/InvocationParamIntersectionCheck.java +++ b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/strict/check/InvocationParamIntersectionCheck.java @@ -126,8 +126,6 @@ public class InvocationParamIntersectionCheck //@formatter:on - private final IV8ProjectManager v8ProjectManager; - private final ExportMethodTypeProvider exportMethodTypeProvider; /** @@ -136,17 +134,18 @@ public class InvocationParamIntersectionCheck * @param resourceLookup the resource lookup service, cannot be {@code null}. * @param bslPreferences the BSL preferences service, cannot be {@code null}. * @param qualifiedNameConverter the qualified name converter service, cannot be {@code null}. - * @param v8ProjectManager the v 8 project manager service, cannot be {@code null}. * @param exportMethodTypeProvider the export method type provider service, cannot be {@code null}. + * @param namingService service for getting names of EDT object and resources, cannot be null + * @param bmModelManager service for getting instance of Bm Model by {@link EObject}, cannot be null + * @param v8ProjectManager {@link IV8ProjectManager} for getting {@link IV8Project} by {@link EObject}, cannot be null */ @Inject public InvocationParamIntersectionCheck(IResourceLookup resourceLookup, IBslPreferences bslPreferences, - IQualifiedNameConverter qualifiedNameConverter, IV8ProjectManager v8ProjectManager, - ExportMethodTypeProvider exportMethodTypeProvider, INamingService namingService, IBmModelManager bmModelManager) + IQualifiedNameConverter qualifiedNameConverter, ExportMethodTypeProvider exportMethodTypeProvider, + INamingService namingService, IBmModelManager bmModelManager, IV8ProjectManager v8ProjectManager) { - super(resourceLookup, bslPreferences, qualifiedNameConverter, namingService, bmModelManager); + super(resourceLookup, bslPreferences, qualifiedNameConverter, namingService, bmModelManager, v8ProjectManager); this.exportMethodTypeProvider = exportMethodTypeProvider; - this.v8ProjectManager = v8ProjectManager; } @Override @@ -295,7 +294,7 @@ private void checkParamTypesIntersect(Invocation inv, com._1c.g5.v8.dt.mcore.Met new BmOperationContext(namingService, bmModelManager, bmTransaction); targetTypes = docComment.get() .computeParameterTypes(parameter.getName(), typeScope, scopeProvider, qualifiedNameConverter, - commentProvider, oldFormatComment, method, typeComputationContext); + commentProvider, v8ProjectManager, oldFormatComment, method, typeComputationContext); } if (targetTypes.isEmpty()) @@ -462,7 +461,7 @@ private void checkParamTypesIntersect(Invocation inv, Method method, boolean all // if parameter declared in doc-comment then check only declared types targetTypes = docComment.get() .computeParameterTypes(paramName, typeScope, scopeProvider, qualifiedNameConverter, commentProvider, - oldFormatComment, method, typeComputationContext); + v8ProjectManager, oldFormatComment, method, typeComputationContext); } else { diff --git a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/strict/check/MethodParamTypeCheck.java b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/strict/check/MethodParamTypeCheck.java index fbc8300f9..d0b494994 100644 --- a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/strict/check/MethodParamTypeCheck.java +++ b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/strict/check/MethodParamTypeCheck.java @@ -26,6 +26,8 @@ import com._1c.g5.v8.dt.bsl.model.FormalParam; import com._1c.g5.v8.dt.core.platform.IBmModelManager; import com._1c.g5.v8.dt.core.platform.IResourceLookup; +import com._1c.g5.v8.dt.core.platform.IV8Project; +import com._1c.g5.v8.dt.core.platform.IV8ProjectManager; import com.e1c.g5.dt.core.api.naming.INamingService; import com.e1c.g5.v8.dt.check.CheckComplexity; import com.e1c.g5.v8.dt.check.ICheckParameters; @@ -51,12 +53,16 @@ public class MethodParamTypeCheck * @param resourceLookup the resource lookup service, cannot be {@code null}. * @param bslPreferences the BSL preferences service, cannot be {@code null}. * @param qualifiedNameConverter the qualified name converter service, cannot be {@code null}. + * @param namingService service for getting names of EDT object and resources, cannot be null + * @param bmModelManager service for getting instance of Bm Model by {@link EObject}, cannot be null + * @param v8ProjectManager {@link IV8ProjectManager} for getting {@link IV8Project} by {@link EObject}, cannot be null */ @Inject public MethodParamTypeCheck(IResourceLookup resourceLookup, IBslPreferences bslPreferences, - IQualifiedNameConverter qualifiedNameConverter, INamingService namingService, IBmModelManager bmModelManager) + IQualifiedNameConverter qualifiedNameConverter, INamingService namingService, IBmModelManager bmModelManager, + IV8ProjectManager v8ProjectManager) { - super(resourceLookup, bslPreferences, qualifiedNameConverter, namingService, bmModelManager); + super(resourceLookup, bslPreferences, qualifiedNameConverter, namingService, bmModelManager, v8ProjectManager); } @Override diff --git a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/strict/check/SimpleStatementTypeCheck.java b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/strict/check/SimpleStatementTypeCheck.java index fb0b88b39..37ac4e94b 100644 --- a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/strict/check/SimpleStatementTypeCheck.java +++ b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/strict/check/SimpleStatementTypeCheck.java @@ -39,6 +39,7 @@ import com._1c.g5.v8.dt.bsl.model.Variable; import com._1c.g5.v8.dt.core.platform.IBmModelManager; import com._1c.g5.v8.dt.core.platform.IResourceLookup; +import com._1c.g5.v8.dt.core.platform.IV8Project; import com._1c.g5.v8.dt.core.platform.IV8ProjectManager; import com._1c.g5.v8.dt.mcore.Environmental; import com._1c.g5.v8.dt.mcore.TypeItem; @@ -68,23 +69,22 @@ public class SimpleStatementTypeCheck private static final String DEFAULT_ALLOW_IMPLICIT_VAR_RESET_TO_UNDEFINED = Boolean.TRUE.toString(); - private final IV8ProjectManager v8ProjectManager; - /** * Instantiates a new simple statement change type check. * * @param resourceLookup the resource lookup service, cannot be {@code null}. * @param bslPreferences the BSL preferences service, cannot be {@code null}. - * @param v8ProjectManager the v8 project manager service, cannot be {@code null}. * @param qualifiedNameConverter the qualified name converter service, cannot be {@code null}. + * @param namingService service for getting names of EDT object and resources, cannot be null + * @param bmModelManager service for getting instance of Bm Model by {@link EObject}, cannot be null + * @param v8ProjectManager {@link IV8ProjectManager} for getting {@link IV8Project} by {@link EObject}, cannot be null */ @Inject public SimpleStatementTypeCheck(IResourceLookup resourceLookup, IBslPreferences bslPreferences, - IV8ProjectManager v8ProjectManager, IQualifiedNameConverter qualifiedNameConverter, - INamingService namingService, IBmModelManager bmModelManager) + IQualifiedNameConverter qualifiedNameConverter, INamingService namingService, IBmModelManager bmModelManager, + IV8ProjectManager v8ProjectManager) { - super(resourceLookup, bslPreferences, qualifiedNameConverter, namingService, bmModelManager); - this.v8ProjectManager = v8ProjectManager; + super(resourceLookup, bslPreferences, qualifiedNameConverter, namingService, bmModelManager, v8ProjectManager); } @Override diff --git a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/strict/check/StructureCtorValueTypeCheck.java b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/strict/check/StructureCtorValueTypeCheck.java index b2f7c0a71..c783c33f9 100644 --- a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/strict/check/StructureCtorValueTypeCheck.java +++ b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/strict/check/StructureCtorValueTypeCheck.java @@ -18,6 +18,7 @@ import java.text.MessageFormat; import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.emf.ecore.EObject; import org.eclipse.xtext.naming.IQualifiedNameConverter; import com._1c.g5.v8.bm.core.IBmTransaction; @@ -28,6 +29,8 @@ import com._1c.g5.v8.dt.bsl.model.StringLiteral; import com._1c.g5.v8.dt.core.platform.IBmModelManager; import com._1c.g5.v8.dt.core.platform.IResourceLookup; +import com._1c.g5.v8.dt.core.platform.IV8Project; +import com._1c.g5.v8.dt.core.platform.IV8ProjectManager; import com._1c.g5.v8.dt.mcore.util.McoreUtil; import com._1c.g5.v8.dt.platform.IEObjectTypeNames; import com.e1c.g5.dt.core.api.naming.INamingService; @@ -55,12 +58,16 @@ public class StructureCtorValueTypeCheck * @param resourceLookup the resource lookup service, cannot be {@code null}. * @param bslPreferences the BSL preferences service, cannot be {@code null}. * @param qualifiedNameConverter the qualified name converter service, cannot be {@code null}. + * @param namingService service for getting names of EDT object and resources, cannot be null + * @param bmModelManager service for getting instance of Bm Model by {@link EObject}, cannot be null + * @param v8ProjectManager {@link IV8ProjectManager} for getting {@link IV8Project} by {@link EObject}, cannot be null */ @Inject public StructureCtorValueTypeCheck(IResourceLookup resourceLookup, IBslPreferences bslPreferences, - IQualifiedNameConverter qualifiedNameConverter, INamingService namingService, IBmModelManager bmModelManager) + IQualifiedNameConverter qualifiedNameConverter, INamingService namingService, IBmModelManager bmModelManager, + IV8ProjectManager v8ProjectManager) { - super(resourceLookup, bslPreferences, qualifiedNameConverter, namingService, bmModelManager); + super(resourceLookup, bslPreferences, qualifiedNameConverter, namingService, bmModelManager, v8ProjectManager); } @Override diff --git a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/strict/check/StructureKeyModificationCheck.java b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/strict/check/StructureKeyModificationCheck.java index 83df7a8cb..a2bfe9865 100644 --- a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/strict/check/StructureKeyModificationCheck.java +++ b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/strict/check/StructureKeyModificationCheck.java @@ -23,6 +23,7 @@ import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.util.EcoreUtil; import org.eclipse.xtext.EcoreUtil2; import org.eclipse.xtext.naming.IQualifiedNameConverter; @@ -43,6 +44,8 @@ import com._1c.g5.v8.dt.common.StringUtils; import com._1c.g5.v8.dt.core.platform.IBmModelManager; import com._1c.g5.v8.dt.core.platform.IResourceLookup; +import com._1c.g5.v8.dt.core.platform.IV8Project; +import com._1c.g5.v8.dt.core.platform.IV8ProjectManager; import com._1c.g5.v8.dt.mcore.DerivedProperty; import com._1c.g5.v8.dt.mcore.Property; import com._1c.g5.v8.dt.mcore.TypeItem; @@ -85,12 +88,23 @@ public class StructureKeyModificationCheck private final IStaticExpressionValueComputer staticExpressionValueComputer; + /** + * Instantiates a new structure constructor value type check. + * + * @param resourceLookup the resource lookup service, cannot be {@code null}. + * @param bslPreferences the BSL preferences service, cannot be {@code null}. + * @param qualifiedNameConverter the qualified name converter service, cannot be {@code null}. + * @param namingService service for getting names of EDT object and resources, cannot be null + * @param bmModelManager service for getting instance of Bm Model by {@link EObject}, cannot be null + * @param v8ProjectManager {@link IV8ProjectManager} for getting {@link IV8Project} by {@link EObject}, cannot be null + * @param staticExpressionValueComputer {@link IStaticExpressionValueComputer} for compute string literal type, cannot be null + */ @Inject public StructureKeyModificationCheck(IResourceLookup resourceLookup, IBslPreferences bslPreferences, IQualifiedNameConverter qualifiedNameConverter, INamingService namingService, IBmModelManager bmModelManager, - IStaticExpressionValueComputer staticExpressionValueComputer) + IV8ProjectManager v8ProjectManager, IStaticExpressionValueComputer staticExpressionValueComputer) { - super(resourceLookup, bslPreferences, qualifiedNameConverter, namingService, bmModelManager); + super(resourceLookup, bslPreferences, qualifiedNameConverter, namingService, bmModelManager, v8ProjectManager); this.staticExpressionValueComputer = staticExpressionValueComputer; } diff --git a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/strict/check/TypedValueAddingToUntypedCollectionCheck.java b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/strict/check/TypedValueAddingToUntypedCollectionCheck.java index 382a6fcfd..88e31767b 100644 --- a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/strict/check/TypedValueAddingToUntypedCollectionCheck.java +++ b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/strict/check/TypedValueAddingToUntypedCollectionCheck.java @@ -37,6 +37,8 @@ import com._1c.g5.v8.dt.bsl.model.util.BslUtil; import com._1c.g5.v8.dt.core.platform.IBmModelManager; import com._1c.g5.v8.dt.core.platform.IResourceLookup; +import com._1c.g5.v8.dt.core.platform.IV8Project; +import com._1c.g5.v8.dt.core.platform.IV8ProjectManager; import com._1c.g5.v8.dt.mcore.Method; import com._1c.g5.v8.dt.mcore.Type; import com._1c.g5.v8.dt.mcore.TypeItem; @@ -79,12 +81,15 @@ public class TypedValueAddingToUntypedCollectionCheck * @param resourceLookup the resource lookup service, cannot be {@code null}. * @param bslPreferences the BSL preferences service, cannot be {@code null}. * @param qualifiedNameConverter the qualified name converter service, cannot be {@code null}. + * @param namingService service for getting names of EDT object and resources, cannot be null + * @param bmModelManager service for getting instance of Bm Model by {@link EObject}, cannot be null + * @param v8ProjectManager {@link IV8ProjectManager} for getting {@link IV8Project} by {@link EObject}, cannot be null */ @Inject public TypedValueAddingToUntypedCollectionCheck(IResourceLookup resourceLookup, IBslPreferences bslPreferences, - IQualifiedNameConverter qualifiedNameConverter, INamingService namingService, IBmModelManager bmModelManager) + IQualifiedNameConverter qualifiedNameConverter, INamingService namingService, IBmModelManager bmModelManager, IV8ProjectManager v8ProjectManager) { - super(resourceLookup, bslPreferences, qualifiedNameConverter, namingService, bmModelManager); + super(resourceLookup, bslPreferences, qualifiedNameConverter, namingService, bmModelManager, v8ProjectManager); } @Override diff --git a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/strict/check/VariableTypeCheck.java b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/strict/check/VariableTypeCheck.java index 046b84d7f..1f10e8dc5 100644 --- a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/strict/check/VariableTypeCheck.java +++ b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/strict/check/VariableTypeCheck.java @@ -32,6 +32,8 @@ import com._1c.g5.v8.dt.bsl.model.Variable; import com._1c.g5.v8.dt.core.platform.IBmModelManager; import com._1c.g5.v8.dt.core.platform.IResourceLookup; +import com._1c.g5.v8.dt.core.platform.IV8Project; +import com._1c.g5.v8.dt.core.platform.IV8ProjectManager; import com._1c.g5.v8.dt.mcore.Environmental; import com._1c.g5.v8.dt.mcore.util.Environments; import com.e1c.g5.dt.core.api.naming.INamingService; @@ -59,12 +61,16 @@ public class VariableTypeCheck * @param resourceLookup the resource lookup service, cannot be {@code null}. * @param bslPreferences the BSL preferences service, cannot be {@code null}. * @param qualifiedNameConverter the qualified name converter service, cannot be {@code null}. + * @param namingService service for getting names of EDT object and resources, cannot be null + * @param bmModelManager service for getting instance of Bm Model by {@link EObject}, cannot be null + * @param v8ProjectManager {@link IV8ProjectManager} for getting {@link IV8Project} by {@link EObject}, cannot be null */ @Inject public VariableTypeCheck(IResourceLookup resourceLookup, IBslPreferences bslPreferences, - IQualifiedNameConverter qualifiedNameConverter, INamingService namingService, IBmModelManager bmModelManager) + IQualifiedNameConverter qualifiedNameConverter, INamingService namingService, IBmModelManager bmModelManager, + IV8ProjectManager v8ProjectManager) { - super(resourceLookup, bslPreferences, qualifiedNameConverter, namingService, bmModelManager); + super(resourceLookup, bslPreferences, qualifiedNameConverter, namingService, bmModelManager, v8ProjectManager); } @Override diff --git a/bundles/com.e1c.v8codestyle.form/.classpath b/bundles/com.e1c.v8codestyle.form/.classpath index e801ebfb4..81fe078c2 100644 --- a/bundles/com.e1c.v8codestyle.form/.classpath +++ b/bundles/com.e1c.v8codestyle.form/.classpath @@ -1,6 +1,6 @@ - + diff --git a/bundles/com.e1c.v8codestyle.form/.settings/org.eclipse.jdt.core.prefs b/bundles/com.e1c.v8codestyle.form/.settings/org.eclipse.jdt.core.prefs index 34feba4dd..ab5e755ff 100644 --- a/bundles/com.e1c.v8codestyle.form/.settings/org.eclipse.jdt.core.prefs +++ b/bundles/com.e1c.v8codestyle.form/.settings/org.eclipse.jdt.core.prefs @@ -1,10 +1,10 @@ eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 -org.eclipse.jdt.core.compiler.compliance=11 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 +org.eclipse.jdt.core.compiler.compliance=17 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=11 +org.eclipse.jdt.core.compiler.source=17 diff --git a/bundles/com.e1c.v8codestyle.form/META-INF/MANIFEST.MF b/bundles/com.e1c.v8codestyle.form/META-INF/MANIFEST.MF index 39f6e0670..4f1c92c0d 100644 --- a/bundles/com.e1c.v8codestyle.form/META-INF/MANIFEST.MF +++ b/bundles/com.e1c.v8codestyle.form/META-INF/MANIFEST.MF @@ -8,13 +8,13 @@ Bundle-Vendor: %providerName Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.20.0,4.0.0)", org.eclipse.emf.ecore;bundle-version="[2.23.0,3.0.0)", org.eclipse.core.resources;bundle-version="[3.14.0,4.0.0)", - javax.inject;bundle-version="[1.0.0,2.0.0)", + com.google.inject;bundle-version="[7.0.0,8.0.0)", org.eclipse.xtext;bundle-version="[2.26.0,3.0.0)" -Bundle-RequiredExecutionEnvironment: JavaSE-11 +Bundle-RequiredExecutionEnvironment: JavaSE-17 Automatic-Module-Name: com.e1c.v8codestyle.form Bundle-ActivationPolicy: lazy Bundle-Localization: plugin -Import-Package: com._1c.g5.v8.bm.core;version="[8.0.0,9.0.0)", +Import-Package: com._1c.g5.v8.bm.core;version="[9.0.0,10.0.0)", com._1c.g5.v8.bm.core.event;version="[3.0.0,4.0.0)", com._1c.g5.v8.bm.integration;version="[11.0.0,12.0.0)", com._1c.g5.v8.dt.common;version="[6.0.0,7.0.0)", @@ -24,14 +24,14 @@ Import-Package: com._1c.g5.v8.bm.core;version="[8.0.0,9.0.0)", com._1c.g5.v8.dt.dcs.model.settings;version="[3.2.0,4.0.0)", com._1c.g5.v8.dt.form.model;version="[11.0.0,12.0.0)", com._1c.g5.v8.dt.form.model.util;version="[7.2.0,8.0.0)", - com._1c.g5.v8.dt.form.service;version="[7.0.0,8.0.0)", + com._1c.g5.v8.dt.form.service;version="[8.0.0,9.0.0)", com._1c.g5.v8.dt.form.service.datasourceinfo;version="[3.0.0,4.0.0)", com._1c.g5.v8.dt.mcore;version="[7.0.0,8.0.0)", com._1c.g5.v8.dt.metadata;version="[5.0.0,6.0.0)", com._1c.g5.v8.dt.metadata.dbview;version="[4.0.0,5.0.0)", com._1c.g5.v8.dt.metadata.mdclass;version="[9.0.0,10.0.0)", com._1c.g5.v8.dt.platform.version;version="[2.14.0,3.0.0)", - com._1c.g5.v8.dt.ql.model;version="[4.0.0,5.0.0)", + com._1c.g5.v8.dt.ql.model;version="[5.0.0,6.0.0)", com._1c.g5.v8.dt.ql.resource;version="[5.0.0,6.0.0)", com._1c.g5.v8.dt.ql.typesystem;version="[6.0.0,7.0.0)", com._1c.g5.wiring;version="[2.2.0,3.0.0)", @@ -40,10 +40,8 @@ Import-Package: com._1c.g5.v8.bm.core;version="[8.0.0,9.0.0)", com.e1c.g5.v8.dt.check.components;version="[2.0.0,3.0.0)", com.e1c.g5.v8.dt.check.context;version="[2.0.0,3.0.0)", com.e1c.g5.v8.dt.check.ext;version="[1.0.0,2.0.0)", - com.e1c.g5.v8.dt.check.qfix;version="[2.0.0,3.0.0)", + com.e1c.g5.v8.dt.check.qfix;version="[3.0.0,4.0.0)", com.e1c.g5.v8.dt.check.qfix.components;version="[1.0.0,2.0.0)", - com.e1c.g5.v8.dt.check.settings;version="[3.0.0,4.0.0)", + com.e1c.g5.v8.dt.check.settings;version="[4.0.0,5.0.0)", com.e1c.v8codestyle.check;version="[0.7.0,0.8.0)", - com.google.common.base;version="[30.1.0,31.0.0)", - com.google.inject;version="[5.0.1,6.0.0)", - com.google.inject.binder;version="[5.0.1,6.0.0)" + com.google.common.base;version="[32.1.0,33.0.0)" diff --git a/bundles/com.e1c.v8codestyle.form/src/com/e1c/v8codestyle/form/check/DataCompositionConditionalAppearanceUseCheck.java b/bundles/com.e1c.v8codestyle.form/src/com/e1c/v8codestyle/form/check/DataCompositionConditionalAppearanceUseCheck.java index b7d4e51a8..2f7b1fa11 100644 --- a/bundles/com.e1c.v8codestyle.form/src/com/e1c/v8codestyle/form/check/DataCompositionConditionalAppearanceUseCheck.java +++ b/bundles/com.e1c.v8codestyle.form/src/com/e1c/v8codestyle/form/check/DataCompositionConditionalAppearanceUseCheck.java @@ -47,7 +47,6 @@ public class DataCompositionConditionalAppearanceUseCheck extends BasicCheck { - private static final String CHECK_ID = "data-composition-conditional-appearance-use"; //$NON-NLS-1$ private final IBmModelManager bmModelManager; @@ -78,10 +77,14 @@ protected void configureCheck(CheckConfigurer builder) .complexity(CheckComplexity.NORMAL) .severity(IssueSeverity.MINOR) .issueType(IssueType.UI_STYLE) - .extension(new StandardCheckExtension(710, getCheckId(), CorePlugin.PLUGIN_ID)) - .topObject(DATA_COMPOSITION_SETTINGS) + .extension(new StandardCheckExtension(710, getCheckId(), CorePlugin.PLUGIN_ID)); + + builder.topObject(DATA_COMPOSITION_SETTINGS) .containment(DATA_COMPOSITION_CONDITIONAL_APPEARANCE) .features(DATA_COMPOSITION_CONDITIONAL_APPEARANCE__ITEMS); + + builder.topObject(DATA_COMPOSITION_CONDITIONAL_APPEARANCE) + .features(DATA_COMPOSITION_CONDITIONAL_APPEARANCE__ITEMS); } @Override @@ -104,7 +107,6 @@ protected void check(Object object, ResultAcceptor resultAcceptor, ICheckParamet } EObject eObject = dcca; - DynamicListExtInfo dl = manager.getOwner(eObject, DynamicListExtInfo.class); if (dl != null) { @@ -114,9 +116,8 @@ protected void check(Object object, ResultAcceptor resultAcceptor, ICheckParamet return; } - resultAcceptor.addIssue( - MessageFormat.format( - Messages.DataCompositionConditionalAppearanceUseCheck_Form_attribute, formAttribute.getName()), + resultAcceptor.addIssue(MessageFormat + .format(Messages.DataCompositionConditionalAppearanceUseCheck_Form_attribute, formAttribute.getName()), dcca, DATA_COMPOSITION_CONDITIONAL_APPEARANCE__ITEMS); } @@ -128,12 +129,8 @@ protected void check(Object object, ResultAcceptor resultAcceptor, ICheckParamet return; } - resultAcceptor.addIssue( - MessageFormat.format( - Messages.DataCompositionConditionalAppearanceUseCheck_Form, form.getMdForm().getName()), - dcca, DATA_COMPOSITION_CONDITIONAL_APPEARANCE__ITEMS); - + resultAcceptor.addIssue(MessageFormat.format(Messages.DataCompositionConditionalAppearanceUseCheck_Form, + form.getMdForm().getName()), dcca, DATA_COMPOSITION_CONDITIONAL_APPEARANCE__ITEMS); } - } } diff --git a/bundles/com.e1c.v8codestyle.md.ui/.classpath b/bundles/com.e1c.v8codestyle.md.ui/.classpath index e801ebfb4..81fe078c2 100644 --- a/bundles/com.e1c.v8codestyle.md.ui/.classpath +++ b/bundles/com.e1c.v8codestyle.md.ui/.classpath @@ -1,6 +1,6 @@ - + diff --git a/bundles/com.e1c.v8codestyle.md.ui/.settings/org.eclipse.jdt.core.prefs b/bundles/com.e1c.v8codestyle.md.ui/.settings/org.eclipse.jdt.core.prefs index 0bdcd8f0d..b8daa69de 100644 --- a/bundles/com.e1c.v8codestyle.md.ui/.settings/org.eclipse.jdt.core.prefs +++ b/bundles/com.e1c.v8codestyle.md.ui/.settings/org.eclipse.jdt.core.prefs @@ -1,10 +1,10 @@ eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 -org.eclipse.jdt.core.compiler.compliance=11 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 +org.eclipse.jdt.core.compiler.compliance=17 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=11 +org.eclipse.jdt.core.compiler.source=17 diff --git a/bundles/com.e1c.v8codestyle.md.ui/META-INF/MANIFEST.MF b/bundles/com.e1c.v8codestyle.md.ui/META-INF/MANIFEST.MF index 414f76115..cf27ca060 100644 --- a/bundles/com.e1c.v8codestyle.md.ui/META-INF/MANIFEST.MF +++ b/bundles/com.e1c.v8codestyle.md.ui/META-INF/MANIFEST.MF @@ -13,8 +13,9 @@ Require-Bundle: org.eclipse.ui;bundle-version="[3.119.0,4.0.0)", org.eclipse.ui.forms;bundle-version="[3.11.100,4.0.0)", org.eclipse.emf.databinding;bundle-version="[1.5.0,2.0.0)", org.eclipse.jface.databinding;bundle-version="[1.12.200,2.0.0)", - org.eclipse.core.databinding.property;bundle-version="[1.8.100,2.0.0)" -Bundle-RequiredExecutionEnvironment: JavaSE-11 + org.eclipse.core.databinding.property;bundle-version="[1.8.100,2.0.0)", + com.google.inject;bundle-version="[7.0.0,8.0.0)" +Bundle-RequiredExecutionEnvironment: JavaSE-17 Automatic-Module-Name: com.e1c.v8codestyle.md.ui Bundle-ActivationPolicy: lazy Bundle-Localization: plugin @@ -27,5 +28,4 @@ Import-Package: com._1c.g5.v8.dt.common;version="[6.4.0,7.0.0)", com._1c.g5.wiring;version="[2.2.0,3.0.0)", com._1c.g5.wiring.binder;version="[1.1.0,2.0.0)", com.e1c.v8codestyle.md;version="[0.7.0,0.8.0)", - com.google.common.base;version="[30.1.0,31.0.0)", - com.google.inject;version="[5.0.1,6.0.0)" + com.google.common.base;version="[32.1.0,33.0.0)" diff --git a/bundles/com.e1c.v8codestyle.md/.classpath b/bundles/com.e1c.v8codestyle.md/.classpath index e801ebfb4..81fe078c2 100644 --- a/bundles/com.e1c.v8codestyle.md/.classpath +++ b/bundles/com.e1c.v8codestyle.md/.classpath @@ -1,6 +1,6 @@ - + diff --git a/bundles/com.e1c.v8codestyle.md/.settings/org.eclipse.jdt.core.prefs b/bundles/com.e1c.v8codestyle.md/.settings/org.eclipse.jdt.core.prefs index 34feba4dd..ab5e755ff 100644 --- a/bundles/com.e1c.v8codestyle.md/.settings/org.eclipse.jdt.core.prefs +++ b/bundles/com.e1c.v8codestyle.md/.settings/org.eclipse.jdt.core.prefs @@ -1,10 +1,10 @@ eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 -org.eclipse.jdt.core.compiler.compliance=11 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 +org.eclipse.jdt.core.compiler.compliance=17 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=11 +org.eclipse.jdt.core.compiler.source=17 diff --git a/bundles/com.e1c.v8codestyle.md/META-INF/MANIFEST.MF b/bundles/com.e1c.v8codestyle.md/META-INF/MANIFEST.MF index 7b4e807ab..75024fc41 100644 --- a/bundles/com.e1c.v8codestyle.md/META-INF/MANIFEST.MF +++ b/bundles/com.e1c.v8codestyle.md/META-INF/MANIFEST.MF @@ -7,12 +7,13 @@ Bundle-Activator: com.e1c.v8codestyle.internal.md.CorePlugin Bundle-Vendor: %providerName Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.18.0,4.0.0)", org.eclipse.emf.ecore;bundle-version="[2.22.0,3.0.0)", - org.eclipse.core.resources;bundle-version="[3.14.0,4.0.0)" -Bundle-RequiredExecutionEnvironment: JavaSE-11 + org.eclipse.core.resources;bundle-version="[3.14.0,4.0.0)", + com.google.inject;bundle-version="[7.0.0,8.0.0)" +Bundle-RequiredExecutionEnvironment: JavaSE-17 Automatic-Module-Name: com.e1c.v8codestyle.md Bundle-ActivationPolicy: lazy Bundle-Localization: plugin -Import-Package: com._1c.g5.v8.bm.core;version="[8.0.0,9.0.0)", +Import-Package: com._1c.g5.v8.bm.core;version="[9.0.0,10.0.0)", com._1c.g5.v8.bm.core.event;version="[3.0.0,4.0.0)", com._1c.g5.v8.dt.common;version="[6.0.0,7.0.0)", com._1c.g5.v8.dt.core.platform;version="[11.0.0,12.0.0)", @@ -28,8 +29,7 @@ Import-Package: com._1c.g5.v8.bm.core;version="[8.0.0,9.0.0)", com.e1c.g5.v8.dt.check.components;version="[2.0.0,3.0.0)", com.e1c.g5.v8.dt.check.context;version="[2.0.0,3.0.0)", com.e1c.g5.v8.dt.check.ext;version="[1.0.0,2.0.0)", - com.e1c.g5.v8.dt.check.settings;version="[3.0.0,4.0.0)", + com.e1c.g5.v8.dt.check.settings;version="[4.0.0,5.0.0)", com.e1c.v8codestyle.check;version="[0.7.0,0.8.0)", - com.google.common.base;version="[30.1.0,31.0.0)", - com.google.inject;version="[5.0.1,6.0.0)" + com.google.common.base;version="[32.1.0,33.0.0)" Export-Package: com.e1c.v8codestyle.md;version="0.7.0" diff --git a/bundles/com.e1c.v8codestyle.ql/.classpath b/bundles/com.e1c.v8codestyle.ql/.classpath index e801ebfb4..81fe078c2 100644 --- a/bundles/com.e1c.v8codestyle.ql/.classpath +++ b/bundles/com.e1c.v8codestyle.ql/.classpath @@ -1,6 +1,6 @@ - + diff --git a/bundles/com.e1c.v8codestyle.ql/.settings/org.eclipse.jdt.core.prefs b/bundles/com.e1c.v8codestyle.ql/.settings/org.eclipse.jdt.core.prefs index 34feba4dd..ab5e755ff 100644 --- a/bundles/com.e1c.v8codestyle.ql/.settings/org.eclipse.jdt.core.prefs +++ b/bundles/com.e1c.v8codestyle.ql/.settings/org.eclipse.jdt.core.prefs @@ -1,10 +1,10 @@ eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 -org.eclipse.jdt.core.compiler.compliance=11 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 +org.eclipse.jdt.core.compiler.compliance=17 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=11 +org.eclipse.jdt.core.compiler.source=17 diff --git a/bundles/com.e1c.v8codestyle.ql/META-INF/MANIFEST.MF b/bundles/com.e1c.v8codestyle.ql/META-INF/MANIFEST.MF index b7f58ed22..dd170f99d 100644 --- a/bundles/com.e1c.v8codestyle.ql/META-INF/MANIFEST.MF +++ b/bundles/com.e1c.v8codestyle.ql/META-INF/MANIFEST.MF @@ -8,18 +8,19 @@ Bundle-Vendor: %providerName Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.18.0,4.0.0)", org.eclipse.emf.ecore;bundle-version="[2.22.0,3.0.0)", org.eclipse.xtext;bundle-version="[2.24.0,3.0.0)", - org.eclipse.core.resources;bundle-version="[3.14.0,4.0.0)" -Bundle-RequiredExecutionEnvironment: JavaSE-11 + org.eclipse.core.resources;bundle-version="[3.14.0,4.0.0)", + com.google.inject;bundle-version="[7.0.0,8.0.0)" +Bundle-RequiredExecutionEnvironment: JavaSE-17 Automatic-Module-Name: com.e1c.v8codestyle.ql Bundle-ActivationPolicy: lazy Bundle-Localization: plugin -Import-Package: com._1c.g5.v8.bm.core;version="[8.0.0,9.0.0)", +Import-Package: com._1c.g5.v8.bm.core;version="[9.0.0,10.0.0)", com._1c.g5.v8.dt.common;version="[6.0.0,7.0.0)", com._1c.g5.v8.dt.core.platform;version="[11.0.0,12.0.0)", com._1c.g5.v8.dt.mcore;version="[7.0.0,8.0.0)", com._1c.g5.v8.dt.metadata.dbview;version="4.0.0", com._1c.g5.v8.dt.metadata.mdclass;version="[9.0.0,10.0.0)", - com._1c.g5.v8.dt.ql.model;version="[4.0.0,5.0.0)", + com._1c.g5.v8.dt.ql.model;version="[5.0.0,6.0.0)", com._1c.g5.v8.dt.ql.typesystem;version="5.0.0", com._1c.g5.wiring;version="[2.2.0,3.0.0)", com._1c.g5.wiring.binder;version="[1.1.0,2.0.0)", @@ -27,5 +28,4 @@ Import-Package: com._1c.g5.v8.bm.core;version="[8.0.0,9.0.0)", com.e1c.g5.v8.dt.check.components;version="[2.0.0,3.0.0)", com.e1c.g5.v8.dt.check.settings;version="1.0.0", com.e1c.g5.v8.dt.ql.check;version="[1.0.0,2.0.0)", - com.e1c.v8codestyle.check;version="[0.7.0,0.8.0)", - com.google.inject;version="[5.0.1,6.0.0)" + com.e1c.v8codestyle.check;version="[0.7.0,0.8.0)" diff --git a/bundles/com.e1c.v8codestyle.ql/src/com/e1c/v8codestyle/ql/check/TempTableHasIndex.java b/bundles/com.e1c.v8codestyle.ql/src/com/e1c/v8codestyle/ql/check/TempTableHasIndex.java index 9f8f0d77c..168c7852f 100644 --- a/bundles/com.e1c.v8codestyle.ql/src/com/e1c/v8codestyle/ql/check/TempTableHasIndex.java +++ b/bundles/com.e1c.v8codestyle.ql/src/com/e1c/v8codestyle/ql/check/TempTableHasIndex.java @@ -82,7 +82,7 @@ protected void checkQlObject(EObject object, QueryOwner owner, IQlResultAcceptor return; } - if (selectQuery.getIndexes() == null || selectQuery.getIndexes().isEmpty()) + if (selectQuery.getIndexSets().isEmpty()) { AbstractQuerySchemaTable table = selectQuery.getPlacementTable(); String excludeTableNamePattern = parameters.getString(PARAMETER_EXCLUDE_TABLE_NAME_PATTERN); diff --git a/bundles/com.e1c.v8codestyle.right/.classpath b/bundles/com.e1c.v8codestyle.right/.classpath index e801ebfb4..81fe078c2 100644 --- a/bundles/com.e1c.v8codestyle.right/.classpath +++ b/bundles/com.e1c.v8codestyle.right/.classpath @@ -1,6 +1,6 @@ - + diff --git a/bundles/com.e1c.v8codestyle.right/.settings/org.eclipse.jdt.core.prefs b/bundles/com.e1c.v8codestyle.right/.settings/org.eclipse.jdt.core.prefs index 34feba4dd..ab5e755ff 100644 --- a/bundles/com.e1c.v8codestyle.right/.settings/org.eclipse.jdt.core.prefs +++ b/bundles/com.e1c.v8codestyle.right/.settings/org.eclipse.jdt.core.prefs @@ -1,10 +1,10 @@ eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 -org.eclipse.jdt.core.compiler.compliance=11 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 +org.eclipse.jdt.core.compiler.compliance=17 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=11 +org.eclipse.jdt.core.compiler.source=17 diff --git a/bundles/com.e1c.v8codestyle.right/META-INF/MANIFEST.MF b/bundles/com.e1c.v8codestyle.right/META-INF/MANIFEST.MF index ef3094685..289bceacf 100644 --- a/bundles/com.e1c.v8codestyle.right/META-INF/MANIFEST.MF +++ b/bundles/com.e1c.v8codestyle.right/META-INF/MANIFEST.MF @@ -8,12 +8,13 @@ Bundle-Vendor: %providerName Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.18.0,4.0.0)", org.eclipse.emf.ecore;bundle-version="[2.22.0,3.0.0)", org.eclipse.xtext;bundle-version="[2.24.0,3.0.0)", - org.eclipse.core.resources;bundle-version="[3.14.0,4.0.0)" -Bundle-RequiredExecutionEnvironment: JavaSE-11 + org.eclipse.core.resources;bundle-version="[3.14.0,4.0.0)", + com.google.inject;bundle-version="[7.0.0,8.0.0)" +Bundle-RequiredExecutionEnvironment: JavaSE-17 Automatic-Module-Name: com.e1c.v8codestyle.right Bundle-ActivationPolicy: lazy Bundle-Localization: plugin -Import-Package: com._1c.g5.v8.bm.core;version="[8.0.0,9.0.0)", +Import-Package: com._1c.g5.v8.bm.core;version="[9.0.0,10.0.0)", com._1c.g5.v8.bm.core.event;version="[3.0.0,4.0.0)", com._1c.g5.v8.bm.integration;version="[11.0.0,12.0.0)", com._1c.g5.v8.dt.bm.index.emf;version="[8.0.0,9.0.0)", @@ -21,7 +22,7 @@ Import-Package: com._1c.g5.v8.bm.core;version="[8.0.0,9.0.0)", com._1c.g5.v8.dt.common;version="[6.0.0,7.0.0)", com._1c.g5.v8.dt.core.platform;version="[11.0.0,12.0.0)", com._1c.g5.v8.dt.mcore;version="[7.0.0,8.0.0)", - com._1c.g5.v8.dt.md;version="[19.0.0,20.0.0)", + com._1c.g5.v8.dt.md;version="[20.0.0,21.0.0)", com._1c.g5.v8.dt.metadata.mdclass;version="[9.0.0,10.0.0)", com._1c.g5.v8.dt.platform.version;version="[2.0.0,3.0.0)", com._1c.g5.v8.dt.rights;version="[7.0.0,8.0.0)", @@ -33,6 +34,5 @@ Import-Package: com._1c.g5.v8.bm.core;version="[8.0.0,9.0.0)", com.e1c.g5.v8.dt.check.components;version="[2.0.0,3.0.0)", com.e1c.g5.v8.dt.check.context;version="[2.0.0,3.0.0)", com.e1c.g5.v8.dt.check.ext;version="[1.0.0,2.0.0)", - com.e1c.g5.v8.dt.check.settings;version="[3.0.0,4.0.0)", - com.e1c.v8codestyle.check;version="[0.7.0,0.8.0)", - com.google.inject;version="[5.0.1,6.0.0)" + com.e1c.g5.v8.dt.check.settings;version="[4.0.0,5.0.0)", + com.e1c.v8codestyle.check;version="[0.7.0,0.8.0)" diff --git a/bundles/com.e1c.v8codestyle.ui/.classpath b/bundles/com.e1c.v8codestyle.ui/.classpath index e801ebfb4..81fe078c2 100644 --- a/bundles/com.e1c.v8codestyle.ui/.classpath +++ b/bundles/com.e1c.v8codestyle.ui/.classpath @@ -1,6 +1,6 @@ - + diff --git a/bundles/com.e1c.v8codestyle.ui/.settings/org.eclipse.jdt.core.prefs b/bundles/com.e1c.v8codestyle.ui/.settings/org.eclipse.jdt.core.prefs index 34feba4dd..ab5e755ff 100644 --- a/bundles/com.e1c.v8codestyle.ui/.settings/org.eclipse.jdt.core.prefs +++ b/bundles/com.e1c.v8codestyle.ui/.settings/org.eclipse.jdt.core.prefs @@ -1,10 +1,10 @@ eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 -org.eclipse.jdt.core.compiler.compliance=11 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 +org.eclipse.jdt.core.compiler.compliance=17 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=11 +org.eclipse.jdt.core.compiler.source=17 diff --git a/bundles/com.e1c.v8codestyle.ui/META-INF/MANIFEST.MF b/bundles/com.e1c.v8codestyle.ui/META-INF/MANIFEST.MF index f611897ec..55ada2c80 100644 --- a/bundles/com.e1c.v8codestyle.ui/META-INF/MANIFEST.MF +++ b/bundles/com.e1c.v8codestyle.ui/META-INF/MANIFEST.MF @@ -13,8 +13,9 @@ Require-Bundle: org.eclipse.ui;bundle-version="[3.119.0,4.0.0)", org.eclipse.emf.ecore;bundle-version="[2.23.0,3.0.0)", org.eclipse.jface.databinding;bundle-version="[1.12.200,2.0.0)", org.eclipse.ui.forms;bundle-version="[3.11.100,4.0.0)", - org.eclipse.emf.databinding;bundle-version="[1.5.0,2.0.0)" -Bundle-RequiredExecutionEnvironment: JavaSE-11 + org.eclipse.emf.databinding;bundle-version="[1.5.0,2.0.0)", + com.google.inject;bundle-version="[7.0.0,8.0.0)" +Bundle-RequiredExecutionEnvironment: JavaSE-17 Automatic-Module-Name: com.e1c.v8codestyle.ui Bundle-ActivationPolicy: lazy Import-Package: com._1c.g5.v8.dt.common;version="[6.4.0,7.0.0)", @@ -22,5 +23,4 @@ Import-Package: com._1c.g5.v8.dt.common;version="[6.4.0,7.0.0)", com._1c.g5.v8.dt.ui.wizards;version="[8.1.0,9.0.0)", com._1c.g5.wiring;version="[2.2.0,3.0.0)", com._1c.g5.wiring.binder;version="[1.1.0,2.0.0)", - com.e1c.v8codestyle;version="[0.7.0,0.8.0)", - com.google.inject;version="[5.0.1,6.0.0)" + com.e1c.v8codestyle;version="[0.7.0,0.8.0)" diff --git a/bundles/com.e1c.v8codestyle/.classpath b/bundles/com.e1c.v8codestyle/.classpath index e801ebfb4..81fe078c2 100644 --- a/bundles/com.e1c.v8codestyle/.classpath +++ b/bundles/com.e1c.v8codestyle/.classpath @@ -1,6 +1,6 @@ - + diff --git a/bundles/com.e1c.v8codestyle/.settings/org.eclipse.jdt.core.prefs b/bundles/com.e1c.v8codestyle/.settings/org.eclipse.jdt.core.prefs index 64d1838c8..6d3ed858f 100644 --- a/bundles/com.e1c.v8codestyle/.settings/org.eclipse.jdt.core.prefs +++ b/bundles/com.e1c.v8codestyle/.settings/org.eclipse.jdt.core.prefs @@ -1,8 +1,8 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 -org.eclipse.jdt.core.compiler.compliance=11 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 +org.eclipse.jdt.core.compiler.compliance=17 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning -org.eclipse.jdt.core.compiler.source=11 +org.eclipse.jdt.core.compiler.source=17 diff --git a/bundles/com.e1c.v8codestyle/META-INF/MANIFEST.MF b/bundles/com.e1c.v8codestyle/META-INF/MANIFEST.MF index 4bdb32336..ce8d59758 100644 --- a/bundles/com.e1c.v8codestyle/META-INF/MANIFEST.MF +++ b/bundles/com.e1c.v8codestyle/META-INF/MANIFEST.MF @@ -7,19 +7,18 @@ Bundle-Activator: com.e1c.v8codestyle.internal.CorePlugin Bundle-Vendor: %providerName Bundle-Localization: plugin Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.18.0,4.0.0)", - org.eclipse.core.resources;bundle-version="[3.14.0,4.0.0)" -Bundle-RequiredExecutionEnvironment: JavaSE-11 + org.eclipse.core.resources;bundle-version="[3.14.0,4.0.0)", + com.google.inject;bundle-version="[7.0.0,8.0.0)" +Bundle-RequiredExecutionEnvironment: JavaSE-17 Automatic-Module-Name: com.e1c.v8codestyle Bundle-ActivationPolicy: lazy -Import-Package: com._1c.g5.v8.bm.core;version="[8.0.0,9.0.0)", +Import-Package: com._1c.g5.v8.bm.core;version="[9.0.0,10.0.0)", com._1c.g5.v8.dt.common;version="[6.0.0,7.0.0)", com._1c.g5.wiring;version="[2.2.0,3.0.0)", com._1c.g5.wiring.binder;version="[1.1.0,2.0.0)", com.e1c.g5.v8.dt.check;version="[2.0.0,3.0.0)", com.e1c.g5.v8.dt.check.components;version="[2.0.0,3.0.0)", com.e1c.g5.v8.dt.check.ext;version="1.0.0", - com.e1c.g5.v8.dt.check.settings;version="1.0.0", - com.google.inject;version="[5.0.1,6.0.0)", - com.google.inject.binder;version="[5.0.1,6.0.0)" + com.e1c.g5.v8.dt.check.settings;version="1.0.0" Export-Package: com.e1c.v8codestyle;version="0.7.0", com.e1c.v8codestyle.check;version="0.7.0" diff --git a/bundles/com.e1c.v8codestyle/plugin.launch b/bundles/com.e1c.v8codestyle/plugin.launch index 6242cf777..f65c1e15b 100644 --- a/bundles/com.e1c.v8codestyle/plugin.launch +++ b/bundles/com.e1c.v8codestyle/plugin.launch @@ -20,7 +20,7 @@ - + diff --git a/docs/.classpath b/docs/.classpath index 7ffd68b68..a730c5d7c 100644 --- a/docs/.classpath +++ b/docs/.classpath @@ -1,6 +1,6 @@ - + diff --git a/docs/.settings/org.eclipse.jdt.core.prefs b/docs/.settings/org.eclipse.jdt.core.prefs index f2525a8b9..8c9943d50 100644 --- a/docs/.settings/org.eclipse.jdt.core.prefs +++ b/docs/.settings/org.eclipse.jdt.core.prefs @@ -1,8 +1,8 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=11 +org.eclipse.jdt.core.compiler.compliance=17 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate @@ -11,4 +11,4 @@ org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=11 +org.eclipse.jdt.core.compiler.source=17 diff --git a/docs/META-INF/MANIFEST.MF b/docs/META-INF/MANIFEST.MF index e3b821199..572239f8f 100644 --- a/docs/META-INF/MANIFEST.MF +++ b/docs/META-INF/MANIFEST.MF @@ -5,5 +5,5 @@ Bundle-SymbolicName: com.e1c.v8codestyle.docs;singleton:=true Bundle-Version: 0.7.0.qualifier Bundle-Vendor: %providerName Automatic-Module-Name: com.e1c.v8codestyle.docs -Bundle-RequiredExecutionEnvironment: JavaSE-11 +Bundle-RequiredExecutionEnvironment: JavaSE-17 Bundle-Localization: plugin diff --git a/pom.xml b/pom.xml index 910fb539e..f0d2af22a 100644 --- a/pom.xml +++ b/pom.xml @@ -58,9 +58,14 @@ eclipse-plugin - org.eclipse.equinox.ds + org.apache.felix.scr 0.0.0 + + eclipse-plugin + org.apache.aries.spifly.dynamic.bundle + 1.3.7 + @@ -68,5 +73,4 @@ - diff --git a/targets/default/default.target b/targets/default/default.target index 8072d8776..78a3ca050 100644 --- a/targets/default/default.target +++ b/targets/default/default.target @@ -13,102 +13,16 @@ - - - - - - - - - - - - - - - - - - - - - - + - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -122,14 +36,19 @@ - + - - + + + + + + + diff --git a/targets/develop/develop.target b/targets/develop/develop.target index 5683b1210..a015411f8 100644 --- a/targets/develop/develop.target +++ b/targets/develop/develop.target @@ -80,7 +80,7 @@ - + @@ -96,6 +96,7 @@ + @@ -149,7 +150,34 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/com.e1c.v8codestyle.autosort.itests/.classpath b/tests/com.e1c.v8codestyle.autosort.itests/.classpath index e801ebfb4..81fe078c2 100644 --- a/tests/com.e1c.v8codestyle.autosort.itests/.classpath +++ b/tests/com.e1c.v8codestyle.autosort.itests/.classpath @@ -1,6 +1,6 @@ - + diff --git a/tests/com.e1c.v8codestyle.autosort.itests/.settings/org.eclipse.jdt.core.prefs b/tests/com.e1c.v8codestyle.autosort.itests/.settings/org.eclipse.jdt.core.prefs index 65d12a17c..2c8550f44 100644 --- a/tests/com.e1c.v8codestyle.autosort.itests/.settings/org.eclipse.jdt.core.prefs +++ b/tests/com.e1c.v8codestyle.autosort.itests/.settings/org.eclipse.jdt.core.prefs @@ -1,10 +1,10 @@ eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 -org.eclipse.jdt.core.compiler.compliance=11 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 +org.eclipse.jdt.core.compiler.compliance=17 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=11 +org.eclipse.jdt.core.compiler.source=17 diff --git a/tests/com.e1c.v8codestyle.autosort.itests/META-INF/MANIFEST.MF b/tests/com.e1c.v8codestyle.autosort.itests/META-INF/MANIFEST.MF index a37bfe5a3..4a8ab0f14 100644 --- a/tests/com.e1c.v8codestyle.autosort.itests/META-INF/MANIFEST.MF +++ b/tests/com.e1c.v8codestyle.autosort.itests/META-INF/MANIFEST.MF @@ -6,7 +6,7 @@ Bundle-Version: 0.7.0.qualifier Bundle-Vendor: %providerName Fragment-Host: com.e1c.v8codestyle.autosort;bundle-version="[0.7.0,0.8.0)" Automatic-Module-Name: com.e1c.v8codestyle.autosort.itests -Bundle-RequiredExecutionEnvironment: JavaSE-11 +Bundle-RequiredExecutionEnvironment: JavaSE-17 Bundle-Localization: fragment Import-Package: com._1c.g5.v8.dt.platform.version;version="[2.14.0,3.0.0)", com._1c.g5.v8.dt.testing;version="[3.1.0,4.0.0)", diff --git a/tests/com.e1c.v8codestyle.bsl.itests/.classpath b/tests/com.e1c.v8codestyle.bsl.itests/.classpath index e801ebfb4..81fe078c2 100644 --- a/tests/com.e1c.v8codestyle.bsl.itests/.classpath +++ b/tests/com.e1c.v8codestyle.bsl.itests/.classpath @@ -1,6 +1,6 @@ - + diff --git a/tests/com.e1c.v8codestyle.bsl.itests/.settings/org.eclipse.jdt.core.prefs b/tests/com.e1c.v8codestyle.bsl.itests/.settings/org.eclipse.jdt.core.prefs index 0249a552c..a1bbcc4c7 100644 --- a/tests/com.e1c.v8codestyle.bsl.itests/.settings/org.eclipse.jdt.core.prefs +++ b/tests/com.e1c.v8codestyle.bsl.itests/.settings/org.eclipse.jdt.core.prefs @@ -1,10 +1,10 @@ eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 -org.eclipse.jdt.core.compiler.compliance=11 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 +org.eclipse.jdt.core.compiler.compliance=17 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=11 +org.eclipse.jdt.core.compiler.source=17 diff --git a/tests/com.e1c.v8codestyle.bsl.itests/META-INF/MANIFEST.MF b/tests/com.e1c.v8codestyle.bsl.itests/META-INF/MANIFEST.MF index 0dcc6c0a8..171cc9679 100644 --- a/tests/com.e1c.v8codestyle.bsl.itests/META-INF/MANIFEST.MF +++ b/tests/com.e1c.v8codestyle.bsl.itests/META-INF/MANIFEST.MF @@ -6,15 +6,13 @@ Bundle-Version: 0.7.0.qualifier Bundle-Vendor: %providerName Fragment-Host: com.e1c.v8codestyle.bsl;bundle-version="[0.7.0,0.8.0)" Automatic-Module-Name: com.e1c.v8codestyle.md.itests -Bundle-RequiredExecutionEnvironment: JavaSE-11 +Bundle-RequiredExecutionEnvironment: JavaSE-17 Bundle-Localization: fragment Import-Package: com._1c.g5.v8.dt.core.naming;version="[7.0.0,8.0.0)", com._1c.g5.v8.dt.core.platform;version="[11.0.0,12.0.0)", com._1c.g5.v8.dt.form.model;version="[11.0.0,12.0.0)", com._1c.g5.v8.dt.md.naming;version="[5.1.0,6.0.0)", com._1c.g5.v8.dt.testing;version="[3.1.0,4.0.0)", - com._1c.g5.v8.dt.ui.util;version="[7.0.0,8.0.0)", - com._1c.g5.v8.dt.ui.validation;version="[5.0.0,6.0.0)", - com._1c.g5.v8.dt.validation.marker;version="[8.0.0,9.0.0)", + com._1c.g5.v8.dt.validation.marker;version="[9.0.0,10.0.0)", com.e1c.g5.v8.dt.testing.check;version="[1.0.0,2.0.0)", org.junit;version="[4.13.0,5.0.0)" diff --git a/tests/com.e1c.v8codestyle.bsl.itests/resources/strict/constructor-function-return-section.bsl b/tests/com.e1c.v8codestyle.bsl.itests/resources/strict/constructor-function-return-section.bsl index 1f36fed33..96254f6b4 100644 --- a/tests/com.e1c.v8codestyle.bsl.itests/resources/strict/constructor-function-return-section.bsl +++ b/tests/com.e1c.v8codestyle.bsl.itests/resources/strict/constructor-function-return-section.bsl @@ -41,5 +41,15 @@ Function CorrectCheckForCommonModule() Export return new Structure("Key1, Key2", 10, CommonModule); EndFunction +// Returns: +// Structure - complaint: +// * Ref - CatalogRef - +Function CorrectCheckForTypeSets() Export + EmptyRef = Catalogs.Catalog1.EmptyRef(); + Str = Новый Structure; + Str.Вставить("Ref", EmptyRef); + Возврат Str; +EndFunction + diff --git a/tests/com.e1c.v8codestyle.bsl.itests/src/com/e1c/v8codestyle/bsl/check/itests/NotifyDescriptionToServerProcedureCheck3Test.java b/tests/com.e1c.v8codestyle.bsl.itests/src/com/e1c/v8codestyle/bsl/check/itests/NotifyDescriptionToServerProcedureCheck3Test.java new file mode 100644 index 000000000..fea86c25c --- /dev/null +++ b/tests/com.e1c.v8codestyle.bsl.itests/src/com/e1c/v8codestyle/bsl/check/itests/NotifyDescriptionToServerProcedureCheck3Test.java @@ -0,0 +1,100 @@ +/******************************************************************************* + * Copyright (C) 2024, 1C-Soft LLC and others. + * + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * 1C-Soft LLC - initial API and implementation + *******************************************************************************/ +package com.e1c.v8codestyle.bsl.check.itests; + +import static org.junit.Assert.assertEquals; + +import java.util.List; +import java.util.stream.Collectors; + +import org.eclipse.core.resources.IProject; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.Path; +import org.junit.Test; + +import com._1c.g5.v8.dt.validation.marker.IExtraInfoKeys; +import com._1c.g5.v8.dt.validation.marker.Marker; +import com.e1c.g5.v8.dt.testing.check.SingleProjectReadOnlyCheckTestBase; +import com.e1c.v8codestyle.bsl.check.NotifyDescriptionToServerProcedureCheck; +import com.e1c.v8codestyle.internal.bsl.BslPlugin; + +/** + * The test of {@link NotifyDescriptionToServerProcedureCheck} check. + * + * @author Dzyuba_M + */ +public class NotifyDescriptionToServerProcedureCheck3Test + extends SingleProjectReadOnlyCheckTestBase +{ + private static final String CHECK_ID = "notify-description-to-server-procedure"; //$NON-NLS-1$ + private static final String PROJECT_NAME = "ExtensionNotifyDescriptionToServerProcedureCheck"; + private static final String PROJECT_EXTENSION_NAME = "ExtensionNotifyDescriptionToServerProcedureCheck_Extension"; + + /** + * Test notify description to common module server procedure. + * + * @throws Exception the exception + */ + @Test + public void testCommonModuleServerProcedure() throws Exception + { + List markers = getModuleMarkers(); + assertEquals(2, markers.size()); + + Marker marker = markers.get(0); + assertEquals("11", marker.getExtraInfo().get(IExtraInfoKeys.TEXT_EXTRA_INFO_LINE_KEY)); + + marker = markers.get(1); + assertEquals("21", marker.getExtraInfo().get(IExtraInfoKeys.TEXT_EXTRA_INFO_LINE_KEY)); + } + + @Override + public void setUp() throws CoreException + { + IProject project = testingWorkspace.getProject(PROJECT_NAME); + if (!project.exists() || !project.isAccessible()) + { + try + { + testingWorkspace.cleanUpWorkspace(); + openProjectAndWaitForValidationFinish(PROJECT_NAME); + } + catch (CoreException e) + { + BslPlugin.logError(e); + } + } + super.setUp(); + } + + @Override + protected String getTestConfigurationName() + { + return PROJECT_EXTENSION_NAME; + } + + private String getModuleFileName() + { + return "/src/Catalogs/Справочник1/Forms/ФормаЭлемента/Module.bsl"; //$NON-NLS-1$ + } + + private List getModuleMarkers() + { + String moduleId = Path.ROOT.append(getTestConfigurationName()).append(getModuleFileName()).toString(); + List markers = List.of(markerManager.getMarkers(getProject().getWorkspaceProject(), moduleId)); + + return markers.stream() + .filter(marker -> CHECK_ID.equals(getCheckIdFromMarker(marker, getProject()))) + .collect(Collectors.toList()); + } +} diff --git a/tests/com.e1c.v8codestyle.bsl.itests/src/com/e1c/v8codestyle/bsl/fix/itests/ConsecutiveEmptyLinesFixTest.java b/tests/com.e1c.v8codestyle.bsl.itests/src/com/e1c/v8codestyle/bsl/fix/itests/ConsecutiveEmptyLinesFixTest.java index 78528cdfb..e9b5e0da6 100644 --- a/tests/com.e1c.v8codestyle.bsl.itests/src/com/e1c/v8codestyle/bsl/fix/itests/ConsecutiveEmptyLinesFixTest.java +++ b/tests/com.e1c.v8codestyle.bsl.itests/src/com/e1c/v8codestyle/bsl/fix/itests/ConsecutiveEmptyLinesFixTest.java @@ -16,14 +16,8 @@ import org.junit.Test; import com._1c.g5.v8.bm.core.IBmObject; -import com._1c.g5.v8.dt.core.naming.ISymbolicLinkLocalizer; import com._1c.g5.v8.dt.core.platform.IDtProject; -import com._1c.g5.v8.dt.core.platform.IV8ProjectManager; -import com._1c.g5.v8.dt.md.naming.MdSymbolicLinkLocalizer; import com._1c.g5.v8.dt.metadata.mdclass.CommonModule; -import com._1c.g5.v8.dt.ui.util.OpenHelper; -import com._1c.g5.v8.dt.ui.validation.BmMarkerWrapper; -import com._1c.g5.v8.dt.validation.marker.IMarkerWrapper; import com._1c.g5.v8.dt.validation.marker.Marker; import com._1c.g5.wiring.ServiceAccess; import com.e1c.g5.v8.dt.check.qfix.FixProcessHandle; @@ -47,9 +41,6 @@ public class ConsecutiveEmptyLinesFixTest private static final String DESCRIPTION = "Clear extra empty lines"; private static final String COMMON_MODULE_FILE_NAME = "/src/CommonModules/CommonModule/Module.bsl"; private IFixManager fixManager = ServiceAccess.get(IFixManager.class); - private IV8ProjectManager projectManager = ServiceAccess.get(IV8ProjectManager.class); - private ISymbolicLinkLocalizer symbolicLinkLocalizer = new MdSymbolicLinkLocalizer(); - private final OpenHelper openHelper = new OpenHelper(); //after fixing the problem in EDT - delete it @Ignore @@ -96,10 +87,7 @@ public void testApplyFix() throws Exception */ private void applyFix(Marker marker, IDtProject dtProject) { - IMarkerWrapper markerWrapper = new BmMarkerWrapper(marker, dtProject.getWorkspaceProject(), bmModelManager, - projectManager, symbolicLinkLocalizer, openHelper); - - FixProcessHandle handle = fixManager.prepareFix(markerWrapper, dtProject); + FixProcessHandle handle = fixManager.prepareFix(marker, dtProject); FixVariantDescriptor variantDescr = null; diff --git a/tests/com.e1c.v8codestyle.bsl.itests/src/com/e1c/v8codestyle/bsl/strict/check/itests/CommonModuleStrictTypesTest.java b/tests/com.e1c.v8codestyle.bsl.itests/src/com/e1c/v8codestyle/bsl/strict/check/itests/CommonModuleStrictTypesTest.java index a8ae4b393..6e372bb06 100644 --- a/tests/com.e1c.v8codestyle.bsl.itests/src/com/e1c/v8codestyle/bsl/strict/check/itests/CommonModuleStrictTypesTest.java +++ b/tests/com.e1c.v8codestyle.bsl.itests/src/com/e1c/v8codestyle/bsl/strict/check/itests/CommonModuleStrictTypesTest.java @@ -387,8 +387,8 @@ public void testFunctionCtorReturnSectionCheck() throws Exception Module module = updateAndGetModule(checkId); - List finctions = EcoreUtil2.eAllOfType(module, Function.class); - assertEquals(4, finctions.size()); + List functions = EcoreUtil2.eAllOfType(module, Function.class); + assertEquals(5, functions.size()); List markers = getMarters(checkId, module); diff --git a/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck/.project b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck/.project new file mode 100644 index 000000000..dd641b175 --- /dev/null +++ b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck/.project @@ -0,0 +1,18 @@ + + + ExtensionNotifyDescriptionToServerProcedureCheck + + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + + org.eclipse.xtext.ui.shared.xtextNature + com._1c.g5.v8.dt.core.V8ConfigurationNature + + diff --git a/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck/.settings/com.e1c.v8codestyle.autosort.prefs b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck/.settings/com.e1c.v8codestyle.autosort.prefs new file mode 100644 index 000000000..23b062502 --- /dev/null +++ b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck/.settings/com.e1c.v8codestyle.autosort.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +topObjects=true diff --git a/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck/.settings/com.e1c.v8codestyle.bsl.prefs b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck/.settings/com.e1c.v8codestyle.bsl.prefs new file mode 100644 index 000000000..c634a6bd2 --- /dev/null +++ b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck/.settings/com.e1c.v8codestyle.bsl.prefs @@ -0,0 +1,3 @@ +addModuleStrictTypesAnnotation=true +createModuleStructure=true +eclipse.preferences.version=1 diff --git a/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck/.settings/com.e1c.v8codestyle.prefs b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck/.settings/com.e1c.v8codestyle.prefs new file mode 100644 index 000000000..9e9b57e54 --- /dev/null +++ b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck/.settings/com.e1c.v8codestyle.prefs @@ -0,0 +1,3 @@ +commonChecks=true +eclipse.preferences.version=1 +standardChecks=true diff --git a/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck/.settings/org.eclipse.core.resources.prefs b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 000000000..99f26c020 --- /dev/null +++ b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck/DT-INF/PROJECT.PMF b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck/DT-INF/PROJECT.PMF new file mode 100644 index 000000000..dd3575409 --- /dev/null +++ b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck/DT-INF/PROJECT.PMF @@ -0,0 +1,2 @@ +Manifest-Version: 1.0 +Runtime-Version: 8.3.23 diff --git "a/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck/src/Catalogs/\320\241\320\277\321\200\320\260\320\262\320\276\321\207\320\275\320\270\320\2721/Forms/\320\244\320\276\321\200\320\274\320\260\320\255\320\273\320\265\320\274\320\265\320\275\321\202\320\260/Form.form" "b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck/src/Catalogs/\320\241\320\277\321\200\320\260\320\262\320\276\321\207\320\275\320\270\320\2721/Forms/\320\244\320\276\321\200\320\274\320\260\320\255\320\273\320\265\320\274\320\265\320\275\321\202\320\260/Form.form" new file mode 100644 index 000000000..27f221b7e --- /dev/null +++ "b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck/src/Catalogs/\320\241\320\277\321\200\320\260\320\262\320\276\321\207\320\275\320\270\320\2721/Forms/\320\244\320\276\321\200\320\274\320\260\320\255\320\273\320\265\320\274\320\265\320\275\321\202\320\260/Form.form" @@ -0,0 +1,144 @@ + + + + Код + 1 + true + true + + true + + + Объект.Code + + + КодРасширеннаяПодсказка + 3 + true + true + + true + + Label + true + true + + Left + + + + КодКонтекстноеМеню + 2 + true + true + + true + + true + + InputField + EnterOnInput + true + Left + true + + true + true + true + true + true + true + + + + Наименование + 4 + true + true + + true + + + Объект.Description + + + НаименованиеРасширеннаяПодсказка + 6 + true + true + + true + + Label + true + true + + Left + + + + НаименованиеКонтекстноеМеню + 5 + true + true + + true + + true + + InputField + EnterOnInput + true + Left + true + + true + true + true + true + true + true + + + + ФормаКоманднаяПанель + -1 + true + true + + true + + Left + true + + LockOwnerWindow + true + true + true + Vertical + true + true + true + true + true + + Объект + 1 + + CatalogObject.Справочник1 + + + true + + + true + +
true
+ true +
+ + + + + +
diff --git "a/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck/src/Catalogs/\320\241\320\277\321\200\320\260\320\262\320\276\321\207\320\275\320\270\320\2721/Forms/\320\244\320\276\321\200\320\274\320\260\320\255\320\273\320\265\320\274\320\265\320\275\321\202\320\260/Module.bsl" "b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck/src/Catalogs/\320\241\320\277\321\200\320\260\320\262\320\276\321\207\320\275\320\270\320\2721/Forms/\320\244\320\276\321\200\320\274\320\260\320\255\320\273\320\265\320\274\320\265\320\275\321\202\320\260/Module.bsl" new file mode 100644 index 000000000..cc438fe0a --- /dev/null +++ "b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck/src/Catalogs/\320\241\320\277\321\200\320\260\320\262\320\276\321\207\320\275\320\270\320\2721/Forms/\320\244\320\276\321\200\320\274\320\260\320\255\320\273\320\265\320\274\320\265\320\275\321\202\320\260/Module.bsl" @@ -0,0 +1,19 @@ + +#Область ОбработчикиСобытийЭлементовШапкиФормы + +&НаКлиенте +Процедура КодПриИзменении(Элемент) + +КонецПроцедуры + + +&НаКлиенте +Процедура НаименованиеПриИзменении(Элемент) + Сообщить(1); +КонецПроцедуры +#КонецОбласти + +&НаКлиенте +Процедура дляОписания(первый, второй) Экспорт + Сообщить(1); +КонецПроцедуры diff --git "a/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck/src/Catalogs/\320\241\320\277\321\200\320\260\320\262\320\276\321\207\320\275\320\270\320\2721/ManagerModule.bsl" "b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck/src/Catalogs/\320\241\320\277\321\200\320\260\320\262\320\276\321\207\320\275\320\270\320\2721/ManagerModule.bsl" new file mode 100644 index 000000000..abf5df57d --- /dev/null +++ "b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck/src/Catalogs/\320\241\320\277\321\200\320\260\320\262\320\276\321\207\320\275\320\270\320\2721/ManagerModule.bsl" @@ -0,0 +1,30 @@ +// @strict-types + + +#Если Сервер Или ТолстыйКлиентОбычноеПриложение Или ВнешнееСоединение Тогда + +#Область ПрограммныйИнтерфейс + +// Код процедур и функций + +#КонецОбласти + +#Область ОбработчикиСобытий + +// Код процедур и функций + +#КонецОбласти + +#Область СлужебныйПрограммныйИнтерфейс + +// Код процедур и функций + +#КонецОбласти + +#Область СлужебныеПроцедурыИФункции + +// Код процедур и функций + +#КонецОбласти + +#КонецЕсли diff --git "a/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck/src/Catalogs/\320\241\320\277\321\200\320\260\320\262\320\276\321\207\320\275\320\270\320\2721/ObjectModule.bsl" "b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck/src/Catalogs/\320\241\320\277\321\200\320\260\320\262\320\276\321\207\320\275\320\270\320\2721/ObjectModule.bsl" new file mode 100644 index 000000000..47325e532 --- /dev/null +++ "b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck/src/Catalogs/\320\241\320\277\321\200\320\260\320\262\320\276\321\207\320\275\320\270\320\2721/ObjectModule.bsl" @@ -0,0 +1,38 @@ +// @strict-types + + +#Если Сервер Или ТолстыйКлиентОбычноеПриложение Или ВнешнееСоединение Тогда + +#Область ОписаниеПеременных + +#КонецОбласти + +#Область ПрограммныйИнтерфейс + +// Код процедур и функций + +#КонецОбласти + +#Область ОбработчикиСобытий + +// Код процедур и функций + +#КонецОбласти + +#Область СлужебныйПрограммныйИнтерфейс + +// Код процедур и функций + +#КонецОбласти + +#Область СлужебныеПроцедурыИФункции + +// Код процедур и функций + +#КонецОбласти + +#Область Инициализация + +#КонецОбласти + +#КонецЕсли diff --git "a/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck/src/Catalogs/\320\241\320\277\321\200\320\260\320\262\320\276\321\207\320\275\320\270\320\2721/\320\241\320\277\321\200\320\260\320\262\320\276\321\207\320\275\320\270\320\2721.mdo" "b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck/src/Catalogs/\320\241\320\277\321\200\320\260\320\262\320\276\321\207\320\275\320\270\320\2721/\320\241\320\277\321\200\320\260\320\262\320\276\321\207\320\275\320\270\320\2721.mdo" new file mode 100644 index 000000000..a8b27aee1 --- /dev/null +++ "b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck/src/Catalogs/\320\241\320\277\321\200\320\260\320\262\320\276\321\207\320\275\320\270\320\2721/\320\241\320\277\321\200\320\260\320\262\320\276\321\207\320\275\320\270\320\2721.mdo" @@ -0,0 +1,43 @@ + + + + + + + + + + Справочник1 + + ru + Справочник1 + + true + Catalog.Справочник1.StandardAttribute.Code + Catalog.Справочник1.StandardAttribute.Description + DontUse + Use + Managed + Use + 2 + true + 9 + 25 + String + Variable + true + true + AsDescription + InDialog + BothWays + Catalog.Справочник1.Form.ФормаЭлемента + + ФормаЭлемента + + ru + Форма элемента + + PersonalComputer + MobileDevice + + diff --git "a/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck/src/CommonModules/\320\236\320\261\321\211\320\270\320\271\320\234\320\276\320\264\321\203\320\273\321\2141/Module.bsl" "b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck/src/CommonModules/\320\236\320\261\321\211\320\270\320\271\320\234\320\276\320\264\321\203\320\273\321\2141/Module.bsl" new file mode 100644 index 000000000..8c63a9f51 --- /dev/null +++ "b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck/src/CommonModules/\320\236\320\261\321\211\320\270\320\271\320\234\320\276\320\264\321\203\320\273\321\2141/Module.bsl" @@ -0,0 +1,15 @@ +// Проверка формы. +// +// Параметры: +// Форма - см. Справочник.Справочник1.Форма.ФормаЭлемента +Процедура проверкаФормы(Форма) Экспорт + Форма.дляОписания(1, 2); +КонецПроцедуры + +Процедура ДляВызоваИзОписанияОповещения(первый, второй) Экспорт + Сообщить("метод = ДляВызоваИзОписанияОповещения"); +КонецПроцедуры + +Процедура ДляВызоваИзОписанияОповещенияНеЭкспорт(первый, второй) + Сообщить("метод = ДляВызоваИзОписанияОповещения"); +КонецПроцедуры \ No newline at end of file diff --git "a/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck/src/CommonModules/\320\236\320\261\321\211\320\270\320\271\320\234\320\276\320\264\321\203\320\273\321\2141/\320\236\320\261\321\211\320\270\320\271\320\234\320\276\320\264\321\203\320\273\321\2141.mdo" "b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck/src/CommonModules/\320\236\320\261\321\211\320\270\320\271\320\234\320\276\320\264\321\203\320\273\321\2141/\320\236\320\261\321\211\320\270\320\271\320\234\320\276\320\264\321\203\320\273\321\2141.mdo" new file mode 100644 index 000000000..522fb9f86 --- /dev/null +++ "b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck/src/CommonModules/\320\236\320\261\321\211\320\270\320\271\320\234\320\276\320\264\321\203\320\273\321\2141/\320\236\320\261\321\211\320\270\320\271\320\234\320\276\320\264\321\203\320\273\321\2141.mdo" @@ -0,0 +1,9 @@ + + + ОбщийМодуль1 + + ru + Общий модуль1 + + true + diff --git a/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck/src/Configuration/CommandInterface.cmi b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck/src/Configuration/CommandInterface.cmi new file mode 100644 index 000000000..0cf6de8a4 --- /dev/null +++ b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck/src/Configuration/CommandInterface.cmi @@ -0,0 +1,2 @@ + + diff --git a/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck/src/Configuration/Configuration.mdo b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck/src/Configuration/Configuration.mdo new file mode 100644 index 000000000..db07ec099 --- /dev/null +++ b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck/src/Configuration/Configuration.mdo @@ -0,0 +1,44 @@ + + + ExtensionNotifyDescriptionToServerProcedureCheck + + ru + Extension notify description to server procedure check + + + + + + + + + 8.3.23 + ManagedApplication + PersonalComputer + Russian + + + true + + + OSBackup + true + + + Language.Русский + Managed + NotAutoFree + DontUse + DontUse + 8.3.23 + + Русский + + ru + Русский + + ru + + CommonModule.ОбщийМодуль1 + Catalog.Справочник1 + diff --git a/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck/src/Configuration/ExternalConnectionModule.bsl b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck/src/Configuration/ExternalConnectionModule.bsl new file mode 100644 index 000000000..b685b1121 --- /dev/null +++ b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck/src/Configuration/ExternalConnectionModule.bsl @@ -0,0 +1,14 @@ +// @strict-types + + +#Область ОбработчикиСобытий + +// Код процедур и функций + +#КонецОбласти + +#Область СлужебныеПроцедурыИФункции + +// Код процедур и функций + +#КонецОбласти diff --git a/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck/src/Configuration/MainSectionCommandInterface.cmi b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck/src/Configuration/MainSectionCommandInterface.cmi new file mode 100644 index 000000000..0cf6de8a4 --- /dev/null +++ b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck/src/Configuration/MainSectionCommandInterface.cmi @@ -0,0 +1,2 @@ + + diff --git a/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck/src/Configuration/ManagedApplicationModule.bsl b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck/src/Configuration/ManagedApplicationModule.bsl new file mode 100644 index 000000000..a03e934b2 --- /dev/null +++ b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck/src/Configuration/ManagedApplicationModule.bsl @@ -0,0 +1,22 @@ +// @strict-types + + +#Область ОписаниеПеременных + +#КонецОбласти + +#Область ОбработчикиСобытий + +// Код процедур и функций + +#КонецОбласти + +#Область СлужебныеПроцедурыИФункции + +// Код процедур и функций + +#КонецОбласти + +#Область Инициализация + +#КонецОбласти diff --git a/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck/src/Configuration/SessionModule.bsl b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck/src/Configuration/SessionModule.bsl new file mode 100644 index 000000000..f695d6636 --- /dev/null +++ b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck/src/Configuration/SessionModule.bsl @@ -0,0 +1,18 @@ +// @strict-types + + +#Если Сервер Или ТолстыйКлиентОбычноеПриложение Или ВнешнееСоединение Тогда + +#Область ОбработчикиСобытий + +// Код процедур и функций + +#КонецОбласти + +#Область СлужебныеПроцедурыИФункции + +// Код процедур и функций + +#КонецОбласти + +#КонецЕсли diff --git a/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck_Extension/.project b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck_Extension/.project new file mode 100644 index 000000000..77fdc4151 --- /dev/null +++ b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck_Extension/.project @@ -0,0 +1,18 @@ + + + ExtensionNotifyDescriptionToServerProcedureCheck_Extension + + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + + org.eclipse.xtext.ui.shared.xtextNature + com._1c.g5.v8.dt.core.V8ExtensionNature + + diff --git a/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck_Extension/.settings/com.e1c.v8codestyle.autosort.prefs b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck_Extension/.settings/com.e1c.v8codestyle.autosort.prefs new file mode 100644 index 000000000..23b062502 --- /dev/null +++ b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck_Extension/.settings/com.e1c.v8codestyle.autosort.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +topObjects=true diff --git a/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck_Extension/.settings/com.e1c.v8codestyle.bsl.prefs b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck_Extension/.settings/com.e1c.v8codestyle.bsl.prefs new file mode 100644 index 000000000..c634a6bd2 --- /dev/null +++ b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck_Extension/.settings/com.e1c.v8codestyle.bsl.prefs @@ -0,0 +1,3 @@ +addModuleStrictTypesAnnotation=true +createModuleStructure=true +eclipse.preferences.version=1 diff --git a/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck_Extension/.settings/com.e1c.v8codestyle.prefs b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck_Extension/.settings/com.e1c.v8codestyle.prefs new file mode 100644 index 000000000..9e9b57e54 --- /dev/null +++ b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck_Extension/.settings/com.e1c.v8codestyle.prefs @@ -0,0 +1,3 @@ +commonChecks=true +eclipse.preferences.version=1 +standardChecks=true diff --git a/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck_Extension/.settings/org.eclipse.core.resources.prefs b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck_Extension/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 000000000..99f26c020 --- /dev/null +++ b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck_Extension/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck_Extension/DT-INF/PROJECT.PMF b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck_Extension/DT-INF/PROJECT.PMF new file mode 100644 index 000000000..f178ade06 --- /dev/null +++ b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck_Extension/DT-INF/PROJECT.PMF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Runtime-Version: 8.3.23 +Base-Project: ExtensionNotifyDescriptionToServerProcedureCheck diff --git "a/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck_Extension/src/Catalogs/\320\241\320\277\321\200\320\260\320\262\320\276\321\207\320\275\320\270\320\2721/Forms/\320\244\320\276\321\200\320\274\320\260\320\255\320\273\320\265\320\274\320\265\320\275\321\202\320\260/BaseForm/Form.form" "b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck_Extension/src/Catalogs/\320\241\320\277\321\200\320\260\320\262\320\276\321\207\320\275\320\270\320\2721/Forms/\320\244\320\276\321\200\320\274\320\260\320\255\320\273\320\265\320\274\320\265\320\275\321\202\320\260/BaseForm/Form.form" new file mode 100644 index 000000000..2d94c5dfb --- /dev/null +++ "b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck_Extension/src/Catalogs/\320\241\320\277\321\200\320\260\320\262\320\276\321\207\320\275\320\270\320\2721/Forms/\320\244\320\276\321\200\320\274\320\260\320\255\320\273\320\265\320\274\320\265\320\275\321\202\320\260/BaseForm/Form.form" @@ -0,0 +1,129 @@ + + + + Код + 1 + true + true + + true + + + Объект.Code + + + КодРасширеннаяПодсказка + 3 + true + true + + true + + Label + true + true + + Left + + + + КодКонтекстноеМеню + 2 + true + true + + true + + true + + InputField + EnterOnInput + true + Left + true + + true + true + true + true + true + true + + + + Наименование + 4 + true + true + + true + + + Объект.Description + + + НаименованиеРасширеннаяПодсказка + 6 + true + true + + true + + Label + true + true + + Left + + + + НаименованиеКонтекстноеМеню + 5 + true + true + + true + + true + + InputField + EnterOnInput + true + Left + true + + true + true + true + true + true + true + + + + ФормаКоманднаяПанель + -1 + true + true + + true + + Left + true + + LockOwnerWindow + true + true + true + Vertical + true + true + true + true + true + + + + + + diff --git "a/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck_Extension/src/Catalogs/\320\241\320\277\321\200\320\260\320\262\320\276\321\207\320\275\320\270\320\2721/Forms/\320\244\320\276\321\200\320\274\320\260\320\255\320\273\320\265\320\274\320\265\320\275\321\202\320\260/Form.form" "b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck_Extension/src/Catalogs/\320\241\320\277\321\200\320\260\320\262\320\276\321\207\320\275\320\270\320\2721/Forms/\320\244\320\276\321\200\320\274\320\260\320\255\320\273\320\265\320\274\320\265\320\275\321\202\320\260/Form.form" new file mode 100644 index 000000000..2d94c5dfb --- /dev/null +++ "b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck_Extension/src/Catalogs/\320\241\320\277\321\200\320\260\320\262\320\276\321\207\320\275\320\270\320\2721/Forms/\320\244\320\276\321\200\320\274\320\260\320\255\320\273\320\265\320\274\320\265\320\275\321\202\320\260/Form.form" @@ -0,0 +1,129 @@ + + + + Код + 1 + true + true + + true + + + Объект.Code + + + КодРасширеннаяПодсказка + 3 + true + true + + true + + Label + true + true + + Left + + + + КодКонтекстноеМеню + 2 + true + true + + true + + true + + InputField + EnterOnInput + true + Left + true + + true + true + true + true + true + true + + + + Наименование + 4 + true + true + + true + + + Объект.Description + + + НаименованиеРасширеннаяПодсказка + 6 + true + true + + true + + Label + true + true + + Left + + + + НаименованиеКонтекстноеМеню + 5 + true + true + + true + + true + + InputField + EnterOnInput + true + Left + true + + true + true + true + true + true + true + + + + ФормаКоманднаяПанель + -1 + true + true + + true + + Left + true + + LockOwnerWindow + true + true + true + Vertical + true + true + true + true + true + + + + + + diff --git "a/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck_Extension/src/Catalogs/\320\241\320\277\321\200\320\260\320\262\320\276\321\207\320\275\320\270\320\2721/Forms/\320\244\320\276\321\200\320\274\320\260\320\255\320\273\320\265\320\274\320\265\320\275\321\202\320\260/Module.bsl" "b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck_Extension/src/Catalogs/\320\241\320\277\321\200\320\260\320\262\320\276\321\207\320\275\320\270\320\2721/Forms/\320\244\320\276\321\200\320\274\320\260\320\255\320\273\320\265\320\274\320\265\320\275\321\202\320\260/Module.bsl" new file mode 100644 index 000000000..cb00d62a6 --- /dev/null +++ "b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck_Extension/src/Catalogs/\320\241\320\277\321\200\320\260\320\262\320\276\321\207\320\275\320\270\320\2721/Forms/\320\244\320\276\321\200\320\274\320\260\320\255\320\273\320\265\320\274\320\265\320\275\321\202\320\260/Module.bsl" @@ -0,0 +1,35 @@ + +#Область ОбработчикиСобытийЭлементовШапкиФормы + +&НаКлиенте +Процедура Расш1_НаименованиеПриИзмененииПосле(Элемент) + + описание = новый ОписаниеОповещения("дляОписания", ЭтотОбъект); + + описание = новый ОписаниеОповещения("дляОписанияИзРасширения", ЭтотОбъект); + + описание = новый ОписаниеОповещения("дляОписанияИзРасширенияНеЭкспорт", ЭтотОбъект); + + описание = новый ОписаниеОповещения("ДляВызоваИзОписанияОповещения", ОбщийМодуль1); + + описание = новый ОписаниеОповещения("ДляВызоваИзОписанияОповещения", ОбщийМодуль1.ЭтотОбъект); + + описание = новый ОписаниеОповещения("СамВРасширенииДляВызоваИзОписанияОповещения", ОбщийМодуль1); + + описание = новый ОписаниеОповещения("СамВРасширенииДляВызоваИзОписанияОповещения", ОбщийМодуль1.ЭтотОбъект); + + описание = новый ОписаниеОповещения("ДляВызоваИзОписанияОповещенияНеЭкспорт", ОбщийМодуль1); +КонецПроцедуры + +#КонецОбласти + + +&НаКлиенте +Процедура дляОписанияИзРасширения() Экспорт + +КонецПроцедуры + +&НаКлиенте +Процедура дляОписанияИзРасширенияНеЭкспорт() + +КонецПроцедуры \ No newline at end of file diff --git "a/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck_Extension/src/Catalogs/\320\241\320\277\321\200\320\260\320\262\320\276\321\207\320\275\320\270\320\2721/\320\241\320\277\321\200\320\260\320\262\320\276\321\207\320\275\320\270\320\2721.mdo" "b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck_Extension/src/Catalogs/\320\241\320\277\321\200\320\260\320\262\320\276\321\207\320\275\320\270\320\2721/\320\241\320\277\321\200\320\260\320\262\320\276\321\207\320\275\320\270\320\2721.mdo" new file mode 100644 index 000000000..10d3ed8f3 --- /dev/null +++ "b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck_Extension/src/Catalogs/\320\241\320\277\321\200\320\260\320\262\320\276\321\207\320\275\320\270\320\2721/\320\241\320\277\321\200\320\260\320\262\320\276\321\207\320\275\320\270\320\2721.mdo" @@ -0,0 +1,25 @@ + + + + + + + + + + Справочник1 + Adopted + + Checked + + true + true + + ФормаЭлемента + Adopted + + Checked +
Extended
+
+
+
diff --git "a/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck_Extension/src/CommonModules/\320\236\320\261\321\211\320\270\320\271\320\234\320\276\320\264\321\203\320\273\321\2141/Module.bsl" "b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck_Extension/src/CommonModules/\320\236\320\261\321\211\320\270\320\271\320\234\320\276\320\264\321\203\320\273\321\2141/Module.bsl" new file mode 100644 index 000000000..e88fecd8c --- /dev/null +++ "b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck_Extension/src/CommonModules/\320\236\320\261\321\211\320\270\320\271\320\234\320\276\320\264\321\203\320\273\321\2141/Module.bsl" @@ -0,0 +1,3 @@ +Процедура СамВРасширенииДляВызоваИзОписанияОповещения(первый, второй) Экспорт + Сообщить("метод = СамВРасширенииДляВызоваИзОписанияОповещения"); +КонецПроцедуры \ No newline at end of file diff --git "a/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck_Extension/src/CommonModules/\320\236\320\261\321\211\320\270\320\271\320\234\320\276\320\264\321\203\320\273\321\2141/\320\236\320\261\321\211\320\270\320\271\320\234\320\276\320\264\321\203\320\273\321\2141.mdo" "b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck_Extension/src/CommonModules/\320\236\320\261\321\211\320\270\320\271\320\234\320\276\320\264\321\203\320\273\321\2141/\320\236\320\261\321\211\320\270\320\271\320\234\320\276\320\264\321\203\320\273\321\2141.mdo" new file mode 100644 index 000000000..f608bce7c --- /dev/null +++ "b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck_Extension/src/CommonModules/\320\236\320\261\321\211\320\270\320\271\320\234\320\276\320\264\321\203\320\273\321\2141/\320\236\320\261\321\211\320\270\320\271\320\234\320\276\320\264\321\203\320\273\321\2141.mdo" @@ -0,0 +1,15 @@ + + + ОбщийМодуль1 + Adopted + + Checked + Checked + Checked + Checked + Checked + Checked + Checked + + true + diff --git a/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck_Extension/src/Configuration/CommandInterface.cmi b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck_Extension/src/Configuration/CommandInterface.cmi new file mode 100644 index 000000000..0cf6de8a4 --- /dev/null +++ b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck_Extension/src/Configuration/CommandInterface.cmi @@ -0,0 +1,2 @@ + + diff --git a/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck_Extension/src/Configuration/Configuration.mdo b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck_Extension/src/Configuration/Configuration.mdo new file mode 100644 index 000000000..68c74b0e2 --- /dev/null +++ b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck_Extension/src/Configuration/Configuration.mdo @@ -0,0 +1,51 @@ + + + ExtensionNotifyDescriptionToServerProcedureCheck_Extension + + ru + Extension notify description to server procedure check extension + + Adopted + + Checked + Checked + Extended + Extended + Extended + Extended + Extended + Checked + Checked + Checked + Extended + Extended + + + + + + + + + true + Расш1_ + 8.3.23 + Customization + ManagedApplication + PersonalComputer + Russian + Role.Расш1_ОсновнаяРоль + Language.Русский + 8.3.23 + + Русский + Adopted + + Checked + + ru + + Role.Расш1_ОсновнаяРоль + CommonModule.ОбщийМодуль1 + Catalog.Справочник1 + diff --git a/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck_Extension/src/Configuration/ExternalConnectionModule.bsl b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck_Extension/src/Configuration/ExternalConnectionModule.bsl new file mode 100644 index 000000000..b685b1121 --- /dev/null +++ b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck_Extension/src/Configuration/ExternalConnectionModule.bsl @@ -0,0 +1,14 @@ +// @strict-types + + +#Область ОбработчикиСобытий + +// Код процедур и функций + +#КонецОбласти + +#Область СлужебныеПроцедурыИФункции + +// Код процедур и функций + +#КонецОбласти diff --git a/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck_Extension/src/Configuration/MainSectionCommandInterface.cmi b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck_Extension/src/Configuration/MainSectionCommandInterface.cmi new file mode 100644 index 000000000..0cf6de8a4 --- /dev/null +++ b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck_Extension/src/Configuration/MainSectionCommandInterface.cmi @@ -0,0 +1,2 @@ + + diff --git a/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck_Extension/src/Configuration/ManagedApplicationModule.bsl b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck_Extension/src/Configuration/ManagedApplicationModule.bsl new file mode 100644 index 000000000..a03e934b2 --- /dev/null +++ b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck_Extension/src/Configuration/ManagedApplicationModule.bsl @@ -0,0 +1,22 @@ +// @strict-types + + +#Область ОписаниеПеременных + +#КонецОбласти + +#Область ОбработчикиСобытий + +// Код процедур и функций + +#КонецОбласти + +#Область СлужебныеПроцедурыИФункции + +// Код процедур и функций + +#КонецОбласти + +#Область Инициализация + +#КонецОбласти diff --git a/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck_Extension/src/Configuration/SessionModule.bsl b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck_Extension/src/Configuration/SessionModule.bsl new file mode 100644 index 000000000..f695d6636 --- /dev/null +++ b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck_Extension/src/Configuration/SessionModule.bsl @@ -0,0 +1,18 @@ +// @strict-types + + +#Если Сервер Или ТолстыйКлиентОбычноеПриложение Или ВнешнееСоединение Тогда + +#Область ОбработчикиСобытий + +// Код процедур и функций + +#КонецОбласти + +#Область СлужебныеПроцедурыИФункции + +// Код процедур и функций + +#КонецОбласти + +#КонецЕсли diff --git "a/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck_Extension/src/Roles/\320\240\320\260\321\201\321\2101_\320\236\321\201\320\275\320\276\320\262\320\275\320\260\321\217\320\240\320\276\320\273\321\214/Rights.rights" "b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck_Extension/src/Roles/\320\240\320\260\321\201\321\2101_\320\236\321\201\320\275\320\276\320\262\320\275\320\260\321\217\320\240\320\276\320\273\321\214/Rights.rights" new file mode 100644 index 000000000..11a60b5ae --- /dev/null +++ "b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck_Extension/src/Roles/\320\240\320\260\321\201\321\2101_\320\236\321\201\320\275\320\276\320\262\320\275\320\260\321\217\320\240\320\276\320\273\321\214/Rights.rights" @@ -0,0 +1,6 @@ + + + true + true + false + diff --git "a/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck_Extension/src/Roles/\320\240\320\260\321\201\321\2101_\320\236\321\201\320\275\320\276\320\262\320\275\320\260\321\217\320\240\320\276\320\273\321\214/\320\240\320\260\321\201\321\2101_\320\236\321\201\320\275\320\276\320\262\320\275\320\260\321\217\320\240\320\276\320\273\321\214.mdo" "b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck_Extension/src/Roles/\320\240\320\260\321\201\321\2101_\320\236\321\201\320\275\320\276\320\262\320\275\320\260\321\217\320\240\320\276\320\273\321\214/\320\240\320\260\321\201\321\2101_\320\236\321\201\320\275\320\276\320\262\320\275\320\260\321\217\320\240\320\276\320\273\321\214.mdo" new file mode 100644 index 000000000..579047969 --- /dev/null +++ "b/tests/com.e1c.v8codestyle.bsl.itests/workspace/ExtensionNotifyDescriptionToServerProcedureCheck_Extension/src/Roles/\320\240\320\260\321\201\321\2101_\320\236\321\201\320\275\320\276\320\262\320\275\320\260\321\217\320\240\320\276\320\273\321\214/\320\240\320\260\321\201\321\2101_\320\236\321\201\320\275\320\276\320\262\320\275\320\260\321\217\320\240\320\276\320\273\321\214.mdo" @@ -0,0 +1,8 @@ + + + Расш1_ОсновнаяРоль + + ru + Основная роль + + diff --git a/tests/com.e1c.v8codestyle.bsl.ui.itests/.classpath b/tests/com.e1c.v8codestyle.bsl.ui.itests/.classpath index e801ebfb4..81fe078c2 100644 --- a/tests/com.e1c.v8codestyle.bsl.ui.itests/.classpath +++ b/tests/com.e1c.v8codestyle.bsl.ui.itests/.classpath @@ -1,6 +1,6 @@ - + diff --git a/tests/com.e1c.v8codestyle.bsl.ui.itests/.settings/org.eclipse.jdt.core.prefs b/tests/com.e1c.v8codestyle.bsl.ui.itests/.settings/org.eclipse.jdt.core.prefs index 0249a552c..a1bbcc4c7 100644 --- a/tests/com.e1c.v8codestyle.bsl.ui.itests/.settings/org.eclipse.jdt.core.prefs +++ b/tests/com.e1c.v8codestyle.bsl.ui.itests/.settings/org.eclipse.jdt.core.prefs @@ -1,10 +1,10 @@ eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 -org.eclipse.jdt.core.compiler.compliance=11 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 +org.eclipse.jdt.core.compiler.compliance=17 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=11 +org.eclipse.jdt.core.compiler.source=17 diff --git a/tests/com.e1c.v8codestyle.bsl.ui.itests/META-INF/MANIFEST.MF b/tests/com.e1c.v8codestyle.bsl.ui.itests/META-INF/MANIFEST.MF index c8d818f0f..1a2d5bde5 100644 --- a/tests/com.e1c.v8codestyle.bsl.ui.itests/META-INF/MANIFEST.MF +++ b/tests/com.e1c.v8codestyle.bsl.ui.itests/META-INF/MANIFEST.MF @@ -6,9 +6,9 @@ Bundle-Version: 0.7.0.qualifier Bundle-Vendor: %providerName Fragment-Host: com.e1c.v8codestyle.bsl.ui;bundle-version="[0.7.0,0.8.0)" Automatic-Module-Name: com.e1c.v8codestyle.bsl.ui.itests -Bundle-RequiredExecutionEnvironment: JavaSE-11 +Bundle-RequiredExecutionEnvironment: JavaSE-17 Bundle-Localization: fragment -Import-Package: com._1c.g5.v8.dt.bsl.ui.editor;version="[9.0.0,10.0.0)", +Import-Package: com._1c.g5.v8.dt.bsl.ui.editor;version="[10.0.0,11.0.0)", com._1c.g5.v8.dt.testing;version="[3.1.0,4.0.0)", com._1c.g5.v8.dt.ui.util;version="[7.0.0,8.0.0)", org.junit;version="[4.13.0,5.0.0)" diff --git a/tests/com.e1c.v8codestyle.form.itests/.classpath b/tests/com.e1c.v8codestyle.form.itests/.classpath index e801ebfb4..81fe078c2 100644 --- a/tests/com.e1c.v8codestyle.form.itests/.classpath +++ b/tests/com.e1c.v8codestyle.form.itests/.classpath @@ -1,6 +1,6 @@ - + diff --git a/tests/com.e1c.v8codestyle.form.itests/.settings/org.eclipse.jdt.core.prefs b/tests/com.e1c.v8codestyle.form.itests/.settings/org.eclipse.jdt.core.prefs index 0249a552c..a1bbcc4c7 100644 --- a/tests/com.e1c.v8codestyle.form.itests/.settings/org.eclipse.jdt.core.prefs +++ b/tests/com.e1c.v8codestyle.form.itests/.settings/org.eclipse.jdt.core.prefs @@ -1,10 +1,10 @@ eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 -org.eclipse.jdt.core.compiler.compliance=11 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 +org.eclipse.jdt.core.compiler.compliance=17 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=11 +org.eclipse.jdt.core.compiler.source=17 diff --git a/tests/com.e1c.v8codestyle.form.itests/META-INF/MANIFEST.MF b/tests/com.e1c.v8codestyle.form.itests/META-INF/MANIFEST.MF index 0ab12ef1d..fcdfa2820 100644 --- a/tests/com.e1c.v8codestyle.form.itests/META-INF/MANIFEST.MF +++ b/tests/com.e1c.v8codestyle.form.itests/META-INF/MANIFEST.MF @@ -6,7 +6,7 @@ Bundle-Version: 0.7.0.qualifier Bundle-Vendor: %providerName Fragment-Host: com.e1c.v8codestyle.form;bundle-version="[0.7.0,0.8.0)" Automatic-Module-Name: com.e1c.v8codestyle.form.itests -Bundle-RequiredExecutionEnvironment: JavaSE-11 +Bundle-RequiredExecutionEnvironment: JavaSE-17 Bundle-Localization: fragment Import-Package: com._1c.g5.v8.bm.integration;version="[11.0.0,12.0.0)", com._1c.g5.v8.dt.core.naming;version="[7.0.0,8.0.0)", @@ -16,9 +16,7 @@ Import-Package: com._1c.g5.v8.bm.integration;version="[11.0.0,12.0.0)", com._1c.g5.v8.dt.mcore;version="[7.0.0,8.0.0)", com._1c.g5.v8.dt.metadata.mdclass;version="[9.0.0,10.0.0)", com._1c.g5.v8.dt.testing;version="[3.1.0,4.0.0)", - com._1c.g5.v8.dt.ui.util;version="[7.0.0,8.0.0)", - com._1c.g5.v8.dt.ui.validation;version="[5.0.0,6.0.0)", - com._1c.g5.v8.dt.validation.marker;version="[8.0.0,9.0.0)", + com._1c.g5.v8.dt.validation.marker;version="[9.0.0,10.0.0)", com.e1c.g5.v8.dt.testing.check;version="[1.0.0,2.0.0)", org.junit;version="[4.13.0,5.0.0)" Require-Bundle: org.eclipse.core.resources;bundle-version="[3.13.0,4.0.0)" diff --git a/tests/com.e1c.v8codestyle.form.itests/src/com/e1c/v8codestyle/form/fix/itests/FormFixTestBase.java b/tests/com.e1c.v8codestyle.form.itests/src/com/e1c/v8codestyle/form/fix/itests/FormFixTestBase.java index 562539364..a8aabfd9e 100644 --- a/tests/com.e1c.v8codestyle.form.itests/src/com/e1c/v8codestyle/form/fix/itests/FormFixTestBase.java +++ b/tests/com.e1c.v8codestyle.form.itests/src/com/e1c/v8codestyle/form/fix/itests/FormFixTestBase.java @@ -16,13 +16,7 @@ import org.eclipse.core.runtime.NullProgressMonitor; -import com._1c.g5.v8.dt.core.naming.ISymbolicLinkLocalizer; import com._1c.g5.v8.dt.core.platform.IDtProject; -import com._1c.g5.v8.dt.core.platform.IV8ProjectManager; -import com._1c.g5.v8.dt.form.naming.FormSymbolicLinkLocalizer; -import com._1c.g5.v8.dt.ui.util.OpenHelper; -import com._1c.g5.v8.dt.ui.validation.BmMarkerWrapper; -import com._1c.g5.v8.dt.validation.marker.IMarkerWrapper; import com._1c.g5.v8.dt.validation.marker.Marker; import com._1c.g5.wiring.ServiceAccess; import com.e1c.g5.v8.dt.check.qfix.FixProcessHandle; @@ -41,9 +35,6 @@ public abstract class FormFixTestBase private final String fixDescriptionPattern; private IFixManager fixManager = ServiceAccess.get(IFixManager.class); - private IV8ProjectManager projectManager = ServiceAccess.get(IV8ProjectManager.class); - private ISymbolicLinkLocalizer symbolicLinkLocalizer = new FormSymbolicLinkLocalizer(); - private final OpenHelper openHelper = new OpenHelper(); /** * Instantiates a new form fix test base. @@ -64,10 +55,7 @@ protected FormFixTestBase(String fixDescriptionPattern) */ protected void applyFix(Marker marker, IDtProject dtProject) { - IMarkerWrapper markerWrapper = new BmMarkerWrapper(marker, dtProject.getWorkspaceProject(), bmModelManager, - projectManager, symbolicLinkLocalizer, openHelper); - - FixProcessHandle handle = fixManager.prepareFix(markerWrapper, dtProject); + FixProcessHandle handle = fixManager.prepareFix(marker, dtProject); FixVariantDescriptor variantDescr = null; diff --git a/tests/com.e1c.v8codestyle.md.itests/.classpath b/tests/com.e1c.v8codestyle.md.itests/.classpath index e801ebfb4..81fe078c2 100644 --- a/tests/com.e1c.v8codestyle.md.itests/.classpath +++ b/tests/com.e1c.v8codestyle.md.itests/.classpath @@ -1,6 +1,6 @@ - + diff --git a/tests/com.e1c.v8codestyle.md.itests/.settings/org.eclipse.jdt.core.prefs b/tests/com.e1c.v8codestyle.md.itests/.settings/org.eclipse.jdt.core.prefs index 0249a552c..a1bbcc4c7 100644 --- a/tests/com.e1c.v8codestyle.md.itests/.settings/org.eclipse.jdt.core.prefs +++ b/tests/com.e1c.v8codestyle.md.itests/.settings/org.eclipse.jdt.core.prefs @@ -1,10 +1,10 @@ eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 -org.eclipse.jdt.core.compiler.compliance=11 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 +org.eclipse.jdt.core.compiler.compliance=17 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=11 +org.eclipse.jdt.core.compiler.source=17 diff --git a/tests/com.e1c.v8codestyle.md.itests/META-INF/MANIFEST.MF b/tests/com.e1c.v8codestyle.md.itests/META-INF/MANIFEST.MF index 9e6944c45..3606648db 100644 --- a/tests/com.e1c.v8codestyle.md.itests/META-INF/MANIFEST.MF +++ b/tests/com.e1c.v8codestyle.md.itests/META-INF/MANIFEST.MF @@ -6,12 +6,12 @@ Bundle-Version: 0.7.0.qualifier Bundle-Vendor: %providerName Fragment-Host: com.e1c.v8codestyle.md;bundle-version="[0.7.0,0.8.0)" Automatic-Module-Name: com.e1c.v8codestyle.md.itests -Bundle-RequiredExecutionEnvironment: JavaSE-11 +Bundle-RequiredExecutionEnvironment: JavaSE-17 Bundle-Localization: fragment Import-Package: com._1c.g5.v8.bm.integration;version="[11.0.0,12.0.0)", com._1c.g5.v8.dt.core.platform;version="[11.0.0,12.0.0)", com._1c.g5.v8.dt.testing;version="[3.1.0,4.0.0)", - com._1c.g5.v8.dt.validation.marker;version="[8.0.0,9.0.0)", + com._1c.g5.v8.dt.validation.marker;version="[9.0.0,10.0.0)", com.e1c.g5.v8.dt.testing.check;version="[1.0.0,2.0.0)", org.junit;version="[4.13.0,5.0.0)" Require-Bundle: org.eclipse.core.resources;bundle-version="[3.13.0,4.0.0)" diff --git a/tests/com.e1c.v8codestyle.ql.itests/.classpath b/tests/com.e1c.v8codestyle.ql.itests/.classpath index e801ebfb4..81fe078c2 100644 --- a/tests/com.e1c.v8codestyle.ql.itests/.classpath +++ b/tests/com.e1c.v8codestyle.ql.itests/.classpath @@ -1,6 +1,6 @@ - + diff --git a/tests/com.e1c.v8codestyle.ql.itests/.settings/org.eclipse.jdt.core.prefs b/tests/com.e1c.v8codestyle.ql.itests/.settings/org.eclipse.jdt.core.prefs index 0249a552c..a1bbcc4c7 100644 --- a/tests/com.e1c.v8codestyle.ql.itests/.settings/org.eclipse.jdt.core.prefs +++ b/tests/com.e1c.v8codestyle.ql.itests/.settings/org.eclipse.jdt.core.prefs @@ -1,10 +1,10 @@ eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 -org.eclipse.jdt.core.compiler.compliance=11 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 +org.eclipse.jdt.core.compiler.compliance=17 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=11 +org.eclipse.jdt.core.compiler.source=17 diff --git a/tests/com.e1c.v8codestyle.ql.itests/META-INF/MANIFEST.MF b/tests/com.e1c.v8codestyle.ql.itests/META-INF/MANIFEST.MF index 357dc34b0..d9f95472d 100644 --- a/tests/com.e1c.v8codestyle.ql.itests/META-INF/MANIFEST.MF +++ b/tests/com.e1c.v8codestyle.ql.itests/META-INF/MANIFEST.MF @@ -6,7 +6,7 @@ Bundle-Version: 0.7.0.qualifier Bundle-Vendor: %providerName Fragment-Host: com.e1c.v8codestyle.ql;bundle-version="[0.7.0,0.8.0)" Automatic-Module-Name: com.e1c.v8codestyle.ql.itests -Bundle-RequiredExecutionEnvironment: JavaSE-11 +Bundle-RequiredExecutionEnvironment: JavaSE-17 Bundle-Localization: fragment Import-Package: com._1c.g5.v8.bm.integration;version="[11.0.0,12.0.0)", com._1c.g5.v8.dt.core.platform;version="[11.0.0,12.0.0)", @@ -14,7 +14,7 @@ Import-Package: com._1c.g5.v8.bm.integration;version="[11.0.0,12.0.0)", com._1c.g5.v8.dt.form.model;version="[11.0.0,12.0.0)", com._1c.g5.v8.dt.mcore;version="[7.0.0,8.0.0)", com._1c.g5.v8.dt.testing;version="[3.0.0,4.0.0)", - com._1c.g5.v8.dt.validation.marker;version="[8.0.0,9.0.0)", + com._1c.g5.v8.dt.validation.marker;version="[9.0.0,10.0.0)", com.e1c.g5.v8.dt.testing.check;version="[1.0.0,2.0.0)", org.junit;version="[4.13.0,5.0.0)" Require-Bundle: org.eclipse.core.resources;bundle-version="[3.13.900,4.0.0)", diff --git a/tests/com.e1c.v8codestyle.right.itests/.classpath b/tests/com.e1c.v8codestyle.right.itests/.classpath index e801ebfb4..81fe078c2 100644 --- a/tests/com.e1c.v8codestyle.right.itests/.classpath +++ b/tests/com.e1c.v8codestyle.right.itests/.classpath @@ -1,6 +1,6 @@ - + diff --git a/tests/com.e1c.v8codestyle.right.itests/.settings/org.eclipse.jdt.core.prefs b/tests/com.e1c.v8codestyle.right.itests/.settings/org.eclipse.jdt.core.prefs index 0249a552c..a1bbcc4c7 100644 --- a/tests/com.e1c.v8codestyle.right.itests/.settings/org.eclipse.jdt.core.prefs +++ b/tests/com.e1c.v8codestyle.right.itests/.settings/org.eclipse.jdt.core.prefs @@ -1,10 +1,10 @@ eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 -org.eclipse.jdt.core.compiler.compliance=11 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 +org.eclipse.jdt.core.compiler.compliance=17 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=11 +org.eclipse.jdt.core.compiler.source=17 diff --git a/tests/com.e1c.v8codestyle.right.itests/META-INF/MANIFEST.MF b/tests/com.e1c.v8codestyle.right.itests/META-INF/MANIFEST.MF index 779b7900e..cd0c30045 100644 --- a/tests/com.e1c.v8codestyle.right.itests/META-INF/MANIFEST.MF +++ b/tests/com.e1c.v8codestyle.right.itests/META-INF/MANIFEST.MF @@ -6,7 +6,7 @@ Bundle-Version: 0.7.0.qualifier Bundle-Vendor: %providerName Fragment-Host: com.e1c.v8codestyle.right;bundle-version="[0.7.0,0.8.0)" Automatic-Module-Name: com.e1c.v8codestyle.right.itests -Bundle-RequiredExecutionEnvironment: JavaSE-11 +Bundle-RequiredExecutionEnvironment: JavaSE-17 Bundle-Localization: fragment Import-Package: com._1c.g5.v8.dt.core.platform;version="[11.0.0,12.0.0)", com._1c.g5.v8.dt.md.refactoring.core;version="[1.0.0,2.0.0)", @@ -14,6 +14,6 @@ Import-Package: com._1c.g5.v8.dt.core.platform;version="[11.0.0,12.0.0)", com._1c.g5.v8.dt.platform.version;version="[2.13.0,3.0.0)", com._1c.g5.v8.dt.refactoring.core;version="[4.0.0,5.0.0)", com._1c.g5.v8.dt.testing;version="[3.1.0,4.0.0)", - com._1c.g5.v8.dt.validation.marker;version="[8.0.0,9.0.0)", + com._1c.g5.v8.dt.validation.marker;version="[9.0.0,10.0.0)", com.e1c.g5.v8.dt.testing.check;version="[1.0.0,2.0.0)", org.junit;version="[4.13.0,5.0.0)" diff --git a/tests/pom.xml b/tests/pom.xml index 36060d729..603d6e98e 100644 --- a/tests/pom.xml +++ b/tests/pom.xml @@ -67,7 +67,7 @@ - -Xms80m -Xmx2g -Dosgi.module.lock.timeout=24 --add-modules=ALL-SYSTEM + -Xms80m -Xmx2g -Dosgi.module.lock.timeout=24 --add-modules=ALL-SYSTEM --add-opens=java.base/jdk.internal.misc=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED --add-opens=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED --add-opens=java.base/sun.reflect.generics.reflectiveObjects=ALL-UNNAMED --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.ref=ALL-UNNAMED @@ -95,13 +95,18 @@ eclipse-feature com._1c.g5.v8.dt.platform.support_v8.3.19.feature 0.0.0 + + + eclipse-feature + com._1c.g5.v8.dt.platform.support_v8.3.23.feature + 0.0.0 p2 - + org.apache.maven.plugins maven-antrun-plugin @@ -156,7 +161,7 @@ true true - ${ui.test.vmargs} ${tycho-surefire-plugin.vmargs} ${debug.vmargs} ${tycho.testArgLine} + ${ui.test.vmargs} ${tycho-surefire-plugin.vmargs} ${debug.vmargs} ${project.build.directory}/work p2Installed