1
0
mirror of https://github.com/1C-Company/v8-code-style.git synced 2025-06-02 17:17:22 +02:00

Merge pull request #1427 from 1C-Company/edt-2024-1

Переход на EDT 2024.1
This commit is contained in:
Alexander Tretyakevich 2024-08-26 13:54:29 +07:00 committed by GitHub
commit d61c24cfc0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
150 changed files with 1947 additions and 667 deletions

View File

@ -28,10 +28,16 @@ jobs:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
if: ${{ !inputs.analyze }} if: ${{ !inputs.analyze }}
- name: Set up JDK 11 # - name: Set up JDK 17
uses: actions/setup-java@v1 # 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: with:
java-version: 11 java-version: 17
java-package: jdk+fx java-package: jdk+fx
- name: Free disk space - name: Free disk space
@ -42,15 +48,6 @@ jobs:
# docker rmi $(docker image ls -aq) || true # docker rmi $(docker image ls -aq) || true
df -h 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 - name: Build with Maven
working-directory: ./ working-directory: ./
run: | run: |

View File

@ -14,7 +14,7 @@ jobs:
name: Build name: Build
# This build will run on master,release/* push, local PR and PR from forks without label Analyze # 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') 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: with:
analyze: ${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.event.repository.full_name }} analyze: ${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.event.repository.full_name }}
secrets: secrets:

View File

@ -13,10 +13,10 @@ jobs:
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Set up JDK 11 - name: Set up JDK 17
uses: actions/setup-java@v1 uses: actions/setup-java@v1
with: with:
java-version: 11 java-version: 17
java-package: jdk+fx java-package: jdk+fx
- name: Cache maven repo - name: Cache maven repo

View File

@ -24,26 +24,26 @@
<name>BOM</name> <name>BOM</name>
<prerequisites> <prerequisites>
<maven>3.6.0</maven> <maven>3.9.4</maven>
</prerequisites> </prerequisites>
<properties> <properties>
<tycho.version>2.7.0</tycho.version> <tycho.version>4.0.5</tycho.version>
<tycho.extras.version>2.7.0</tycho.extras.version> <tycho.extras.version>4.0.5</tycho.extras.version>
<markdown-page-generator.version>2.3.1</markdown-page-generator.version> <markdown-page-generator.version>2.3.1</markdown-page-generator.version>
<!-- Override this property in each project --> <!-- Override this property in each project -->
<markdown.page.generator.html.file.path>${project.basedir}</markdown.page.generator.html.file.path> <markdown.page.generator.html.file.path>${project.basedir}</markdown.page.generator.html.file.path>
<spotbugs.maven.plugin.version>3.1.12.2</spotbugs.maven.plugin.version> <spotbugs.maven.plugin.version>4.8.3.1</spotbugs.maven.plugin.version>
<maven.checkstyle.plugin.version>3.1.1</maven.checkstyle.plugin.version> <maven.checkstyle.plugin.version>3.1.1</maven.checkstyle.plugin.version>
<checkstyle.version>8.29</checkstyle.version> <checkstyle.version>8.29</checkstyle.version>
<checkstyle.header.file>java.header</checkstyle.header.file> <checkstyle.header.file>java.header</checkstyle.header.file>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.source>11</maven.compiler.source> <maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target> <maven.compiler.target>17</maven.compiler.target>
<maven.compiler.release>11</maven.compiler.release> <maven.compiler.release>17</maven.compiler.release>
<maven.build.timestamp.format>'v'yyyyMMdd-HHmm</maven.build.timestamp.format> <maven.build.timestamp.format>'v'yyyyMMdd-HHmm</maven.build.timestamp.format>
<qualifier>${maven.build.timestamp}</qualifier> <qualifier>${maven.build.timestamp}</qualifier>
@ -51,7 +51,7 @@
<eclipse.p2.latest>http://download.eclipse.org/releases/2022-03/</eclipse.p2.latest> <eclipse.p2.latest>http://download.eclipse.org/releases/2022-03/</eclipse.p2.latest>
<p2repo.archive.skip>false</p2repo.archive.skip> <p2repo.archive.skip>false</p2repo.archive.skip>
<org.jacoco.version>0.8.6</org.jacoco.version> <org.jacoco.version>0.8.8</org.jacoco.version>
<!-- SonarQube Settings --> <!-- SonarQube Settings -->
<sonar.projectKey>1C-Company_v8-code-style</sonar.projectKey> <sonar.projectKey>1C-Company_v8-code-style</sonar.projectKey>
<sonar.organization>1c-company</sonar.organization> <sonar.organization>1c-company</sonar.organization>
@ -87,6 +87,8 @@
<sonar.issue.ignore.multicriteria.t4.resourceKey>/tests/**/*.java</sonar.issue.ignore.multicriteria.t4.resourceKey> <sonar.issue.ignore.multicriteria.t4.resourceKey>/tests/**/*.java</sonar.issue.ignore.multicriteria.t4.resourceKey>
<!-- Source files should not have any duplicated blocks --> <!-- Source files should not have any duplicated blocks -->
<sonar.cpd.exclusions>**/*Plugin.java,/tests/**/*</sonar.cpd.exclusions> <sonar.cpd.exclusions>**/*Plugin.java,/tests/**/*</sonar.cpd.exclusions>
<eclipse.jarsigner.plugin.version>1.1.2_p3</eclipse.jarsigner.plugin.version>
</properties> </properties>
<build> <build>
@ -98,7 +100,7 @@
<version>${tycho.version}</version> <version>${tycho.version}</version>
<configuration> <configuration>
<resolver>p2</resolver> <resolver>p2</resolver>
<executionEnvironment>JavaSE-11</executionEnvironment> <executionEnvironment>JavaSE-17</executionEnvironment>
<includePackedArtifacts>false</includePackedArtifacts> <includePackedArtifacts>false</includePackedArtifacts>
<target> <target>
<artifact> <artifact>
@ -239,7 +241,7 @@
<artifactId>maven-antrun-plugin</artifactId> <artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version> <version>1.8</version>
</plugin> </plugin>
<plugin> <!--plugin>
<groupId>org.jacoco</groupId> <groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId> <artifactId>jacoco-maven-plugin</artifactId>
<version>${org.jacoco.version}</version> <version>${org.jacoco.version}</version>
@ -248,7 +250,7 @@
<exclude>**/MdClassPackageImpl*</exclude> <exclude>**/MdClassPackageImpl*</exclude>
</excludes> </excludes>
</configuration> </configuration>
</plugin> </plugin-->
<plugin> <plugin>
<groupId>com.ruleoftech</groupId> <groupId>com.ruleoftech</groupId>
<artifactId>markdown-page-generator-plugin</artifactId> <artifactId>markdown-page-generator-plugin</artifactId>
@ -299,6 +301,20 @@
</excludes> </excludes>
</configuration> </configuration>
</plugin> </plugin>
<plugin>
<groupId>org.eclipse.cbi.maven.plugins</groupId>
<artifactId>eclipse-jarsigner-plugin</artifactId>
<version>${eclipse.jarsigner.plugin.version}</version>
<configuration>
<signerUrl>${signer.url}/jarsign.php</signerUrl>
<excludeInnerJars>true</excludeInnerJars>
<retryLimit>5</retryLimit>
<systemPropertyVariables>
<signer.ssl.keyStore>${env.SIGN_KEYSTORE_PATH}</signer.ssl.keyStore>
<signer.ssl.keyStorePassword>${keystorePassword}</signer.ssl.keyStorePassword>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins> </plugins>
</pluginManagement> </pluginManagement>
@ -380,12 +396,39 @@
<dependency> <dependency>
<groupId>com.github.spotbugs</groupId> <groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs</artifactId> <artifactId>spotbugs</artifactId>
<version>4.0.0-beta2</version> <version>4.8.3</version>
</dependency> </dependency>
</dependencies> </dependencies>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>
</profile> </profile>
<profile>
<id>sign</id>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.cbi.maven.plugins</groupId>
<artifactId>eclipse-jarsigner-plugin</artifactId>
<version>${eclipse.jarsigner.plugin.version}</version>
<executions>
<execution>
<id>sign</id>
<phase>package</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
<configuration>
<fork>true</fork>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles> </profiles>
</project> </project>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<classpath> <classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/> <classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/> <classpathentry kind="output" path="bin"/>

View File

@ -1,8 +1,8 @@
eclipse.preferences.version=1 eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 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.compliance=11 org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
org.eclipse.jdt.core.compiler.source=11 org.eclipse.jdt.core.compiler.source=17

View File

@ -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.runtime;bundle-version="[3.20.0,4.0.0)",
org.eclipse.core.resources;bundle-version="[3.13.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.ui.forms;bundle-version="[3.11.0,4.0.0)",
org.eclipse.emf.ecore;bundle-version="[2.23.0,3.0.0)" org.eclipse.emf.ecore;bundle-version="[2.23.0,3.0.0)",
Bundle-RequiredExecutionEnvironment: JavaSE-11 com.google.inject;bundle-version="[7.0.0,8.0.0)"
Bundle-RequiredExecutionEnvironment: JavaSE-17
Automatic-Module-Name: com.e1c.v8codestyle.autosort.ui Automatic-Module-Name: com.e1c.v8codestyle.autosort.ui
Bundle-ActivationPolicy: lazy Bundle-ActivationPolicy: lazy
Bundle-Localization: plugin 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;version="[2.2.0,3.0.0)",
com._1c.g5.wiring.binder;version="[1.1.0,2.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.e1c.v8codestyle.autosort;version="[0.7.0,0.8.0)",
com.google.common.base;version="[30.1.0,31.0.0)", com.google.common.base;version="[32.1.0,33.0.0)"
com.google.inject;version="[5.0.0,6.0.0)"

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<classpath> <classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/> <classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/> <classpathentry kind="output" path="bin"/>

View File

@ -1,8 +1,8 @@
eclipse.preferences.version=1 eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 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.compliance=11 org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
org.eclipse.jdt.core.compiler.source=11 org.eclipse.jdt.core.compiler.source=17

View File

@ -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.emf.ecore;bundle-version="[2.12.0,3.0.0)",
org.eclipse.core.resources;bundle-version="[3.12.0,4.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)", com._1c.g5.wiring;bundle-version="[2.0.0,3.0.0)",
org.eclipse.emf.edit;bundle-version="[2.12.0,3.0.0)" org.eclipse.emf.edit;bundle-version="[2.12.0,3.0.0)",
Bundle-RequiredExecutionEnvironment: JavaSE-11 com.google.inject;bundle-version="[7.0.0,8.0.0)"
Bundle-RequiredExecutionEnvironment: JavaSE-17
Automatic-Module-Name: com.e1c.v8codestyle.autosort Automatic-Module-Name: com.e1c.v8codestyle.autosort
Bundle-ActivationPolicy: lazy Bundle-ActivationPolicy: lazy
Bundle-Localization: plugin Bundle-Localization: plugin
Import-Package: com._1c.g5.v8.activitytracking.core;version="[1.0.0,2.0.0)", 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.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.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;version="[11.0.0,12.0.0)",
com._1c.g5.v8.bm.integration.event;version="[2.0.0,3.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.md.sort;version="[1.0.0,2.0.0)",
com._1c.g5.v8.dt.metadata.mdclass;version="[9.0.0,10.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;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.e1c.v8codestyle;version="[0.7.0,0.8.0)",
com.google.common.base;version="[30.1.0,31.0.0)", com.google.common.base;version="[32.1.0,33.0.0)",
com.google.inject;version="[5.0.1,6.0.0)",
com.google.inject.binder;version="[5.0.1,6.0.0)",
org.slf4j;version="[1.7.2,2.0.0)" org.slf4j;version="[1.7.2,2.0.0)"
Export-Package: com.e1c.v8codestyle.autosort;version="0.7.0"; Export-Package: com.e1c.v8codestyle.autosort;version="0.7.0";
uses:="org.eclipse.emf.ecore, uses:="org.eclipse.emf.ecore,

View File

@ -119,6 +119,20 @@ public class SortService
this.configurationProvider = configurationProvider; this.configurationProvider = configurationProvider;
this.workspaceOrchestrator = workspaceOrchestrator; this.workspaceOrchestrator = workspaceOrchestrator;
this.modelEditingSupport = modelEditingSupport; 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, @LifecycleParticipant(phase = LifecyclePhase.RESOURCE_LOADING,

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<classpath> <classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/> <classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/> <classpathentry kind="output" path="bin"/>

View File

@ -1,10 +1,10 @@
eclipse.preferences.version=1 eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
org.eclipse.jdt.core.compiler.compliance=11 org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=enabled org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=11 org.eclipse.jdt.core.compiler.source=17

View File

@ -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.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.xtext.ui;bundle-version="[1.5.0,2.0.0)",
org.eclipse.handly;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 Automatic-Module-Name: com.e1c.v8codestyle.bsl.ui
Bundle-ActivationPolicy: lazy Bundle-ActivationPolicy: lazy
Bundle-Localization: plugin Bundle-Localization: plugin
Import-Package: com._1c.g5.ides.ui.texteditor.xtext.embedded;version="[6.0.0,7.0.0)", 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.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.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.formatting;version="[3.0.0,4.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;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.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.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.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;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.contentassist;version="[9.0.0,10.0.0)",
com._1c.g5.v8.dt.bsl.ui.editor;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="[5.0.0,6.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="[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.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.bsl.util;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.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;version="[2.2.0,3.0.0)",
com._1c.g5.wiring.binder;version="[1.1.0,2.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.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.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;version="[0.7.0,0.8.0)",
com.e1c.v8codestyle.bsl.strict;version="[0.7.0,0.8.0)" com.e1c.v8codestyle.bsl.strict;version="[0.7.0,0.8.0)"

View File

@ -165,7 +165,7 @@ public class FormatDocCommentModuleEditorHandler
int methodOffset = lines.get(0).getOffset(); int methodOffset = lines.get(0).getOffset();
int length = lines.get(lines.size() - 1).getEndOffset() - methodOffset; 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); IV8Project project = v8projectManager.getProject(module);
boolean oldFormat = (project != null && project.getProject() != null) boolean oldFormat = (project != null && project.getProject() != null)
? this.bslPreferences.getDocumentCommentProperties(project.getProject()).oldCommentFormat() : true; ? this.bslPreferences.getDocumentCommentProperties(project.getProject()).oldCommentFormat() : true;

View File

@ -22,7 +22,7 @@ import org.eclipse.xtext.nodemodel.INode;
import com.e1c.v8codestyle.internal.bsl.ui.UiPlugin; 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 * @author Kuznetsov Nikita
*/ */
@ -32,6 +32,8 @@ public final class BslModuleOffsets
private int endOffset; private int endOffset;
private int insertOffset; private int insertOffset;
private boolean needReplace;
private Map<String, BslModuleOffsets> suffixes; private Map<String, BslModuleOffsets> suffixes;
/** /**
@ -89,6 +91,24 @@ public final class BslModuleOffsets
return insertOffset; return insertOffset;
} }
/**
* Is need to replace existing module region
*
* @return <code>true</code> if need to replace existing region, <code>false</code> 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 * Add suffix of the name of this module region
* *

View File

@ -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 * This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0 * available under the terms of the Eclipse Public License 2.0
@ -12,8 +12,9 @@
*******************************************************************************/ *******************************************************************************/
package com.e1c.v8codestyle.internal.bsl.ui.services; 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.common.IBslModuleTextInsertInfo;
import com._1c.g5.v8.dt.bsl.model.Module;
/** /**
* Built-in language module region information with {@link String} region wrap data * Built-in language module region information with {@link String} region wrap data
@ -23,34 +24,47 @@ import com._1c.g5.v8.dt.bsl.model.Module;
public class BslModuleRegionsInfo public class BslModuleRegionsInfo
implements IBslModuleTextInsertInfo implements IBslModuleTextInsertInfo
{ {
private final URI resourceURI;
private final int insertPosition; private final int insertPosition;
private final Module module; private final int clearPosition;
private final int clearLength;
private final String regionName; private final String regionName;
/** /**
* {@link BslModuleRegionsInfo} constructor * {@link BslModuleRegionsInfo} constructor
* *
* @param resourceURI current module or document resource {@link URI}, cannot be <code>null</code>
* @param insertPosition <code>int</code> insertion offset, cannot be negative * @param insertPosition <code>int</code> insertion offset, cannot be negative
* @param module current {@link Module}, cannot be <code>null</code> * @param clearPosition text clear <code>int</code> position, can be negative if no clear needed
* @param clearLength text clear <code>int</code> length, can be negative if no clear needed
* @param regionName {@link String} region name, can be <code>null</code> * @param regionName {@link String} region name, can be <code>null</code>
*/ */
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.insertPosition = insertPosition;
this.module = module; this.clearPosition = clearPosition;
this.clearLength = clearLength;
this.regionName = regionName; this.regionName = regionName;
} }
@Override @Override
public int getInsertPosition() public URI getResourceURI()
{ {
return insertPosition; return resourceURI;
} }
@Override @Override
public Module getModule() public int getPosition()
{ {
return module; return clearLength > 0 ? clearPosition : insertPosition;
}
@Override
public int getClearLength()
{
return clearLength;
} }
/** /**

View File

@ -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 * This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0 * available under the terms of the Eclipse Public License 2.0
@ -22,7 +22,9 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.nodemodel.INode; import org.eclipse.xtext.nodemodel.INode;
import org.eclipse.xtext.nodemodel.util.NodeModelUtils; import org.eclipse.xtext.nodemodel.util.NodeModelUtils;
import org.eclipse.xtext.resource.IResourceServiceProvider; import org.eclipse.xtext.resource.IResourceServiceProvider;
import org.eclipse.xtext.resource.XtextResource;
import org.eclipse.xtext.ui.editor.model.IXtextDocument; 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.EventItemType;
import com._1c.g5.v8.dt.bsl.common.IBslModuleEventData; import com._1c.g5.v8.dt.bsl.common.IBslModuleEventData;
@ -33,6 +35,7 @@ import com._1c.g5.v8.dt.bsl.model.RegionPreprocessor;
import com._1c.g5.v8.dt.bsl.model.util.BslUtil; 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.resource.owner.BslOwnerComputerService;
import com._1c.g5.v8.dt.bsl.ui.BslGeneratorMultiLangProposals; 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.bsl.ui.event.BslModuleEventData;
import com._1c.g5.v8.dt.common.PreferenceUtils; import com._1c.g5.v8.dt.common.PreferenceUtils;
import com._1c.g5.v8.dt.common.StringUtils; import com._1c.g5.v8.dt.common.StringUtils;
@ -53,69 +56,90 @@ import com.google.inject.Inject;
public class BslModuleRegionsInfoService public class BslModuleRegionsInfoService
implements IBslModuleTextInsertInfoService implements IBslModuleTextInsertInfoService
{ {
@Inject @Inject
private IModuleStructureProvider moduleStructureProvider; private IModuleStructureProvider moduleStructureProvider;
@Override @Override
public IBslModuleTextInsertInfo getEventHandlerTextInsertInfo(IXtextDocument document, Module module, public IBslModuleTextInsertInfo getEventHandlerTextInsertInfo(IXtextDocument document, int defaultPosition,
int defaultPosition, IBslModuleEventData data) IBslModuleEventData data)
{ {
if (!(data instanceof BslModuleEventData)) 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 rsp =
IResourceServiceProvider.Registry.INSTANCE.getResourceServiceProvider(moduleResourceUri); IResourceServiceProvider.Registry.INSTANCE.getResourceServiceProvider(resourceURI);
IV8ProjectManager projectManager = rsp.get(IV8ProjectManager.class); IV8ProjectManager projectManager = rsp.get(IV8ProjectManager.class);
BslOwnerComputerService bslOwnerComputerService = rsp.get(BslOwnerComputerService.class); IV8Project project = projectManager.getProject(resourceURI);
IV8Project project = projectManager.getProject(moduleResourceUri); ModuleInfoUnitOfWork moduleInfoUnitOfWork = new ModuleInfoUnitOfWork(rsp.get(BslOwnerComputerService.class));
EClass moduleOwner = bslOwnerComputerService.computeOwnerEClass(module); ModuleInfo moduleInfo = document instanceof BslXtextDocument bslXTextDocument
? bslXTextDocument.readOnlyDataModelWithoutSync(moduleInfoUnitOfWork)
: document.readOnly(moduleInfoUnitOfWork);
EObject eventOwner = data.getEventOwner(); EObject eventOwner = data.getEventOwner();
BslModuleEventData regionData = (BslModuleEventData)data; BslModuleEventData regionData = (BslModuleEventData)data;
EventItemType itemType = regionData.getEventItemType(); EventItemType itemType = regionData.getEventItemType();
String suffix = getSuffix(eventOwner, itemType); String suffix = getSuffix(eventOwner, itemType, bslModuleEventData.isInternal());
List<RegionPreprocessor> regionPreprocessors = BslUtil.getAllRegionPreprocessors(module);
ScriptVariant scriptVariant = project.getScriptVariant(); ScriptVariant scriptVariant = project.getScriptVariant();
String declaredRegionName = getDeclaredRegionName(moduleOwner, itemType, scriptVariant); String declaredRegionName =
getDeclaredRegionName(moduleInfo.owner, itemType, bslModuleEventData.isInternal(), scriptVariant);
Map<String, BslModuleOffsets> regionOffsets = Map<String, BslModuleOffsets> 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); int offset = getRegionOffset(regionOffsets, declaredRegionName, suffix, defaultPosition, scriptVariant);
String regionName = null; 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())) && moduleStructureProvider.canCreateStructure(project.getProject()))
{ {
regionName = suffix.isEmpty() ? declaredRegionName : (declaredRegionName + suffix); regionName = suffix.isEmpty() ? declaredRegionName : (declaredRegionName + suffix);
} }
return new BslModuleRegionsInfo(offset, module, regionName); return new BslModuleRegionsInfo(resourceURI, offset, clearOffset, clearLength, regionName);
} }
@Override @Override
public String wrap(IBslModuleTextInsertInfo moduleTextInsertInfo, String content) 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(); String regionName = moduleRegionInformation.getRegionName();
if (module != null && regionName != null) if (regionName != null)
{ {
URI moduleResourceUri = module.eResource().getURI(); IResourceServiceProvider rsp = IResourceServiceProvider.Registry.INSTANCE
IResourceServiceProvider rsp = .getResourceServiceProvider(moduleTextInsertInfo.getResourceURI());
IResourceServiceProvider.Registry.INSTANCE.getResourceServiceProvider(moduleResourceUri);
IV8ProjectManager projectManager = rsp.get(IV8ProjectManager.class); IV8ProjectManager projectManager = rsp.get(IV8ProjectManager.class);
BslGeneratorMultiLangProposals proposals = rsp.get(BslGeneratorMultiLangProposals.class); BslGeneratorMultiLangProposals proposals = rsp.get(BslGeneratorMultiLangProposals.class);
IV8Project project = projectManager.getProject(moduleResourceUri); IV8Project project = projectManager.getProject(moduleTextInsertInfo.getResourceURI());
String lineSeparator = PreferenceUtils.getLineSeparator(project.getProject()); String lineSeparator = PreferenceUtils.getLineSeparator(project.getProject());
proposals.setRussianLang(ScriptVariant.RUSSIAN.equals(project.getScriptVariant())); proposals.setRussianLang(ScriptVariant.RUSSIAN.equals(project.getScriptVariant()));
String beginRegion = proposals.getBeginRegionPropStr(); String beginRegion = proposals.getBeginRegionPropStr();
String endRegion = proposals.getEndRegionPropStr(); String endRegion = proposals.getEndRegionPropStr();
String space = proposals.getSpacePropStr(); String space = proposals.getSpacePropStr();
StringBuilder builder = new StringBuilder(); StringBuilder builder = new StringBuilder();
builder.append(lineSeparator).append(beginRegion).append(space).append(regionName); if (moduleTextInsertInfo.getPosition() != 0)
builder.append(lineSeparator).append(content).append(lineSeparator); {
builder.append(lineSeparator);
}
builder.append(beginRegion).append(space).append(regionName);
builder.append(content);
builder.append(endRegion); builder.append(endRegion);
builder.append(lineSeparator); if (moduleTextInsertInfo.getPosition() == 0)
{
builder.append(lineSeparator);
}
return builder.toString(); return builder.toString();
} }
} }
@ -171,6 +195,10 @@ public class BslModuleRegionsInfoService
regionOffsets.put(declaredRegionName, moduleRegionInformation); regionOffsets.put(declaredRegionName, moduleRegionInformation);
if ((targetRegionName != null) && targetRegionName.equals(preprocessorRegionName)) if ((targetRegionName != null) && targetRegionName.equals(preprocessorRegionName))
{ {
if (node.getLength() == 0)
{
moduleRegionInformation.setNeedReplace();
}
return regionOffsets; return regionOffsets;
} }
} }
@ -188,6 +216,7 @@ public class BslModuleRegionsInfoService
int offset = defaultOffset; int offset = defaultOffset;
boolean createNewRegion = !isRegionExists(regionOffsets, declaredRegionName, suffix); boolean createNewRegion = !isRegionExists(regionOffsets, declaredRegionName, suffix);
BslModuleOffsets regionOffset = regionOffsets.get(declaredRegionName); BslModuleOffsets regionOffset = regionOffsets.get(declaredRegionName);
if (regionOffset != null) if (regionOffset != null)
{ {
if (!suffix.isEmpty()) if (!suffix.isEmpty())
@ -225,6 +254,8 @@ public class BslModuleRegionsInfoService
boolean placeBefore = false; boolean placeBefore = false;
int offset = regionOffsets.isEmpty() ? 0 : defaultOffset; int offset = regionOffsets.isEmpty() ? 0 : defaultOffset;
ModuleStructureSection[] declaredRegionNames = ModuleStructureSection.values(); ModuleStructureSection[] declaredRegionNames = ModuleStructureSection.values();
BslModuleOffsets lastRegionInformation = null;
BslModuleOffsets regionInformation = null;
for (int regionNameIndex = 0; regionNameIndex < declaredRegionNames.length; regionNameIndex++) for (int regionNameIndex = 0; regionNameIndex < declaredRegionNames.length; regionNameIndex++)
{ {
ModuleStructureSection moduleStructuredSection = declaredRegionNames[regionNameIndex]; ModuleStructureSection moduleStructuredSection = declaredRegionNames[regionNameIndex];
@ -233,12 +264,17 @@ public class BslModuleRegionsInfoService
{ {
placeBefore = true; placeBefore = true;
} }
BslModuleOffsets regionInformation = regionOffsets.get(declaredRegionName); if (regionInformation != null)
{
lastRegionInformation = regionInformation;
}
regionInformation = regionOffsets.get(declaredRegionName);
if (regionInformation != null) if (regionInformation != null)
{ {
if (placeBefore && (suffix.isEmpty() || !declaredRegionName.equals(regionName))) if (placeBefore && (suffix.isEmpty() || !declaredRegionName.equals(regionName)))
{ {
return regionInformation.getStartOffset(); return lastRegionInformation != null ? lastRegionInformation.getEndOffset()
: regionInformation.getStartOffset();
} }
offset = placeBefore ? regionInformation.getStartOffset() : regionInformation.getEndOffset(); offset = placeBefore ? regionInformation.getStartOffset() : regionInformation.getEndOffset();
} }
@ -246,20 +282,18 @@ public class BslModuleRegionsInfoService
return offset; 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(); if (isInternal)
switch (moduleOwnerName)
{ {
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); 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) private String getDeclaredRegionNameForForm(EventItemType itemType, ScriptVariant scriptVariant)
@ -287,8 +321,12 @@ public class BslModuleRegionsInfoService
return ModuleStructureSection.EVENT_HANDLERS.getName(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)) if (itemType.equals(EventItemType.TABLE))
{ {
EObject container = eventOwner; EObject container = eventOwner;
@ -318,4 +356,35 @@ public class BslModuleRegionsInfoService
return regionName.length() >= declaredRegionNameLength return regionName.length() >= declaredRegionNameLength
&& regionName.substring(0, declaredRegionNameLength).equals(declaredRegionName); && regionName.substring(0, declaredRegionNameLength).equals(declaredRegionName);
} }
private final class ModuleInfo
{
private final EClass owner;
private final List<RegionPreprocessor> regionPreprocessors;
public ModuleInfo(EClass owner, List<RegionPreprocessor> regionPreprocessors)
{
this.owner = owner;
this.regionPreprocessors = regionPreprocessors;
}
}
private final class ModuleInfoUnitOfWork
implements IUnitOfWork<ModuleInfo, XtextResource>
{
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));
}
}
} }

View File

@ -14,8 +14,6 @@ package com.e1c.v8codestyle.internal.bsl.ui.views;
import java.text.MessageFormat; import java.text.MessageFormat;
import javax.inject.Inject;
import org.eclipse.jface.action.IMenuManager; import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.IToolBarManager; import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.action.MenuManager; import org.eclipse.jface.action.MenuManager;
@ -32,8 +30,8 @@ import org.eclipse.swt.widgets.Menu;
import org.eclipse.ui.IActionBars; import org.eclipse.ui.IActionBars;
import org.eclipse.ui.ISelectionListener; import org.eclipse.ui.ISelectionListener;
import org.eclipse.ui.ISharedImages; import org.eclipse.ui.ISharedImages;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchActionConstants; import org.eclipse.ui.IWorkbenchActionConstants;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.part.ViewPart; import org.eclipse.ui.part.ViewPart;
import org.eclipse.xtext.resource.EObjectAtOffsetHelper; 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$ public static final String ID = "com.e1c.v8codestyle.bsl.ui.views.BslDocCommentView"; //$NON-NLS-1$
@Inject
private IWorkbench workbench;
private TreeViewer viewer; private TreeViewer viewer;
private ISelectionListener listener; private ISelectionListener listener;
@ -254,7 +249,7 @@ public class BslDocCommentView
{ {
imageKey = ISharedImages.IMG_OBJ_FOLDER; imageKey = ISharedImages.IMG_OBJ_FOLDER;
} }
return workbench.getSharedImages().getImage(imageKey); return PlatformUI.getWorkbench().getSharedImages().getImage(imageKey);
} }
} }

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<classpath> <classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/> <classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/> <classpathentry kind="output" path="bin"/>

View File

@ -1,8 +1,8 @@
eclipse.preferences.version=1 eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 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.compliance=11 org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
org.eclipse.jdt.core.compiler.source=11 org.eclipse.jdt.core.compiler.source=17

View File

@ -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;bundle-version="[2.17.0,3.0.0)",
org.eclipse.xtext.builder;bundle-version="[2.18.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 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 Automatic-Module-Name: com.e1c.v8codestyle.bsl
Bundle-ActivationPolicy: lazy 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.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.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.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.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;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.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.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.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.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;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.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.bsl.validation;version="[18.0.0,19.0.0)",
com._1c.g5.v8.dt.common;version="[6.0.0,7.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._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.naming;version="1.0.0",
com.e1c.g5.dt.core.api.platform;version="[1.1.0,2.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.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;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.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.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;version="[0.7.0,0.8.0)",
com.e1c.v8codestyle.check;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", Export-Package: com.e1c.v8codestyle.bsl;version="0.7.0",

View File

@ -17,39 +17,38 @@ import static com._1c.g5.v8.dt.bsl.model.BslPackage.Literals.STRING_LITERAL__LIN
import java.util.Collection; import java.util.Collection;
import java.util.List; import java.util.List;
import java.util.stream.StreamSupport;
import org.eclipse.core.runtime.IProgressMonitor; 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.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.dt.bsl.model.BslFactory;
import com._1c.g5.v8.bm.integration.IBmModel; import com._1c.g5.v8.dt.bsl.model.BslPackage;
import com._1c.g5.v8.dt.bsl.model.BslIndexPackage;
import com._1c.g5.v8.dt.bsl.model.DynamicFeatureAccess; 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.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.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.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.OperatorStyleCreator;
import com._1c.g5.v8.dt.bsl.model.StaticFeatureAccess; 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.model.StringLiteral;
import com._1c.g5.v8.dt.bsl.resource.DynamicFeatureAccessComputer; 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.common.StringUtils;
import com._1c.g5.v8.dt.core.platform.IBmModelManager; import com._1c.g5.v8.dt.mcore.ContextDef;
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.DerivedProperty; import com._1c.g5.v8.dt.mcore.DerivedProperty;
import com._1c.g5.v8.dt.mcore.Environmental; 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.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.Environments;
import com._1c.g5.v8.dt.mcore.util.McoreUtil; 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.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.CheckComplexity;
import com.e1c.g5.v8.dt.check.ICheckParameters; import com.e1c.g5.v8.dt.check.ICheckParameters;
import com.e1c.g5.v8.dt.check.components.BasicCheck; 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 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 = "ThisObject"; //$NON-NLS-1$
private static final String THIS_OBJECT_RU = "ЭтотОбъект"; //$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 DynamicFeatureAccessComputer dynamicFeatureAccessComputer;
private final ExportMethodProvider exportMethodProvider; private final IScopeProvider scopeProvider;
private final IResourceLookup resourceLookup;
private final INamingService namingService;
private final IBmModelManager bmModelManager;
/** /**
* Instantiates a new notify description to server procedure check. * Instantiates a new notify description to server procedure check.
* *
* @param dynamicFeatureAccessComputer the dynamic feature access computer service, cannot be {@code null} * @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 @Inject
public NotifyDescriptionToServerProcedureCheck(DynamicFeatureAccessComputer dynamicFeatureAccessComputer, public NotifyDescriptionToServerProcedureCheck(DynamicFeatureAccessComputer dynamicFeatureAccessComputer,
ExportMethodProvider exportMethodProvider, IResourceLookup resourceLookup, INamingService namingService, IScopeProvider scopeProvider)
IBmModelManager bmModelManager)
{ {
super(); super();
this.dynamicFeatureAccessComputer = dynamicFeatureAccessComputer; this.dynamicFeatureAccessComputer = dynamicFeatureAccessComputer;
this.exportMethodProvider = exportMethodProvider; this.scopeProvider = scopeProvider;
this.resourceLookup = resourceLookup;
this.namingService = namingService;
this.bmModelManager = bmModelManager;
} }
@Override @Override
@ -142,33 +128,13 @@ public class NotifyDescriptionToServerProcedureCheck
} }
StringLiteral param = (StringLiteral)osc.getParams().get(0); StringLiteral param = (StringLiteral)osc.getParams().get(0);
final String methodName = getCalledProcedureName(param); String methodName = getCalledProcedureName(param);
if (monitor.isCanceled() || StringUtils.isBlank(methodName)) if (monitor.isCanceled() || StringUtils.isBlank(methodName))
{ {
return; return;
} }
String contextDefUriAsString = getBslModuleUri(osc); Collection<Environmental> methods = getMethods(methodName, osc, monitor);
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<Method> methods = exportMethodProvider.getMockMethods(index.getContextDef(), methodName, osc);
if (methods.isEmpty()) if (methods.isEmpty())
{ {
resultAceptor.addIssue( resultAceptor.addIssue(
@ -177,7 +143,7 @@ public class NotifyDescriptionToServerProcedureCheck
} }
else else
{ {
for (Method method : methods) for (Environmental method : methods)
{ {
Environments calleeEnv = method.environments(); Environments calleeEnv = method.environments();
if (calleeEnv.containsAny(Environments.MNG_CLIENTS)) if (calleeEnv.containsAny(Environments.MNG_CLIENTS))
@ -193,6 +159,75 @@ public class NotifyDescriptionToServerProcedureCheck
} }
private Collection<Environmental> getMethods(String methodName, OperatorStyleCreator osc, IProgressMonitor monitor)
{
List<Expression> params = osc.getParams();
if (params.size() > 1)
{
Expression moduleParam = params.get(1);
if (moduleParam instanceof FeatureAccess featureAccess)
{
if (featureAccess instanceof StaticFeatureAccess
&& (THIS_OBJECT_RU.equals(featureAccess.getName()) || THIS_OBJECT.equals(featureAccess.getName())))
{
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
{
Environmental environmental = EcoreUtil2.getContainerOfType(featureAccess, Environmental.class);
List<FeatureEntry> 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<TypeItem> 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 List.of();
}
private String getCalledProcedureName(Expression param) private String getCalledProcedureName(Expression param)
{ {
if (param instanceof StringLiteral) if (param instanceof StringLiteral)
@ -205,104 +240,4 @@ public class NotifyDescriptionToServerProcedureCheck
} }
return null; return null;
} }
private String getBslModuleUri(OperatorStyleCreator osc)
{
List<Expression> 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<FeatureEntry> features = dynamicFeatureAccessComputer.getLastObject(object, environmental.environments());
for (FeatureEntry featureEntry : features)
{
EObject feature = featureEntry.getFeature();
if (feature instanceof Property && ((Property)feature).getName().equals(THIS_OBJECT))
{
Expression staticFeatureAccess = object.getSource();
if (staticFeatureAccess instanceof StaticFeatureAccess)
{
return getCommonModuleUri((StaticFeatureAccess)staticFeatureAccess);
}
}
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)
{
return EcoreUtil.getURI(module);
}
}
}
return null;
}
private URI getCommonModuleUri(StaticFeatureAccess object)
{
for (FeatureEntry entry : object.getFeatureEntries())
{
EObject f = entry.getFeature();
if (f instanceof DerivedProperty)
{
EObject source = ((DerivedProperty)f).getSource();
if (source instanceof CommonModule)
{
return EcoreUtil.getURI((EObject)source.eGet(MdClassPackage.Literals.COMMON_MODULE__MODULE, false));
}
}
}
return null;
}
} }

View File

@ -33,6 +33,8 @@ import com._1c.g5.v8.dt.bsl.resource.TypesComputer;
import com._1c.g5.v8.dt.common.StringUtils; 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.IBmModelManager;
import com._1c.g5.v8.dt.core.platform.IResourceLookup; 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.Method;
import com._1c.g5.v8.dt.mcore.Parameter; import com._1c.g5.v8.dt.mcore.Parameter;
import com._1c.g5.v8.dt.mcore.Property; import com._1c.g5.v8.dt.mcore.Property;
@ -52,14 +54,15 @@ public abstract class AbstractDocCommentTypeCheck
/** /**
* Constructs an instance * Constructs an instance
* *
* @param resourceLookup * @param resourceLookup service for look up workspace resources, see {@link IResourceLookup}, cannot be <code>null</code>
* @param namingService * @param namingService service for getting names of EDT object and resources, cannot be <code>null</code>
* @param bmModelManager * @param bmModelManager service for getting instance of Bm Model by {@link EObject}, cannot be <code>null</code>
* @param v8ProjectManager {@link IV8ProjectManager} for getting {@link IV8Project} by {@link EObject}, cannot be <code>null</code>
*/ */
protected AbstractDocCommentTypeCheck(IResourceLookup resourceLookup, INamingService namingService, 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 @@ public abstract class AbstractDocCommentTypeCheck
|| (linkPart.getPartsWithOffset().get(linkPart.getPartsWithOffset().size() - 1)).getFirst().isEmpty())) || (linkPart.getPartsWithOffset().get(linkPart.getPartsWithOffset().size() - 1)).getFirst().isEmpty()))
{ {
return Optional.ofNullable(linkPart.getActualObjectForPart(linkPart.getPartsWithOffset().size() - 2, return Optional.ofNullable(linkPart.getActualObjectForPart(linkPart.getPartsWithOffset().size() - 2,
scopeProvider, context, typeComputationContext)); scopeProvider, context, v8ProjectManager, typeComputationContext));
} }
else else
{ {
return Optional.ofNullable(linkPart.getActualObjectForPart(linkPart.getPartsWithOffset().size() - 1, return Optional.ofNullable(linkPart.getActualObjectForPart(linkPart.getPartsWithOffset().size() - 1,
scopeProvider, context, typeComputationContext)); scopeProvider, context, v8ProjectManager, typeComputationContext));
} }
} }

View File

@ -17,6 +17,7 @@ import java.util.Set;
import java.util.TreeSet; import java.util.TreeSet;
import org.eclipse.core.runtime.IProgressMonitor; 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;
import com._1c.g5.v8.dt.bsl.documentation.comment.IDescriptionPart; import com._1c.g5.v8.dt.bsl.documentation.comment.IDescriptionPart;
@ -25,6 +26,8 @@ import com._1c.g5.v8.dt.bsl.documentation.comment.TypeSection.TypeDefinition;
import com._1c.g5.v8.dt.common.StringUtils; 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.IBmModelManager;
import com._1c.g5.v8.dt.core.platform.IResourceLookup; 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._1c.g5.v8.dt.platform.IEObjectTypeNames;
import com.e1c.g5.dt.core.api.naming.INamingService; import com.e1c.g5.dt.core.api.naming.INamingService;
import com.e1c.g5.dt.core.api.platform.BmOperationContext; import com.e1c.g5.dt.core.api.platform.BmOperationContext;
@ -65,15 +68,16 @@ public class CollectionTypeDefinitionCheck
/** /**
* Constructs an instance * Constructs an instance
* *
* @param resourceLookup * @param resourceLookup service for look up workspace resources, see {@link IResourceLookup}, cannot be <code>null</code>
* @param namingService * @param namingService service for getting names of EDT object and resources, cannot be <code>null</code>
* @param bmModelManager * @param bmModelManager service for getting instance of Bm Model by {@link EObject}, cannot be <code>null</code>
* @param v8ProjectManager {@link IV8ProjectManager} for getting {@link IV8Project} by {@link EObject}, cannot be <code>null</code>
*/ */
@Inject @Inject
public CollectionTypeDefinitionCheck(IResourceLookup resourceLookup, INamingService namingService, public CollectionTypeDefinitionCheck(IResourceLookup resourceLookup, INamingService namingService,
IBmModelManager bmModelManager) IBmModelManager bmModelManager, IV8ProjectManager v8ProjectManager)
{ {
super(resourceLookup, namingService, bmModelManager); super(resourceLookup, namingService, bmModelManager, v8ProjectManager);
} }
@Override @Override

View File

@ -17,6 +17,7 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import org.eclipse.core.runtime.IProgressMonitor; 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;
import com._1c.g5.v8.dt.bsl.documentation.comment.BslDocumentationComment.Description; import com._1c.g5.v8.dt.bsl.documentation.comment.BslDocumentationComment.Description;
@ -24,6 +25,8 @@ import com._1c.g5.v8.dt.bsl.documentation.comment.IDescriptionPart;
import com._1c.g5.v8.dt.bsl.documentation.comment.TextPart; 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.IBmModelManager;
import com._1c.g5.v8.dt.core.platform.IResourceLookup; 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.naming.INamingService;
import com.e1c.g5.dt.core.api.platform.BmOperationContext; import com.e1c.g5.dt.core.api.platform.BmOperationContext;
import com.e1c.g5.v8.dt.bsl.check.DocumentationCommentBasicDelegateCheck; import com.e1c.g5.v8.dt.bsl.check.DocumentationCommentBasicDelegateCheck;
@ -65,11 +68,19 @@ public class DocCommentUseMinusCheck
private static final int SHOW_PREV_SYMBOLS = 7; private static final int SHOW_PREV_SYMBOLS = 7;
/**
* Constructs an instance
*
* @param resourceLookup service for look up workspace resources, see {@link IResourceLookup}, cannot be <code>null</code>
* @param namingService service for getting names of EDT object and resources, cannot be <code>null</code>
* @param bmModelManager service for getting instance of Bm Model by {@link EObject}, cannot be <code>null</code>
* @param v8ProjectManager {@link IV8ProjectManager} for getting {@link IV8Project} by {@link EObject}, cannot be <code>null</code>
*/
@Inject @Inject
public DocCommentUseMinusCheck(IResourceLookup resourceLookup, INamingService namingService, public DocCommentUseMinusCheck(IResourceLookup resourceLookup, INamingService namingService,
IBmModelManager bmModelManager) IBmModelManager bmModelManager, IV8ProjectManager v8ProjectManager)
{ {
super(resourceLookup, namingService, bmModelManager); super(resourceLookup, namingService, bmModelManager, v8ProjectManager);
} }
@Override @Override

View File

@ -16,6 +16,7 @@ import static com._1c.g5.v8.dt.mcore.McorePackage.Literals.NAMED_ELEMENT__NAME;
import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.scoping.IScopeProvider; import org.eclipse.xtext.scoping.IScopeProvider;
import com._1c.g5.v8.dt.bsl.comment.DocumentationCommentProperties; import com._1c.g5.v8.dt.bsl.comment.DocumentationCommentProperties;
@ -28,6 +29,8 @@ import com._1c.g5.v8.dt.bsl.documentation.comment.LinkPart;
import com._1c.g5.v8.dt.bsl.model.Function; 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.IBmModelManager;
import com._1c.g5.v8.dt.core.platform.IResourceLookup; 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.naming.INamingService;
import com.e1c.g5.dt.core.api.platform.BmOperationContext; import com.e1c.g5.dt.core.api.platform.BmOperationContext;
import com.e1c.g5.v8.dt.check.CheckComplexity; import com.e1c.g5.v8.dt.check.CheckComplexity;
@ -61,19 +64,20 @@ public class ExportFunctionReturnSectionCheck
/** /**
* Instantiates a new check of export function return section. * Instantiates a new check of export function return section.
* *
* @param resourceLookup the resource lookup service, cannot be {@code null}. * @param resourceLookup service for look up workspace resources, see {@link IResourceLookup}, cannot be <code>null</code>
* @param namingService * @param namingService service for getting names of EDT object and resources, cannot be <code>null</code>
* @param bmModelManager * @param bmModelManager service for getting instance of Bm Model by {@link EObject}, cannot be <code>null</code>
* @param v8ProjectManager {@link IV8ProjectManager} for getting {@link IV8Project} by {@link EObject}, cannot be <code>null</code>
* @param bslPreferences the BSL preferences service, cannot be {@code null}. * @param bslPreferences the BSL preferences service, cannot be {@code null}.
* @param commentProvider the comment provider 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}. * @param scopeProvider the scope provider service, cannot be {@code null}.
*/ */
@Inject @Inject
public ExportFunctionReturnSectionCheck(IResourceLookup resourceLookup, INamingService namingService, public ExportFunctionReturnSectionCheck(IResourceLookup resourceLookup, INamingService namingService,
IBmModelManager bmModelManager, IBslPreferences bslPreferences, IBmModelManager bmModelManager, IV8ProjectManager v8ProjectManager, IBslPreferences bslPreferences,
BslMultiLineCommentDocumentationProvider commentProvider, IScopeProvider scopeProvider) BslMultiLineCommentDocumentationProvider commentProvider, IScopeProvider scopeProvider)
{ {
super(resourceLookup, namingService, bmModelManager); super(resourceLookup, namingService, bmModelManager, v8ProjectManager);
this.resourceLookup = resourceLookup; this.resourceLookup = resourceLookup;
this.bslPreferences = bslPreferences; this.bslPreferences = bslPreferences;
this.commentProvider = commentProvider; this.commentProvider = commentProvider;
@ -117,7 +121,7 @@ public class ExportFunctionReturnSectionCheck
DocumentationCommentProperties props = bslPreferences.getDocumentCommentProperties(project); DocumentationCommentProperties props = bslPreferences.getDocumentCommentProperties(project);
docComment = BslCommentUtils.getLinkPartCommentContent(linkPart, scopeProvider, commentProvider, docComment = BslCommentUtils.getLinkPartCommentContent(linkPart, scopeProvider, commentProvider,
props.oldCommentFormat(), root.getMethod(), typeComputationContext); props.oldCommentFormat(), root.getMethod(), v8ProjectManager, typeComputationContext);
} }
if (docComment == null || docComment.getReturnSection() == null || isTypeEmptyAndNoLink( if (docComment == null || docComment.getReturnSection() == null || isTypeEmptyAndNoLink(

View File

@ -26,6 +26,8 @@ import com._1c.g5.v8.dt.bsl.model.PreprocessorItem;
import com._1c.g5.v8.dt.bsl.model.RegionPreprocessor; 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.IBmModelManager;
import com._1c.g5.v8.dt.core.platform.IResourceLookup; 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.naming.INamingService;
import com.e1c.g5.dt.core.api.platform.BmOperationContext; import com.e1c.g5.dt.core.api.platform.BmOperationContext;
import com.e1c.g5.v8.dt.check.CheckComplexity; 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$ 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 <code>null</code>
* @param namingService service for getting names of EDT object and resources, cannot be <code>null</code>
* @param bmModelManager service for getting instance of Bm Model by {@link EObject}, cannot be <code>null</code>
* @param v8ProjectManager {@link IV8ProjectManager} for getting {@link IV8Project} by {@link EObject}, cannot be <code>null</code>
*/
@Inject @Inject
public ExportProcedureCommentDescriptionCheck(IResourceLookup resourceLookup, INamingService namingService, public ExportProcedureCommentDescriptionCheck(IResourceLookup resourceLookup, INamingService namingService,
IBmModelManager bmModelManager) IBmModelManager bmModelManager, IV8ProjectManager v8ProjectManager)
{ {
super(resourceLookup, namingService, bmModelManager); super(resourceLookup, namingService, bmModelManager, v8ProjectManager);
} }
@Override @Override

View File

@ -16,6 +16,7 @@ import java.text.MessageFormat;
import java.util.List; import java.util.List;
import org.eclipse.core.runtime.IProgressMonitor; 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;
import com._1c.g5.v8.dt.bsl.documentation.comment.IDescriptionPart; import com._1c.g5.v8.dt.bsl.documentation.comment.IDescriptionPart;
@ -24,6 +25,8 @@ import com._1c.g5.v8.dt.bsl.documentation.comment.TypeSection.TypeDefinition;
import com._1c.g5.v8.dt.common.StringUtils; 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.IBmModelManager;
import com._1c.g5.v8.dt.core.platform.IResourceLookup; 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.naming.INamingService;
import com.e1c.g5.dt.core.api.platform.BmOperationContext; import com.e1c.g5.dt.core.api.platform.BmOperationContext;
import com.e1c.g5.v8.dt.bsl.check.DocumentationCommentBasicDelegateCheck; 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$ 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 <code>null</code>
* @param namingService service for getting names of EDT object and resources, cannot be <code>null</code>
* @param bmModelManager service for getting instance of Bm Model by {@link EObject}, cannot be <code>null</code>
* @param v8ProjectManager {@link IV8ProjectManager} for getting {@link IV8Project} by {@link EObject}, cannot be <code>null</code>
*/
@Inject @Inject
public FieldDefinitionNameCheck(IResourceLookup resourceLookup, INamingService namingService, public FieldDefinitionNameCheck(IResourceLookup resourceLookup, INamingService namingService,
IBmModelManager bmModelManager) IBmModelManager bmModelManager, IV8ProjectManager v8ProjectManager)
{ {
super(resourceLookup, namingService, bmModelManager); super(resourceLookup, namingService, bmModelManager, v8ProjectManager);
} }
@Override @Override

View File

@ -15,12 +15,15 @@ package com.e1c.v8codestyle.bsl.comment.check;
import java.text.MessageFormat; import java.text.MessageFormat;
import org.eclipse.core.runtime.IProgressMonitor; 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;
import com._1c.g5.v8.dt.bsl.documentation.comment.IDescriptionPart; 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.bsl.documentation.comment.TypeSection.FieldDefinition;
import com._1c.g5.v8.dt.core.platform.IBmModelManager; 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.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.naming.INamingService;
import com.e1c.g5.dt.core.api.platform.BmOperationContext; import com.e1c.g5.dt.core.api.platform.BmOperationContext;
import com.e1c.g5.v8.dt.check.CheckComplexity; 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$ 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 <code>null</code>
* @param namingService service for getting names of EDT object and resources, cannot be <code>null</code>
* @param bmModelManager service for getting instance of Bm Model by {@link EObject}, cannot be <code>null</code>
* @param v8ProjectManager {@link IV8ProjectManager} for getting {@link IV8Project} by {@link EObject}, cannot be <code>null</code>
*/
@Inject @Inject
public FieldDefinitionTypeCheck(IResourceLookup resourceLookup, INamingService namingService, public FieldDefinitionTypeCheck(IResourceLookup resourceLookup, INamingService namingService,
IBmModelManager bmModelManager) IBmModelManager bmModelManager, IV8ProjectManager v8ProjectManager)
{ {
super(resourceLookup, namingService, bmModelManager); super(resourceLookup, namingService, bmModelManager, v8ProjectManager);
} }
@Override @Override

View File

@ -30,6 +30,8 @@ import com._1c.g5.v8.dt.bsl.documentation.comment.TypeSection.TypeDefinition;
import com._1c.g5.v8.dt.common.StringUtils; 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.IBmModelManager;
import com._1c.g5.v8.dt.core.platform.IResourceLookup; 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._1c.g5.v8.dt.platform.IEObjectTypeNames;
import com.e1c.g5.dt.core.api.naming.INamingService; import com.e1c.g5.dt.core.api.naming.INamingService;
import com.e1c.g5.dt.core.api.platform.BmOperationContext; 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. * 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 <code>null</code>
* @param namingService service for getting names of EDT object and resources, cannot be <code>null</code>
* @param bmModelManager service for getting instance of Bm Model by {@link EObject}, cannot be <code>null</code>
* @param v8ProjectManager {@link IV8ProjectManager} for getting {@link IV8Project} by {@link EObject}, cannot be <code>null</code>
* @param scopeProvider the scope provider service, cannot be {@code null}. * @param scopeProvider the scope provider service, cannot be {@code null}.
*/ */
@Inject @Inject
public FieldDefinitionTypeWithLinkRefCheck(IResourceLookup resourceLookup, INamingService namingService, 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; this.scopeProvider = scopeProvider;
} }

View File

@ -18,6 +18,7 @@ import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.naming.IQualifiedNameConverter; import org.eclipse.xtext.naming.IQualifiedNameConverter;
import org.eclipse.xtext.naming.QualifiedName;
import org.eclipse.xtext.scoping.IScope; import org.eclipse.xtext.scoping.IScope;
import org.eclipse.xtext.scoping.IScopeProvider; import org.eclipse.xtext.scoping.IScopeProvider;
@ -30,6 +31,8 @@ import com._1c.g5.v8.dt.bsl.model.Function;
import com._1c.g5.v8.dt.bsl.model.Method; 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.IBmModelManager;
import com._1c.g5.v8.dt.core.platform.IResourceLookup; 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.McorePackage;
import com._1c.g5.v8.dt.mcore.TypeItem; import com._1c.g5.v8.dt.mcore.TypeItem;
import com.e1c.g5.dt.core.api.naming.INamingService; import com.e1c.g5.dt.core.api.naming.INamingService;
@ -64,12 +67,25 @@ public class FunctionReturnSectionCheck
private final IQualifiedNameConverter qualifiedNameConverter; private final IQualifiedNameConverter qualifiedNameConverter;
/**
* Constructs an instance
*
* @param resourceLookup service for look up workspace resources, see {@link IResourceLookup}, cannot be <code>null</code>
* @param namingService service for getting names of EDT object and resources, cannot be <code>null</code>
* @param bmModelManager service for getting instance of Bm Model by {@link EObject}, cannot be <code>null</code>
* @param v8ProjectManager {@link IV8ProjectManager} for getting {@link IV8Project} by {@link EObject}, cannot be <code>null</code>
* @param bslPreferences service for getting preferences for Built-In language, cannot be <code>null</code>
* @param qualifiedNameConverter service for getting {@link QualifiedName} by {@link EObject}, cannot be <code>null</code>
* @param scopeProvider service for getting {@link IScope} for Built-In language, cannot be <code>null</code>
* @param commentProvider service for getting comments content in Built-In language, cannot be <code>null</code>
*/
@Inject @Inject
public FunctionReturnSectionCheck(IResourceLookup resourceLookup, INamingService namingService, public FunctionReturnSectionCheck(IResourceLookup resourceLookup, INamingService namingService,
IBmModelManager bmModelManager, IBslPreferences bslPreferences, IQualifiedNameConverter qualifiedNameConverter, IBmModelManager bmModelManager, IV8ProjectManager v8ProjectManager, IBslPreferences bslPreferences,
IScopeProvider scopeProvider, BslMultiLineCommentDocumentationProvider commentProvider) IQualifiedNameConverter qualifiedNameConverter, IScopeProvider scopeProvider,
BslMultiLineCommentDocumentationProvider commentProvider)
{ {
super(resourceLookup, namingService, bmModelManager); super(resourceLookup, namingService, bmModelManager, v8ProjectManager);
this.resourceLookup = resourceLookup; this.resourceLookup = resourceLookup;
this.bslPreferences = bslPreferences; this.bslPreferences = bslPreferences;
this.qualifiedNameConverter = qualifiedNameConverter; this.qualifiedNameConverter = qualifiedNameConverter;
@ -119,7 +135,7 @@ public class FunctionReturnSectionCheck
IScope typeScope = scopeProvider.getScope(method, McorePackage.Literals.TYPE_DESCRIPTION__TYPES); IScope typeScope = scopeProvider.getScope(method, McorePackage.Literals.TYPE_DESCRIPTION__TYPES);
Collection<TypeItem> computedReturnTypes = Collection<TypeItem> computedReturnTypes =
root.computeReturnTypes(typeScope, scopeProvider, qualifiedNameConverter, commentProvider, root.computeReturnTypes(typeScope, scopeProvider, qualifiedNameConverter, commentProvider, v8ProjectManager,
oldCommentFormat(root.getModule()), method, typeComputationContext); oldCommentFormat(root.getModule()), method, typeComputationContext);
if (computedReturnTypes.isEmpty()) if (computedReturnTypes.isEmpty())

View File

@ -13,6 +13,7 @@
package com.e1c.v8codestyle.bsl.comment.check; package com.e1c.v8codestyle.bsl.comment.check;
import org.eclipse.core.runtime.IProgressMonitor; 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;
import com._1c.g5.v8.dt.bsl.documentation.comment.BslDocumentationComment.Description; import com._1c.g5.v8.dt.bsl.documentation.comment.BslDocumentationComment.Description;
@ -20,6 +21,8 @@ import com._1c.g5.v8.dt.bsl.documentation.comment.IDescriptionPart;
import com._1c.g5.v8.dt.bsl.documentation.comment.TextPart; 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.IBmModelManager;
import com._1c.g5.v8.dt.core.platform.IResourceLookup; 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.naming.INamingService;
import com.e1c.g5.dt.core.api.platform.BmOperationContext; import com.e1c.g5.dt.core.api.platform.BmOperationContext;
import com.e1c.g5.v8.dt.bsl.check.DocumentationCommentBasicDelegateCheck; 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$ 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 <code>null</code>
* @param namingService service for getting names of EDT object and resources, cannot be <code>null</code>
* @param bmModelManager service for getting instance of Bm Model by {@link EObject}, cannot be <code>null</code>
* @param v8ProjectManager {@link IV8ProjectManager} for getting {@link IV8Project} by {@link EObject}, cannot be <code>null</code>
*/
@Inject @Inject
public MultilineDescriptionEndsOnDotCheck(IResourceLookup resourceLookup, INamingService namingService, public MultilineDescriptionEndsOnDotCheck(IResourceLookup resourceLookup, INamingService namingService,
IBmModelManager bmModelManager) IBmModelManager bmModelManager, IV8ProjectManager v8ProjectManager)
{ {
super(resourceLookup, namingService, bmModelManager); super(resourceLookup, namingService, bmModelManager, v8ProjectManager);
} }
@Override @Override

View File

@ -16,6 +16,7 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import org.eclipse.core.runtime.IProgressMonitor; 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;
import com._1c.g5.v8.dt.bsl.documentation.comment.BslDocumentationComment.Description; 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.bsl.model.Procedure; 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.IBmModelManager;
import com._1c.g5.v8.dt.core.platform.IResourceLookup; 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.naming.INamingService;
import com.e1c.g5.dt.core.api.platform.BmOperationContext; import com.e1c.g5.dt.core.api.platform.BmOperationContext;
import com.e1c.g5.v8.dt.bsl.check.DocumentationCommentBasicDelegateCheck; import com.e1c.g5.v8.dt.bsl.check.DocumentationCommentBasicDelegateCheck;
@ -57,11 +60,19 @@ public class MultilineDescriptionFieldSuggestionCheck
private static final Pattern PATTERN_FIELD = private static final Pattern PATTERN_FIELD =
Pattern.compile("^\\s*\\*+\\s*\\w+\\s*-", Pattern.UNICODE_CHARACTER_CLASS | Pattern.CASE_INSENSITIVE); //$NON-NLS-1$ 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 <code>null</code>
* @param namingService service for getting names of EDT object and resources, cannot be <code>null</code>
* @param bmModelManager service for getting instance of Bm Model by {@link EObject}, cannot be <code>null</code>
* @param v8ProjectManager {@link IV8ProjectManager} for getting {@link IV8Project} by {@link EObject}, cannot be <code>null</code>
*/
@Inject @Inject
public MultilineDescriptionFieldSuggestionCheck(IResourceLookup resourceLookup, INamingService namingService, public MultilineDescriptionFieldSuggestionCheck(IResourceLookup resourceLookup, INamingService namingService,
IBmModelManager bmModelManager) IBmModelManager bmModelManager, IV8ProjectManager v8ProjectManager)
{ {
super(resourceLookup, namingService, bmModelManager); super(resourceLookup, namingService, bmModelManager, v8ProjectManager);
} }
@Override @Override

View File

@ -18,6 +18,7 @@ import java.util.regex.Pattern;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import org.eclipse.core.runtime.IProgressMonitor; 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;
import com._1c.g5.v8.dt.bsl.documentation.comment.BslDocumentationComment.Description; import com._1c.g5.v8.dt.bsl.documentation.comment.BslDocumentationComment.Description;
@ -27,6 +28,8 @@ import com._1c.g5.v8.dt.bsl.model.FormalParam;
import com._1c.g5.v8.dt.common.StringUtils; 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.IBmModelManager;
import com._1c.g5.v8.dt.core.platform.IResourceLookup; 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.naming.INamingService;
import com.e1c.g5.dt.core.api.platform.BmOperationContext; import com.e1c.g5.dt.core.api.platform.BmOperationContext;
import com.e1c.g5.v8.dt.bsl.check.DocumentationCommentBasicDelegateCheck; 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$ 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 <code>null</code>
* @param namingService service for getting names of EDT object and resources, cannot be <code>null</code>
* @param bmModelManager service for getting instance of Bm Model by {@link EObject}, cannot be <code>null</code>
* @param v8ProjectManager {@link IV8ProjectManager} for getting {@link IV8Project} by {@link EObject}, cannot be <code>null</code>
*/
@Inject @Inject
public MultilineDescriptionParameterSuggestionCheck(IResourceLookup resourceLookup, INamingService namingService, public MultilineDescriptionParameterSuggestionCheck(IResourceLookup resourceLookup, INamingService namingService,
IBmModelManager bmModelManager) IBmModelManager bmModelManager, IV8ProjectManager v8ProjectManager)
{ {
super(resourceLookup, namingService, bmModelManager); super(resourceLookup, namingService, bmModelManager, v8ProjectManager);
} }
@Override @Override

View File

@ -20,6 +20,9 @@ import java.util.TreeSet;
import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.IProgressMonitor; 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 org.eclipse.xtext.scoping.IScopeProvider;
import com._1c.g5.v8.dt.bsl.comment.DocumentationCommentProperties; import com._1c.g5.v8.dt.bsl.comment.DocumentationCommentProperties;
@ -36,6 +39,8 @@ import com._1c.g5.v8.dt.bsl.model.Method;
import com._1c.g5.v8.dt.common.StringUtils; 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.IBmModelManager;
import com._1c.g5.v8.dt.core.platform.IResourceLookup; 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.naming.INamingService;
import com.e1c.g5.dt.core.api.platform.BmOperationContext; import com.e1c.g5.dt.core.api.platform.BmOperationContext;
import com.e1c.g5.v8.dt.check.CheckComplexity; 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 static final String PARAMETER_PARMA_SECT_FOR_EXPORT = "requireParameterSectionOnlyForExport"; //$NON-NLS-1$
private final IResourceLookup resourceLookup;
private final IBslPreferences bslPreferences; private final IBslPreferences bslPreferences;
private final IScopeProvider scopeProvider; private final IScopeProvider scopeProvider;
private final BslMultiLineCommentDocumentationProvider commentProvider; private final BslMultiLineCommentDocumentationProvider commentProvider;
/**
* Constructs an instance
*
* @param resourceLookup service for look up workspace resources, see {@link IResourceLookup}, cannot be <code>null</code>
* @param namingService service for getting names of EDT object and resources, cannot be <code>null</code>
* @param bmModelManager service for getting instance of Bm Model by {@link EObject}, cannot be <code>null</code>
* @param v8ProjectManager {@link IV8ProjectManager} for getting {@link IV8Project} by {@link EObject}, cannot be <code>null</code>
* @param bslPreferences service for getting preferences for Built-In language, cannot be <code>null</code>
* @param qualifiedNameConverter service for getting {@link QualifiedName} by {@link EObject}, cannot be <code>null</code>
* @param scopeProvider service for getting {@link IScope} for Built-In language, cannot be <code>null</code>
* @param commentProvider service for getting comments content in Built-In language, cannot be <code>null</code>
*/
@Inject @Inject
public ParametersSectionCheck(IResourceLookup resourceLookup, INamingService namingService, public ParametersSectionCheck(IResourceLookup resourceLookup, INamingService namingService,
IBmModelManager bmModelManager, IBslPreferences bslPreferences, IScopeProvider scopeProvider, IBmModelManager bmModelManager, IV8ProjectManager v8ProjectManager, IBslPreferences bslPreferences,
BslMultiLineCommentDocumentationProvider commentProvider) IScopeProvider scopeProvider, BslMultiLineCommentDocumentationProvider commentProvider)
{ {
super(resourceLookup, namingService, bmModelManager); super(resourceLookup, namingService, bmModelManager, v8ProjectManager);
this.resourceLookup = resourceLookup;
this.bslPreferences = bslPreferences; this.bslPreferences = bslPreferences;
this.scopeProvider = scopeProvider; this.scopeProvider = scopeProvider;
this.commentProvider = commentProvider; this.commentProvider = commentProvider;
@ -159,7 +173,7 @@ public class ParametersSectionCheck
DocumentationCommentProperties props = bslPreferences.getDocumentCommentProperties(project); DocumentationCommentProperties props = bslPreferences.getDocumentCommentProperties(project);
docComment = BslCommentUtils.getLinkPartCommentContent(linkPart, scopeProvider, commentProvider, docComment = BslCommentUtils.getLinkPartCommentContent(linkPart, scopeProvider, commentProvider,
props.oldCommentFormat(), object.getMethod(), typeComputationContext); props.oldCommentFormat(), object.getMethod(), v8ProjectManager, typeComputationContext);
} }
if (docComment == null) if (docComment == null)
{ {

View File

@ -13,6 +13,7 @@
package com.e1c.v8codestyle.bsl.comment.check; package com.e1c.v8codestyle.bsl.comment.check;
import org.eclipse.core.runtime.IProgressMonitor; 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;
import com._1c.g5.v8.dt.bsl.documentation.comment.BslDocumentationComment.ReturnSection; import com._1c.g5.v8.dt.bsl.documentation.comment.BslDocumentationComment.ReturnSection;
@ -20,6 +21,8 @@ import com._1c.g5.v8.dt.bsl.documentation.comment.IDescriptionPart;
import com._1c.g5.v8.dt.bsl.model.Procedure; 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.IBmModelManager;
import com._1c.g5.v8.dt.core.platform.IResourceLookup; 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.naming.INamingService;
import com.e1c.g5.dt.core.api.platform.BmOperationContext; import com.e1c.g5.dt.core.api.platform.BmOperationContext;
import com.e1c.g5.v8.dt.bsl.check.DocumentationCommentBasicDelegateCheck; 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$ 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 <code>null</code>
* @param namingService service for getting names of EDT object and resources, cannot be <code>null</code>
* @param bmModelManager service for getting instance of Bm Model by {@link EObject}, cannot be <code>null</code>
* @param v8ProjectManager {@link IV8ProjectManager} for getting {@link IV8Project} by {@link EObject}, cannot be <code>null</code>
*/
@Inject @Inject
public ProcedureReturnSectionCheck(IResourceLookup resourceLookup, INamingService namingService, public ProcedureReturnSectionCheck(IResourceLookup resourceLookup, INamingService namingService,
IBmModelManager bmModelManager) IBmModelManager bmModelManager, IV8ProjectManager v8ProjectManager)
{ {
super(resourceLookup, namingService, bmModelManager); super(resourceLookup, namingService, bmModelManager, v8ProjectManager);
} }
@Override @Override

View File

@ -13,12 +13,15 @@
package com.e1c.v8codestyle.bsl.comment.check; package com.e1c.v8codestyle.bsl.comment.check;
import org.eclipse.core.runtime.IProgressMonitor; 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;
import com._1c.g5.v8.dt.bsl.documentation.comment.BslDocumentationComment.ParametersSection; 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.bsl.documentation.comment.IDescriptionPart;
import com._1c.g5.v8.dt.core.platform.IBmModelManager; 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.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.naming.INamingService;
import com.e1c.g5.dt.core.api.platform.BmOperationContext; import com.e1c.g5.dt.core.api.platform.BmOperationContext;
import com.e1c.g5.v8.dt.bsl.check.DocumentationCommentBasicDelegateCheck; 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$ 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 <code>null</code>
* @param namingService service for getting names of EDT object and resources, cannot be <code>null</code>
* @param bmModelManager service for getting instance of Bm Model by {@link EObject}, cannot be <code>null</code>
* @param v8ProjectManager {@link IV8ProjectManager} for getting {@link IV8Project} by {@link EObject}, cannot be <code>null</code>
*/
@Inject @Inject
public RedundantParametersSectionCheck(IResourceLookup resourceLookup, INamingService namingService, public RedundantParametersSectionCheck(IResourceLookup resourceLookup, INamingService namingService,
IBmModelManager bmModelManager) IBmModelManager bmModelManager, IV8ProjectManager v8ProjectManager)
{ {
super(resourceLookup, namingService, bmModelManager); super(resourceLookup, namingService, bmModelManager, v8ProjectManager);
} }
@Override @Override

View File

@ -13,6 +13,7 @@
package com.e1c.v8codestyle.bsl.comment.check; package com.e1c.v8codestyle.bsl.comment.check;
import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.scoping.IScopeProvider; import org.eclipse.xtext.scoping.IScopeProvider;
import com._1c.g5.v8.dt.bsl.documentation.comment.BslDocumentationComment; import com._1c.g5.v8.dt.bsl.documentation.comment.BslDocumentationComment;
@ -22,6 +23,8 @@ import com._1c.g5.v8.dt.bsl.documentation.comment.LinkPart;
import com._1c.g5.v8.dt.common.StringUtils; 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.IBmModelManager;
import com._1c.g5.v8.dt.core.platform.IResourceLookup; 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.naming.INamingService;
import com.e1c.g5.dt.core.api.platform.BmOperationContext; import com.e1c.g5.dt.core.api.platform.BmOperationContext;
import com.e1c.g5.v8.dt.check.CheckComplexity; import com.e1c.g5.v8.dt.check.CheckComplexity;
@ -61,13 +64,17 @@ public class RefLinkPartCheck
/** /**
* Instantiates a new reference link part check. * Instantiates a new reference link part check.
* *
* @param resourceLookup service for look up workspace resources, see {@link IResourceLookup}, cannot be <code>null</code>
* @param namingService service for getting names of EDT object and resources, cannot be <code>null</code>
* @param bmModelManager service for getting instance of Bm Model by {@link EObject}, cannot be <code>null</code>
* @param v8ProjectManager {@link IV8ProjectManager} for getting {@link IV8Project} by {@link EObject}, cannot be <code>null</code>
* @param scopeProvider the scope provider service, cannot be {@code null}. * @param scopeProvider the scope provider service, cannot be {@code null}.
*/ */
@Inject @Inject
public RefLinkPartCheck(IResourceLookup resourceLookup, INamingService namingService, 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; this.scopeProvider = scopeProvider;
} }

View File

@ -15,7 +15,9 @@ package com.e1c.v8codestyle.bsl.comment.check;
import java.text.MessageFormat; import java.text.MessageFormat;
import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.naming.IQualifiedNameConverter; import org.eclipse.xtext.naming.IQualifiedNameConverter;
import org.eclipse.xtext.naming.QualifiedName;
import org.eclipse.xtext.resource.IEObjectDescription; import org.eclipse.xtext.resource.IEObjectDescription;
import org.eclipse.xtext.scoping.IScope; import org.eclipse.xtext.scoping.IScope;
import org.eclipse.xtext.scoping.IScopeProvider; import org.eclipse.xtext.scoping.IScopeProvider;
@ -27,6 +29,8 @@ import com._1c.g5.v8.dt.bsl.documentation.comment.TypeSection.TypeDefinition;
import com._1c.g5.v8.dt.common.StringUtils; 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.IBmModelManager;
import com._1c.g5.v8.dt.core.platform.IResourceLookup; 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.McorePackage;
import com.e1c.g5.dt.core.api.naming.INamingService; import com.e1c.g5.dt.core.api.naming.INamingService;
import com.e1c.g5.dt.core.api.platform.BmOperationContext; import com.e1c.g5.dt.core.api.platform.BmOperationContext;
@ -53,11 +57,22 @@ public class TypeDefinitionCheck
private final IQualifiedNameConverter qualifiedNameConverter; private final IQualifiedNameConverter qualifiedNameConverter;
/**
* Constructs an instance
*
* @param resourceLookup service for look up workspace resources, see {@link IResourceLookup}, cannot be <code>null</code>
* @param namingService service for getting names of EDT object and resources, cannot be <code>null</code>
* @param bmModelManager service for getting instance of Bm Model by {@link EObject}, cannot be <code>null</code>
* @param v8ProjectManager {@link IV8ProjectManager} for getting {@link IV8Project} by {@link EObject}, cannot be <code>null</code>
* @param qualifiedNameConverter service for getting {@link QualifiedName} by {@link EObject}, cannot be <code>null</code>
* @param scopeProvider service for getting {@link IScope} for Built-In language, cannot be <code>null</code>
*/
@Inject @Inject
public TypeDefinitionCheck(IResourceLookup resourceLookup, INamingService namingService, 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.qualifiedNameConverter = qualifiedNameConverter;
this.scopeProvider = scopeProvider; this.scopeProvider = scopeProvider;
} }

View File

@ -20,6 +20,7 @@ import java.util.Set;
import java.util.TreeSet; import java.util.TreeSet;
import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.EcoreUtil2; import org.eclipse.xtext.EcoreUtil2;
import org.eclipse.xtext.naming.IQualifiedNameConverter; import org.eclipse.xtext.naming.IQualifiedNameConverter;
@ -32,6 +33,8 @@ import com._1c.g5.v8.dt.bsl.model.util.BslUtil;
import com._1c.g5.v8.dt.common.StringUtils; 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.IBmModelManager;
import com._1c.g5.v8.dt.core.platform.IResourceLookup; 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.Environmental;
import com._1c.g5.v8.dt.mcore.TypeItem; 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.Environments;
@ -66,11 +69,15 @@ public abstract class AbstractDynamicFeatureAccessTypeCheck
* @param resourceLookup the resource lookup service, cannot be {@code null}. * @param resourceLookup the resource lookup service, cannot be {@code null}.
* @param bslPreferences the BSL preferences 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 qualifiedNameConverter the qualified name converter service, cannot be {@code null}.
* @param namingService service for getting names of EDT object and resources, cannot be <code>null</code>
* @param bmModelManager service for getting instance of Bm Model by {@link EObject}, cannot be <code>null</code>
* @param v8ProjectManager {@link IV8ProjectManager} for getting {@link IV8Project} by {@link EObject}, cannot be <code>null</code>
*/ */
protected AbstractDynamicFeatureAccessTypeCheck(IResourceLookup resourceLookup, IBslPreferences bslPreferences, 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 @Override

View File

@ -55,6 +55,8 @@ import com._1c.g5.v8.dt.bsl.typesystem.util.TypeSystemUtil;
import com._1c.g5.v8.dt.core.platform.IBmModelManager; 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.IDtProject;
import com._1c.g5.v8.dt.core.platform.IResourceLookup; 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.Environmental;
import com._1c.g5.v8.dt.mcore.McorePackage; import com._1c.g5.v8.dt.mcore.McorePackage;
import com._1c.g5.v8.dt.mcore.Type; import com._1c.g5.v8.dt.mcore.Type;
@ -109,6 +111,11 @@ public abstract class AbstractTypeCheck
/** The comment provider service. */ /** The comment provider service. */
protected final BslMultiLineCommentDocumentationProvider commentProvider; protected final BslMultiLineCommentDocumentationProvider commentProvider;
/**
* {@link IV8ProjectManager} for getting {@link IV8Project} by {@link EObject}
*/
protected final IV8ProjectManager v8ProjectManager;
private final InternalTypeNameRegistry internalTypeNameRegistry; private final InternalTypeNameRegistry internalTypeNameRegistry;
/** /**
@ -117,15 +124,20 @@ public abstract class AbstractTypeCheck
* @param resourceLookup the resource lookup service, cannot be {@code null}. * @param resourceLookup the resource lookup service, cannot be {@code null}.
* @param bslPreferences the BSL preferences 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 qualifiedNameConverter the qualified name converter service, cannot be {@code null}.
* @param namingService service for getting names of EDT object and resources, cannot be <code>null</code>
* @param bmModelManager service for getting instance of Bm Model by {@link EObject}, cannot be <code>null</code>
* @param v8ProjectManager {@link IV8ProjectManager} for getting {@link IV8Project} by {@link EObject}, cannot be <code>null</code>
*/ */
protected AbstractTypeCheck(IResourceLookup resourceLookup, IBslPreferences bslPreferences, protected AbstractTypeCheck(IResourceLookup resourceLookup, IBslPreferences bslPreferences,
IQualifiedNameConverter qualifiedNameConverter, INamingService namingService, IBmModelManager bmModelManager) IQualifiedNameConverter qualifiedNameConverter, INamingService namingService, IBmModelManager bmModelManager,
IV8ProjectManager v8ProjectManager)
{ {
super(); super();
this.resourceLookup = resourceLookup; this.resourceLookup = resourceLookup;
this.namingService = namingService; this.namingService = namingService;
this.bmModelManager = bmModelManager; this.bmModelManager = bmModelManager;
this.bslPreferences = bslPreferences; this.bslPreferences = bslPreferences;
this.v8ProjectManager = v8ProjectManager;
IResourceServiceProvider rsp = IResourceServiceProvider rsp =
IResourceServiceProvider.Registry.INSTANCE.getResourceServiceProvider(URI.createURI("*.bsl")); //$NON-NLS-1$ IResourceServiceProvider.Registry.INSTANCE.getResourceServiceProvider(URI.createURI("*.bsl")); //$NON-NLS-1$
this.typeComputer = rsp.get(TypesComputer.class); this.typeComputer = rsp.get(TypesComputer.class);
@ -250,7 +262,7 @@ public abstract class AbstractTypeCheck
IProject project = resourceLookup.getProject(object); IProject project = resourceLookup.getProject(object);
boolean oldFormatComment = bslPreferences.getDocumentCommentProperties(project).oldCommentFormat(); boolean oldFormatComment = bslPreferences.getDocumentCommentProperties(project).oldCommentFormat();
return TypeSystemUtil.computeCommentTypes(object, typeScope, scopeProvider, qualifiedNameConverter, return TypeSystemUtil.computeCommentTypes(object, typeScope, scopeProvider, qualifiedNameConverter,
commentProvider, oldFormatComment, commentProvider, v8ProjectManager, oldFormatComment,
new BmOperationContext(namingService, bmModelManager, bmTransaction)); new BmOperationContext(namingService, bmModelManager, bmTransaction));
} }

View File

@ -17,12 +17,15 @@ import static com.e1c.v8codestyle.bsl.strict.check.StrictTypeAnnotationCheckExte
import java.text.MessageFormat; import java.text.MessageFormat;
import org.eclipse.core.runtime.IProgressMonitor; 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;
import com._1c.g5.v8.dt.bsl.documentation.comment.IDescriptionPart; 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.bsl.documentation.comment.TypeSection.FieldDefinition;
import com._1c.g5.v8.dt.core.platform.IBmModelManager; 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.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.naming.INamingService;
import com.e1c.g5.dt.core.api.platform.BmOperationContext; import com.e1c.g5.dt.core.api.platform.BmOperationContext;
import com.e1c.g5.v8.dt.check.CheckComplexity; 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$ private static final String CHECK_ID = "doc-comment-field-type-strict"; //$NON-NLS-1$
/** /**
* @param resourceLookup * Constructs an instance
* @param namingService *
* @param bmModelManager * @param resourceLookup service for look up workspace resources, see {@link IResourceLookup}, cannot be <code>null</code>
* @param namingService service for getting names of EDT object and resources, cannot be <code>null</code>
* @param bmModelManager service for getting instance of Bm Model by {@link EObject}, cannot be <code>null</code>
* @param v8ProjectManager {@link IV8ProjectManager} for getting {@link IV8Project} by {@link EObject}, cannot be <code>null</code>
*/ */
@Inject @Inject
public DocCommentFieldTypeCheck(IResourceLookup resourceLookup, INamingService namingService, public DocCommentFieldTypeCheck(IResourceLookup resourceLookup, INamingService namingService,
IBmModelManager bmModelManager) IBmModelManager bmModelManager, IV8ProjectManager v8ProjectManager)
{ {
super(resourceLookup, namingService, bmModelManager); super(resourceLookup, namingService, bmModelManager, v8ProjectManager);
} }
@Override @Override

View File

@ -14,12 +14,15 @@ package com.e1c.v8codestyle.bsl.strict.check;
import java.text.MessageFormat; import java.text.MessageFormat;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.naming.IQualifiedNameConverter; import org.eclipse.xtext.naming.IQualifiedNameConverter;
import com._1c.g5.v8.dt.bsl.common.IBslPreferences; import com._1c.g5.v8.dt.bsl.common.IBslPreferences;
import com._1c.g5.v8.dt.bsl.model.DynamicFeatureAccess; 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.IBmModelManager;
import com._1c.g5.v8.dt.core.platform.IResourceLookup; 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.naming.INamingService;
import com.google.inject.Inject; import com.google.inject.Inject;
@ -40,12 +43,16 @@ public class DynamicFeatureAccessMethodNotFoundCheck
* @param resourceLookup the resource lookup service, cannot be {@code null}. * @param resourceLookup the resource lookup service, cannot be {@code null}.
* @param bslPreferences the BSL preferences 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 qualifiedNameConverter the qualified name converter service, cannot be {@code null}.
* @param namingService service for getting names of EDT object and resources, cannot be <code>null</code>
* @param bmModelManager service for getting instance of Bm Model by {@link EObject}, cannot be <code>null</code>
* @param v8ProjectManager {@link IV8ProjectManager} for getting {@link IV8Project} by {@link EObject}, cannot be <code>null</code>
*/ */
@Inject @Inject
public DynamicFeatureAccessMethodNotFoundCheck(IResourceLookup resourceLookup, IBslPreferences bslPreferences, 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 @Override

View File

@ -14,12 +14,15 @@ package com.e1c.v8codestyle.bsl.strict.check;
import java.text.MessageFormat; import java.text.MessageFormat;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.naming.IQualifiedNameConverter; import org.eclipse.xtext.naming.IQualifiedNameConverter;
import com._1c.g5.v8.dt.bsl.common.IBslPreferences; import com._1c.g5.v8.dt.bsl.common.IBslPreferences;
import com._1c.g5.v8.dt.bsl.model.DynamicFeatureAccess; 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.IBmModelManager;
import com._1c.g5.v8.dt.core.platform.IResourceLookup; 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.naming.INamingService;
import com.google.inject.Inject; import com.google.inject.Inject;
@ -39,12 +42,16 @@ public class DynamicFeatureAccessTypeCheck
* @param resourceLookup the resource lookup service, cannot be {@code null}. * @param resourceLookup the resource lookup service, cannot be {@code null}.
* @param bslPreferences the BSL preferences 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 qualifiedNameConverter the qualified name converter service, cannot be {@code null}.
* @param namingService service for getting names of EDT object and resources, cannot be <code>null</code>
* @param bmModelManager service for getting instance of Bm Model by {@link EObject}, cannot be <code>null</code>
* @param v8ProjectManager {@link IV8ProjectManager} for getting {@link IV8Project} by {@link EObject}, cannot be <code>null</code>
*/ */
@Inject @Inject
public DynamicFeatureAccessTypeCheck(IResourceLookup resourceLookup, IBslPreferences bslPreferences, 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 @Override

View File

@ -29,6 +29,7 @@ import java.util.stream.StreamSupport;
import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.xtext.EcoreUtil2; import org.eclipse.xtext.EcoreUtil2;
import org.eclipse.xtext.naming.IQualifiedNameConverter; import org.eclipse.xtext.naming.IQualifiedNameConverter;
@ -47,6 +48,7 @@ import com._1c.g5.v8.dt.bsl.model.Function;
import com._1c.g5.v8.dt.bsl.model.ReturnStatement; 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.DynamicFeatureAccessComputer;
import com._1c.g5.v8.dt.bsl.resource.TypesComputer; 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.IBmModelManager;
import com._1c.g5.v8.dt.core.platform.IResourceLookup; 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.IV8Project;
@ -96,10 +98,6 @@ public class FunctionCtorReturnSectionCheck
private final BslMultiLineCommentDocumentationProvider commentProvider; private final BslMultiLineCommentDocumentationProvider commentProvider;
private final IResourceLookup resourceLookup;
private final IV8ProjectManager v8ProjectManager;
private final IBslPreferences bslPreferences; private final IBslPreferences bslPreferences;
/** /**
@ -113,22 +111,23 @@ public class FunctionCtorReturnSectionCheck
* @param dynamicComputer the dynamic computer service, cannot be {@code null}. * @param dynamicComputer the dynamic computer service, cannot be {@code null}.
* @param scopeProvider the scope provider 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 commentProvider the comment provider service, cannot be {@code null}.
* @param namingService service for getting names of EDT object and resources, cannot be <code>null</code>
* @param bmModelManager service for getting instance of Bm Model by {@link EObject}, cannot be <code>null</code>
* @param v8ProjectManager {@link IV8ProjectManager} for getting {@link IV8Project} by {@link EObject}, cannot be <code>null</code>
*/ */
@Inject @Inject
public FunctionCtorReturnSectionCheck(IResourceLookup resourceLookup, IV8ProjectManager v8ProjectManager, public FunctionCtorReturnSectionCheck(IResourceLookup resourceLookup,
IQualifiedNameConverter qualifiedNameConverter, IBslPreferences bslPreferences, TypesComputer typesComputer, IQualifiedNameConverter qualifiedNameConverter, IBslPreferences bslPreferences, TypesComputer typesComputer,
DynamicFeatureAccessComputer dynamicComputer, IScopeProvider scopeProvider, DynamicFeatureAccessComputer dynamicComputer, IScopeProvider scopeProvider,
BslMultiLineCommentDocumentationProvider commentProvider, INamingService namingService, BslMultiLineCommentDocumentationProvider commentProvider, INamingService namingService,
IBmModelManager bmModelManager) IBmModelManager bmModelManager, IV8ProjectManager v8ProjectManager)
{ {
super(resourceLookup, namingService, bmModelManager); super(resourceLookup, namingService, bmModelManager, v8ProjectManager);
this.typesComputer = typesComputer; this.typesComputer = typesComputer;
this.dynamicComputer = dynamicComputer; this.dynamicComputer = dynamicComputer;
this.scopeProvider = scopeProvider; this.scopeProvider = scopeProvider;
this.commentProvider = commentProvider; this.commentProvider = commentProvider;
this.qualifiedNameConverter = qualifiedNameConverter; this.qualifiedNameConverter = qualifiedNameConverter;
this.resourceLookup = resourceLookup;
this.v8ProjectManager = v8ProjectManager;
this.bslPreferences = bslPreferences; this.bslPreferences = bslPreferences;
} }
@ -181,14 +180,11 @@ public class FunctionCtorReturnSectionCheck
boolean oldFormat = props.oldCommentFormat(); boolean oldFormat = props.oldCommentFormat();
Collection<TypeItem> computedReturnTypes = root.computeReturnTypes(typeScope, scopeProvider, Collection<TypeItem> computedReturnTypes = root.computeReturnTypes(typeScope, scopeProvider,
qualifiedNameConverter, commentProvider, oldFormat, method, context); qualifiedNameConverter, commentProvider, v8ProjectManager, oldFormat, method, context);
Set<String> checkTypes = getCheckTypes(parameters); Set<String> checkTypes = getCheckTypes(parameters);
Set<String> computedReturnTypeNames = computedReturnTypes.stream() Collection<String> computedReturnTypeNames = BslUtil.computeTypeNames(computedReturnTypes, method);
.map(McoreUtil::getTypeName)
.filter(Objects::nonNull)
.collect(Collectors.toSet());
if (isUserDataTypes(computedReturnTypeNames, checkTypes)) if (isUserDataTypes(computedReturnTypeNames, checkTypes))
{ {
@ -271,11 +267,8 @@ public class FunctionCtorReturnSectionCheck
{ {
String propertyName = useRussianScript ? declaredProperty.getNameRu() : declaredProperty.getName(); String propertyName = useRussianScript ? declaredProperty.getNameRu() : declaredProperty.getName();
declaredProertyNames.add(propertyName); declaredProertyNames.add(propertyName);
List<String> declaredType = declaredProperty.getTypes() Collection<String> declaredType =
.stream() com._1c.g5.v8.dt.bsl.util.BslUtil.computeTypeNames(declaredProperty.getTypes(), function);
.map(McoreUtil::getTypeName)
.filter(Objects::nonNull)
.collect(Collectors.toList());
if (declaredType.isEmpty()) if (declaredType.isEmpty())
{ {
continue; continue;
@ -289,7 +282,7 @@ public class FunctionCtorReturnSectionCheck
.collect(Collectors.toList()); .collect(Collectors.toList());
List<TypeItem> missingTypes = types.stream().filter(t -> { List<TypeItem> missingTypes = types.stream().filter(t -> {
String typeName = McoreUtil.getTypeName(t); String typeName = McoreUtil.getTypeCategory(t);
if (typeName != null) if (typeName != null)
{ {
if (!declaredType.contains(typeName)) if (!declaredType.contains(typeName))

View File

@ -21,6 +21,8 @@ import com._1c.g5.v8.dt.bsl.common.IBslPreferences;
import com._1c.g5.v8.dt.bsl.model.BslPackage; 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.IBmModelManager;
import com._1c.g5.v8.dt.core.platform.IResourceLookup; 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.McorePackage;
import com.e1c.g5.dt.core.api.naming.INamingService; import com.e1c.g5.dt.core.api.naming.INamingService;
import com.e1c.g5.v8.dt.check.CheckComplexity; 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 resourceLookup the resource lookup service, cannot be {@code null}.
* @param bslPreferences the BSL preferences 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 qualifiedNameConverter the qualified name converter service, cannot be {@code null}.
* @param namingService service for getting names of EDT object and resources, cannot be <code>null</code>
* @param bmModelManager service for getting instance of Bm Model by {@link EObject}, cannot be <code>null</code>
* @param v8ProjectManager {@link IV8ProjectManager} for getting {@link IV8Project} by {@link EObject}, cannot be <code>null</code>
*/ */
@Inject @Inject
public FunctionReturnTypeCheck(IResourceLookup resourceLookup, IBslPreferences bslPreferences, 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 @Override

View File

@ -126,8 +126,6 @@ public class InvocationParamIntersectionCheck
//@formatter:on //@formatter:on
private final IV8ProjectManager v8ProjectManager;
private final ExportMethodTypeProvider exportMethodTypeProvider; private final ExportMethodTypeProvider exportMethodTypeProvider;
/** /**
@ -136,17 +134,18 @@ public class InvocationParamIntersectionCheck
* @param resourceLookup the resource lookup service, cannot be {@code null}. * @param resourceLookup the resource lookup service, cannot be {@code null}.
* @param bslPreferences the BSL preferences 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 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 exportMethodTypeProvider the export method type provider service, cannot be {@code null}.
* @param namingService service for getting names of EDT object and resources, cannot be <code>null</code>
* @param bmModelManager service for getting instance of Bm Model by {@link EObject}, cannot be <code>null</code>
* @param v8ProjectManager {@link IV8ProjectManager} for getting {@link IV8Project} by {@link EObject}, cannot be <code>null</code>
*/ */
@Inject @Inject
public InvocationParamIntersectionCheck(IResourceLookup resourceLookup, IBslPreferences bslPreferences, public InvocationParamIntersectionCheck(IResourceLookup resourceLookup, IBslPreferences bslPreferences,
IQualifiedNameConverter qualifiedNameConverter, IV8ProjectManager v8ProjectManager, IQualifiedNameConverter qualifiedNameConverter, ExportMethodTypeProvider exportMethodTypeProvider,
ExportMethodTypeProvider exportMethodTypeProvider, INamingService namingService, IBmModelManager bmModelManager) INamingService namingService, IBmModelManager bmModelManager, IV8ProjectManager v8ProjectManager)
{ {
super(resourceLookup, bslPreferences, qualifiedNameConverter, namingService, bmModelManager); super(resourceLookup, bslPreferences, qualifiedNameConverter, namingService, bmModelManager, v8ProjectManager);
this.exportMethodTypeProvider = exportMethodTypeProvider; this.exportMethodTypeProvider = exportMethodTypeProvider;
this.v8ProjectManager = v8ProjectManager;
} }
@Override @Override
@ -295,7 +294,7 @@ public class InvocationParamIntersectionCheck
new BmOperationContext(namingService, bmModelManager, bmTransaction); new BmOperationContext(namingService, bmModelManager, bmTransaction);
targetTypes = docComment.get() targetTypes = docComment.get()
.computeParameterTypes(parameter.getName(), typeScope, scopeProvider, qualifiedNameConverter, .computeParameterTypes(parameter.getName(), typeScope, scopeProvider, qualifiedNameConverter,
commentProvider, oldFormatComment, method, typeComputationContext); commentProvider, v8ProjectManager, oldFormatComment, method, typeComputationContext);
} }
if (targetTypes.isEmpty()) if (targetTypes.isEmpty())
@ -462,7 +461,7 @@ public class InvocationParamIntersectionCheck
// if parameter declared in doc-comment then check only declared types // if parameter declared in doc-comment then check only declared types
targetTypes = docComment.get() targetTypes = docComment.get()
.computeParameterTypes(paramName, typeScope, scopeProvider, qualifiedNameConverter, commentProvider, .computeParameterTypes(paramName, typeScope, scopeProvider, qualifiedNameConverter, commentProvider,
oldFormatComment, method, typeComputationContext); v8ProjectManager, oldFormatComment, method, typeComputationContext);
} }
else else
{ {

View File

@ -26,6 +26,8 @@ import com._1c.g5.v8.dt.bsl.common.IBslPreferences;
import com._1c.g5.v8.dt.bsl.model.FormalParam; 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.IBmModelManager;
import com._1c.g5.v8.dt.core.platform.IResourceLookup; 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.naming.INamingService;
import com.e1c.g5.v8.dt.check.CheckComplexity; import com.e1c.g5.v8.dt.check.CheckComplexity;
import com.e1c.g5.v8.dt.check.ICheckParameters; 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 resourceLookup the resource lookup service, cannot be {@code null}.
* @param bslPreferences the BSL preferences 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 qualifiedNameConverter the qualified name converter service, cannot be {@code null}.
* @param namingService service for getting names of EDT object and resources, cannot be <code>null</code>
* @param bmModelManager service for getting instance of Bm Model by {@link EObject}, cannot be <code>null</code>
* @param v8ProjectManager {@link IV8ProjectManager} for getting {@link IV8Project} by {@link EObject}, cannot be <code>null</code>
*/ */
@Inject @Inject
public MethodParamTypeCheck(IResourceLookup resourceLookup, IBslPreferences bslPreferences, 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 @Override

View File

@ -39,6 +39,7 @@ import com._1c.g5.v8.dt.bsl.model.StaticFeatureAccess;
import com._1c.g5.v8.dt.bsl.model.Variable; 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.IBmModelManager;
import com._1c.g5.v8.dt.core.platform.IResourceLookup; 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.core.platform.IV8ProjectManager;
import com._1c.g5.v8.dt.mcore.Environmental; import com._1c.g5.v8.dt.mcore.Environmental;
import com._1c.g5.v8.dt.mcore.TypeItem; 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 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. * Instantiates a new simple statement change type check.
* *
* @param resourceLookup the resource lookup service, cannot be {@code null}. * @param resourceLookup the resource lookup service, cannot be {@code null}.
* @param bslPreferences the BSL preferences 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 qualifiedNameConverter the qualified name converter service, cannot be {@code null}.
* @param namingService service for getting names of EDT object and resources, cannot be <code>null</code>
* @param bmModelManager service for getting instance of Bm Model by {@link EObject}, cannot be <code>null</code>
* @param v8ProjectManager {@link IV8ProjectManager} for getting {@link IV8Project} by {@link EObject}, cannot be <code>null</code>
*/ */
@Inject @Inject
public SimpleStatementTypeCheck(IResourceLookup resourceLookup, IBslPreferences bslPreferences, public SimpleStatementTypeCheck(IResourceLookup resourceLookup, IBslPreferences bslPreferences,
IV8ProjectManager v8ProjectManager, IQualifiedNameConverter qualifiedNameConverter, IQualifiedNameConverter qualifiedNameConverter, INamingService namingService, IBmModelManager bmModelManager,
INamingService namingService, IBmModelManager bmModelManager) IV8ProjectManager v8ProjectManager)
{ {
super(resourceLookup, bslPreferences, qualifiedNameConverter, namingService, bmModelManager); super(resourceLookup, bslPreferences, qualifiedNameConverter, namingService, bmModelManager, v8ProjectManager);
this.v8ProjectManager = v8ProjectManager;
} }
@Override @Override

View File

@ -18,6 +18,7 @@ import static com._1c.g5.v8.dt.bsl.model.BslPackage.Literals.STRING_LITERAL__LIN
import java.text.MessageFormat; import java.text.MessageFormat;
import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.naming.IQualifiedNameConverter; import org.eclipse.xtext.naming.IQualifiedNameConverter;
import com._1c.g5.v8.bm.core.IBmTransaction; import com._1c.g5.v8.bm.core.IBmTransaction;
@ -28,6 +29,8 @@ import com._1c.g5.v8.dt.bsl.model.OperatorStyleCreator;
import com._1c.g5.v8.dt.bsl.model.StringLiteral; 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.IBmModelManager;
import com._1c.g5.v8.dt.core.platform.IResourceLookup; 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.mcore.util.McoreUtil;
import com._1c.g5.v8.dt.platform.IEObjectTypeNames; import com._1c.g5.v8.dt.platform.IEObjectTypeNames;
import com.e1c.g5.dt.core.api.naming.INamingService; 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 resourceLookup the resource lookup service, cannot be {@code null}.
* @param bslPreferences the BSL preferences 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 qualifiedNameConverter the qualified name converter service, cannot be {@code null}.
* @param namingService service for getting names of EDT object and resources, cannot be <code>null</code>
* @param bmModelManager service for getting instance of Bm Model by {@link EObject}, cannot be <code>null</code>
* @param v8ProjectManager {@link IV8ProjectManager} for getting {@link IV8Project} by {@link EObject}, cannot be <code>null</code>
*/ */
@Inject @Inject
public StructureCtorValueTypeCheck(IResourceLookup resourceLookup, IBslPreferences bslPreferences, 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 @Override

View File

@ -23,6 +23,7 @@ import java.util.stream.Collectors;
import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.emf.common.util.URI; import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.util.EcoreUtil; import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.xtext.EcoreUtil2; import org.eclipse.xtext.EcoreUtil2;
import org.eclipse.xtext.naming.IQualifiedNameConverter; import org.eclipse.xtext.naming.IQualifiedNameConverter;
@ -43,6 +44,8 @@ import com._1c.g5.v8.dt.bsl.model.util.BslUtil;
import com._1c.g5.v8.dt.common.StringUtils; 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.IBmModelManager;
import com._1c.g5.v8.dt.core.platform.IResourceLookup; 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.DerivedProperty;
import com._1c.g5.v8.dt.mcore.Property; import com._1c.g5.v8.dt.mcore.Property;
import com._1c.g5.v8.dt.mcore.TypeItem; import com._1c.g5.v8.dt.mcore.TypeItem;
@ -85,12 +88,23 @@ public class StructureKeyModificationCheck
private final IStaticExpressionValueComputer staticExpressionValueComputer; 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 <code>null</code>
* @param bmModelManager service for getting instance of Bm Model by {@link EObject}, cannot be <code>null</code>
* @param v8ProjectManager {@link IV8ProjectManager} for getting {@link IV8Project} by {@link EObject}, cannot be <code>null</code>
* @param staticExpressionValueComputer {@link IStaticExpressionValueComputer} for compute string literal type, cannot be <code>null</code>
*/
@Inject @Inject
public StructureKeyModificationCheck(IResourceLookup resourceLookup, IBslPreferences bslPreferences, public StructureKeyModificationCheck(IResourceLookup resourceLookup, IBslPreferences bslPreferences,
IQualifiedNameConverter qualifiedNameConverter, INamingService namingService, IBmModelManager bmModelManager, 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; this.staticExpressionValueComputer = staticExpressionValueComputer;
} }

View File

@ -37,6 +37,8 @@ import com._1c.g5.v8.dt.bsl.model.SourceObjectLinkProvider;
import com._1c.g5.v8.dt.bsl.model.util.BslUtil; 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.IBmModelManager;
import com._1c.g5.v8.dt.core.platform.IResourceLookup; 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.Method;
import com._1c.g5.v8.dt.mcore.Type; import com._1c.g5.v8.dt.mcore.Type;
import com._1c.g5.v8.dt.mcore.TypeItem; 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 resourceLookup the resource lookup service, cannot be {@code null}.
* @param bslPreferences the BSL preferences 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 qualifiedNameConverter the qualified name converter service, cannot be {@code null}.
* @param namingService service for getting names of EDT object and resources, cannot be <code>null</code>
* @param bmModelManager service for getting instance of Bm Model by {@link EObject}, cannot be <code>null</code>
* @param v8ProjectManager {@link IV8ProjectManager} for getting {@link IV8Project} by {@link EObject}, cannot be <code>null</code>
*/ */
@Inject @Inject
public TypedValueAddingToUntypedCollectionCheck(IResourceLookup resourceLookup, IBslPreferences bslPreferences, 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 @Override

View File

@ -32,6 +32,8 @@ import com._1c.g5.v8.dt.bsl.model.StaticFeatureAccess;
import com._1c.g5.v8.dt.bsl.model.Variable; 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.IBmModelManager;
import com._1c.g5.v8.dt.core.platform.IResourceLookup; 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.Environmental;
import com._1c.g5.v8.dt.mcore.util.Environments; import com._1c.g5.v8.dt.mcore.util.Environments;
import com.e1c.g5.dt.core.api.naming.INamingService; 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 resourceLookup the resource lookup service, cannot be {@code null}.
* @param bslPreferences the BSL preferences 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 qualifiedNameConverter the qualified name converter service, cannot be {@code null}.
* @param namingService service for getting names of EDT object and resources, cannot be <code>null</code>
* @param bmModelManager service for getting instance of Bm Model by {@link EObject}, cannot be <code>null</code>
* @param v8ProjectManager {@link IV8ProjectManager} for getting {@link IV8Project} by {@link EObject}, cannot be <code>null</code>
*/ */
@Inject @Inject
public VariableTypeCheck(IResourceLookup resourceLookup, IBslPreferences bslPreferences, 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 @Override

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<classpath> <classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/> <classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/> <classpathentry kind="output" path="bin"/>

View File

@ -1,10 +1,10 @@
eclipse.preferences.version=1 eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
org.eclipse.jdt.core.compiler.compliance=11 org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=enabled org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=11 org.eclipse.jdt.core.compiler.source=17

View File

@ -8,13 +8,13 @@ Bundle-Vendor: %providerName
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.20.0,4.0.0)", 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.emf.ecore;bundle-version="[2.23.0,3.0.0)",
org.eclipse.core.resources;bundle-version="[3.14.0,4.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)" 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 Automatic-Module-Name: com.e1c.v8codestyle.form
Bundle-ActivationPolicy: lazy Bundle-ActivationPolicy: lazy
Bundle-Localization: plugin 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.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;version="[11.0.0,12.0.0)",
com._1c.g5.v8.dt.common;version="[6.0.0,7.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.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;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.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.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.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;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.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.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.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.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.v8.dt.ql.typesystem;version="[6.0.0,7.0.0)",
com._1c.g5.wiring;version="[2.2.0,3.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.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.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.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.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.e1c.v8codestyle.check;version="[0.7.0,0.8.0)",
com.google.common.base;version="[30.1.0,31.0.0)", com.google.common.base;version="[32.1.0,33.0.0)"
com.google.inject;version="[5.0.1,6.0.0)",
com.google.inject.binder;version="[5.0.1,6.0.0)"

View File

@ -47,7 +47,6 @@ import com.google.inject.Inject;
public class DataCompositionConditionalAppearanceUseCheck public class DataCompositionConditionalAppearanceUseCheck
extends BasicCheck extends BasicCheck
{ {
private static final String CHECK_ID = "data-composition-conditional-appearance-use"; //$NON-NLS-1$ private static final String CHECK_ID = "data-composition-conditional-appearance-use"; //$NON-NLS-1$
private final IBmModelManager bmModelManager; private final IBmModelManager bmModelManager;
@ -78,10 +77,14 @@ public class DataCompositionConditionalAppearanceUseCheck
.complexity(CheckComplexity.NORMAL) .complexity(CheckComplexity.NORMAL)
.severity(IssueSeverity.MINOR) .severity(IssueSeverity.MINOR)
.issueType(IssueType.UI_STYLE) .issueType(IssueType.UI_STYLE)
.extension(new StandardCheckExtension(710, getCheckId(), CorePlugin.PLUGIN_ID)) .extension(new StandardCheckExtension(710, getCheckId(), CorePlugin.PLUGIN_ID));
.topObject(DATA_COMPOSITION_SETTINGS)
builder.topObject(DATA_COMPOSITION_SETTINGS)
.containment(DATA_COMPOSITION_CONDITIONAL_APPEARANCE) .containment(DATA_COMPOSITION_CONDITIONAL_APPEARANCE)
.features(DATA_COMPOSITION_CONDITIONAL_APPEARANCE__ITEMS); .features(DATA_COMPOSITION_CONDITIONAL_APPEARANCE__ITEMS);
builder.topObject(DATA_COMPOSITION_CONDITIONAL_APPEARANCE)
.features(DATA_COMPOSITION_CONDITIONAL_APPEARANCE__ITEMS);
} }
@Override @Override
@ -104,7 +107,6 @@ public class DataCompositionConditionalAppearanceUseCheck
} }
EObject eObject = dcca; EObject eObject = dcca;
DynamicListExtInfo dl = manager.getOwner(eObject, DynamicListExtInfo.class); DynamicListExtInfo dl = manager.getOwner(eObject, DynamicListExtInfo.class);
if (dl != null) if (dl != null)
{ {
@ -114,9 +116,8 @@ public class DataCompositionConditionalAppearanceUseCheck
return; return;
} }
resultAcceptor.addIssue( resultAcceptor.addIssue(MessageFormat
MessageFormat.format( .format(Messages.DataCompositionConditionalAppearanceUseCheck_Form_attribute, formAttribute.getName()),
Messages.DataCompositionConditionalAppearanceUseCheck_Form_attribute, formAttribute.getName()),
dcca, DATA_COMPOSITION_CONDITIONAL_APPEARANCE__ITEMS); dcca, DATA_COMPOSITION_CONDITIONAL_APPEARANCE__ITEMS);
} }
@ -128,12 +129,8 @@ public class DataCompositionConditionalAppearanceUseCheck
return; return;
} }
resultAcceptor.addIssue( resultAcceptor.addIssue(MessageFormat.format(Messages.DataCompositionConditionalAppearanceUseCheck_Form,
MessageFormat.format( form.getMdForm().getName()), dcca, DATA_COMPOSITION_CONDITIONAL_APPEARANCE__ITEMS);
Messages.DataCompositionConditionalAppearanceUseCheck_Form, form.getMdForm().getName()),
dcca, DATA_COMPOSITION_CONDITIONAL_APPEARANCE__ITEMS);
} }
} }
} }

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<classpath> <classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/> <classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/> <classpathentry kind="output" path="bin"/>

View File

@ -1,10 +1,10 @@
eclipse.preferences.version=1 eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
org.eclipse.jdt.core.compiler.compliance=11 org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
org.eclipse.jdt.core.compiler.release=enabled org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=11 org.eclipse.jdt.core.compiler.source=17

View File

@ -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.ui.forms;bundle-version="[3.11.100,4.0.0)",
org.eclipse.emf.databinding;bundle-version="[1.5.0,2.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.jface.databinding;bundle-version="[1.12.200,2.0.0)",
org.eclipse.core.databinding.property;bundle-version="[1.8.100,2.0.0)" org.eclipse.core.databinding.property;bundle-version="[1.8.100,2.0.0)",
Bundle-RequiredExecutionEnvironment: JavaSE-11 com.google.inject;bundle-version="[7.0.0,8.0.0)"
Bundle-RequiredExecutionEnvironment: JavaSE-17
Automatic-Module-Name: com.e1c.v8codestyle.md.ui Automatic-Module-Name: com.e1c.v8codestyle.md.ui
Bundle-ActivationPolicy: lazy Bundle-ActivationPolicy: lazy
Bundle-Localization: plugin 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;version="[2.2.0,3.0.0)",
com._1c.g5.wiring.binder;version="[1.1.0,2.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.e1c.v8codestyle.md;version="[0.7.0,0.8.0)",
com.google.common.base;version="[30.1.0,31.0.0)", com.google.common.base;version="[32.1.0,33.0.0)"
com.google.inject;version="[5.0.1,6.0.0)"

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<classpath> <classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/> <classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/> <classpathentry kind="output" path="bin"/>

View File

@ -1,10 +1,10 @@
eclipse.preferences.version=1 eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
org.eclipse.jdt.core.compiler.compliance=11 org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=enabled org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=11 org.eclipse.jdt.core.compiler.source=17

View File

@ -7,12 +7,13 @@ Bundle-Activator: com.e1c.v8codestyle.internal.md.CorePlugin
Bundle-Vendor: %providerName Bundle-Vendor: %providerName
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.18.0,4.0.0)", 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.emf.ecore;bundle-version="[2.22.0,3.0.0)",
org.eclipse.core.resources;bundle-version="[3.14.0,4.0.0)" org.eclipse.core.resources;bundle-version="[3.14.0,4.0.0)",
Bundle-RequiredExecutionEnvironment: JavaSE-11 com.google.inject;bundle-version="[7.0.0,8.0.0)"
Bundle-RequiredExecutionEnvironment: JavaSE-17
Automatic-Module-Name: com.e1c.v8codestyle.md Automatic-Module-Name: com.e1c.v8codestyle.md
Bundle-ActivationPolicy: lazy Bundle-ActivationPolicy: lazy
Bundle-Localization: plugin 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.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.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.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.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.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.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.e1c.v8codestyle.check;version="[0.7.0,0.8.0)",
com.google.common.base;version="[30.1.0,31.0.0)", com.google.common.base;version="[32.1.0,33.0.0)"
com.google.inject;version="[5.0.1,6.0.0)"
Export-Package: com.e1c.v8codestyle.md;version="0.7.0" Export-Package: com.e1c.v8codestyle.md;version="0.7.0"

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<classpath> <classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/> <classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/> <classpathentry kind="output" path="bin"/>

View File

@ -1,10 +1,10 @@
eclipse.preferences.version=1 eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
org.eclipse.jdt.core.compiler.compliance=11 org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=enabled org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=11 org.eclipse.jdt.core.compiler.source=17

View File

@ -8,18 +8,19 @@ Bundle-Vendor: %providerName
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.18.0,4.0.0)", 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.emf.ecore;bundle-version="[2.22.0,3.0.0)",
org.eclipse.xtext;bundle-version="[2.24.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)" org.eclipse.core.resources;bundle-version="[3.14.0,4.0.0)",
Bundle-RequiredExecutionEnvironment: JavaSE-11 com.google.inject;bundle-version="[7.0.0,8.0.0)"
Bundle-RequiredExecutionEnvironment: JavaSE-17
Automatic-Module-Name: com.e1c.v8codestyle.ql Automatic-Module-Name: com.e1c.v8codestyle.ql
Bundle-ActivationPolicy: lazy Bundle-ActivationPolicy: lazy
Bundle-Localization: plugin 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.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.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.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.dbview;version="4.0.0",
com._1c.g5.v8.dt.metadata.mdclass;version="[9.0.0,10.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.v8.dt.ql.typesystem;version="5.0.0",
com._1c.g5.wiring;version="[2.2.0,3.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._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.components;version="[2.0.0,3.0.0)",
com.e1c.g5.v8.dt.check.settings;version="1.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.g5.v8.dt.ql.check;version="[1.0.0,2.0.0)",
com.e1c.v8codestyle.check;version="[0.7.0,0.8.0)", com.e1c.v8codestyle.check;version="[0.7.0,0.8.0)"
com.google.inject;version="[5.0.1,6.0.0)"

View File

@ -82,7 +82,7 @@ public class TempTableHasIndex
return; return;
} }
if (selectQuery.getIndexes() == null || selectQuery.getIndexes().isEmpty()) if (selectQuery.getIndexSets().isEmpty())
{ {
AbstractQuerySchemaTable table = selectQuery.getPlacementTable(); AbstractQuerySchemaTable table = selectQuery.getPlacementTable();
String excludeTableNamePattern = parameters.getString(PARAMETER_EXCLUDE_TABLE_NAME_PATTERN); String excludeTableNamePattern = parameters.getString(PARAMETER_EXCLUDE_TABLE_NAME_PATTERN);

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<classpath> <classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/> <classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/> <classpathentry kind="output" path="bin"/>

View File

@ -1,10 +1,10 @@
eclipse.preferences.version=1 eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
org.eclipse.jdt.core.compiler.compliance=11 org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=enabled org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=11 org.eclipse.jdt.core.compiler.source=17

View File

@ -8,12 +8,13 @@ Bundle-Vendor: %providerName
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.18.0,4.0.0)", 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.emf.ecore;bundle-version="[2.22.0,3.0.0)",
org.eclipse.xtext;bundle-version="[2.24.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)" org.eclipse.core.resources;bundle-version="[3.14.0,4.0.0)",
Bundle-RequiredExecutionEnvironment: JavaSE-11 com.google.inject;bundle-version="[7.0.0,8.0.0)"
Bundle-RequiredExecutionEnvironment: JavaSE-17
Automatic-Module-Name: com.e1c.v8codestyle.right Automatic-Module-Name: com.e1c.v8codestyle.right
Bundle-ActivationPolicy: lazy Bundle-ActivationPolicy: lazy
Bundle-Localization: plugin 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.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;version="[11.0.0,12.0.0)",
com._1c.g5.v8.dt.bm.index.emf;version="[8.0.0,9.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.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.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.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.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.platform.version;version="[2.0.0,3.0.0)",
com._1c.g5.v8.dt.rights;version="[7.0.0,8.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.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.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.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.e1c.v8codestyle.check;version="[0.7.0,0.8.0)"
com.google.inject;version="[5.0.1,6.0.0)"

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<classpath> <classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/> <classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/> <classpathentry kind="output" path="bin"/>

View File

@ -1,10 +1,10 @@
eclipse.preferences.version=1 eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
org.eclipse.jdt.core.compiler.compliance=11 org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=enabled org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=11 org.eclipse.jdt.core.compiler.source=17

View File

@ -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.emf.ecore;bundle-version="[2.23.0,3.0.0)",
org.eclipse.jface.databinding;bundle-version="[1.12.200,2.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.ui.forms;bundle-version="[3.11.100,4.0.0)",
org.eclipse.emf.databinding;bundle-version="[1.5.0,2.0.0)" org.eclipse.emf.databinding;bundle-version="[1.5.0,2.0.0)",
Bundle-RequiredExecutionEnvironment: JavaSE-11 com.google.inject;bundle-version="[7.0.0,8.0.0)"
Bundle-RequiredExecutionEnvironment: JavaSE-17
Automatic-Module-Name: com.e1c.v8codestyle.ui Automatic-Module-Name: com.e1c.v8codestyle.ui
Bundle-ActivationPolicy: lazy Bundle-ActivationPolicy: lazy
Import-Package: com._1c.g5.v8.dt.common;version="[6.4.0,7.0.0)", 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.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;version="[2.2.0,3.0.0)",
com._1c.g5.wiring.binder;version="[1.1.0,2.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.e1c.v8codestyle;version="[0.7.0,0.8.0)"
com.google.inject;version="[5.0.1,6.0.0)"

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<classpath> <classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/> <classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/> <classpathentry kind="output" path="bin"/>

View File

@ -1,8 +1,8 @@
eclipse.preferences.version=1 eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 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.compliance=11 org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
org.eclipse.jdt.core.compiler.source=11 org.eclipse.jdt.core.compiler.source=17

View File

@ -7,19 +7,18 @@ Bundle-Activator: com.e1c.v8codestyle.internal.CorePlugin
Bundle-Vendor: %providerName Bundle-Vendor: %providerName
Bundle-Localization: plugin Bundle-Localization: plugin
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.18.0,4.0.0)", 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)" org.eclipse.core.resources;bundle-version="[3.14.0,4.0.0)",
Bundle-RequiredExecutionEnvironment: JavaSE-11 com.google.inject;bundle-version="[7.0.0,8.0.0)"
Bundle-RequiredExecutionEnvironment: JavaSE-17
Automatic-Module-Name: com.e1c.v8codestyle Automatic-Module-Name: com.e1c.v8codestyle
Bundle-ActivationPolicy: lazy 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.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;version="[2.2.0,3.0.0)",
com._1c.g5.wiring.binder;version="[1.1.0,2.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;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.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.ext;version="1.0.0",
com.e1c.g5.v8.dt.check.settings;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)"
Export-Package: com.e1c.v8codestyle;version="0.7.0", Export-Package: com.e1c.v8codestyle;version="0.7.0",
com.e1c.v8codestyle.check;version="0.7.0" com.e1c.v8codestyle.check;version="0.7.0"

View File

@ -20,7 +20,7 @@
<stringAttribute key="org.eclipse.debug.ui.ATTR_CAPTURE_IN_FILE" value="${workspace_loc}/../runtime-v8-code-style/output.log"/> <stringAttribute key="org.eclipse.debug.ui.ATTR_CAPTURE_IN_FILE" value="${workspace_loc}/../runtime-v8-code-style/output.log"/>
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_ATTR_USE_ARGFILE" value="false"/> <booleanAttribute key="org.eclipse.jdt.launching.ATTR_ATTR_USE_ARGFILE" value="false"/>
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/> <booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/> <stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog -clean"/> <stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog -clean"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/> <stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xmx6G&#13;&#10;-Dlog4j.configuration=platform:/plugin/com._1c.g5.v8.dt.logging/log4j.properties&#13;&#10;-DmigrationEnabled=true&#13;&#10;-DmigrationNotificationEnabled=true&#10;-Dosgi.framework.extensions=org.eclipse.fx.osgi&#13;&#10;-De1c.dt.monitoring.host="/> <stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xmx6G&#13;&#10;-Dlog4j.configuration=platform:/plugin/com._1c.g5.v8.dt.logging/log4j.properties&#13;&#10;-DmigrationEnabled=true&#13;&#10;-DmigrationNotificationEnabled=true&#10;-Dosgi.framework.extensions=org.eclipse.fx.osgi&#13;&#10;-De1c.dt.monitoring.host="/>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<classpath> <classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17">
<attributes> <attributes>
<attribute name="module" value="true"/> <attribute name="module" value="true"/>
</attributes> </attributes>

View File

@ -1,8 +1,8 @@
eclipse.preferences.version=1 eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 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.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.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=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.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=enabled org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=11 org.eclipse.jdt.core.compiler.source=17

View File

@ -5,5 +5,5 @@ Bundle-SymbolicName: com.e1c.v8codestyle.docs;singleton:=true
Bundle-Version: 0.7.0.qualifier Bundle-Version: 0.7.0.qualifier
Bundle-Vendor: %providerName Bundle-Vendor: %providerName
Automatic-Module-Name: com.e1c.v8codestyle.docs Automatic-Module-Name: com.e1c.v8codestyle.docs
Bundle-RequiredExecutionEnvironment: JavaSE-11 Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-Localization: plugin Bundle-Localization: plugin

View File

@ -58,9 +58,14 @@
<extraRequirements> <extraRequirements>
<requirement> <requirement>
<type>eclipse-plugin</type> <type>eclipse-plugin</type>
<id>org.eclipse.equinox.ds</id> <id>org.apache.felix.scr</id>
<versionRange>0.0.0</versionRange> <versionRange>0.0.0</versionRange>
</requirement> </requirement>
<requirement>
<type>eclipse-plugin</type>
<id>org.apache.aries.spifly.dynamic.bundle</id>
<versionRange>1.3.7</versionRange>
</requirement>
</extraRequirements> </extraRequirements>
</dependency-resolution> </dependency-resolution>
</configuration> </configuration>
@ -68,5 +73,4 @@
</plugins> </plugins>
</pluginManagement> </pluginManagement>
</build> </build>
</project> </project>

View File

@ -13,102 +13,16 @@
<!-- EDT --> <!-- EDT -->
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="slicer" includeSource="true" type="InstallableUnit"> <location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="slicer" includeSource="true" type="InstallableUnit">
<repository id="dt_repository" location="https://edt.1c.ru/downloads/releases/ruby/2023.3/"/> <repository id="dt_repository" location="https://edt.1c.ru/downloads/releases/ruby/2024.1/"/>
<unit id="com._1c.g5.aef.feature.feature.group" version="0.0.0"/>
<unit id="com._1c.g5.commons.feature.group" version="0.0.0"/>
<unit id="com._1c.g5.edt.license.feature.group" version="0.0.0"/>
<unit id="com._1c.g5.gumtree.feature.feature.group" version="0.0.0"/>
<unit id="com._1c.g5.ides.feature.group" version="0.0.0"/>
<unit id="com._1c.g5.ides.monitoring.feature.feature.group" version="0.0.0"/>
<unit id="com._1c.g5.jface.feature.feature.group" version="0.0.0"/>
<unit id="com._1c.g5.license.feature.group" version="0.0.0"/>
<unit id="com._1c.g5.lwt.feature.feature.group" version="0.0.0"/>
<unit id="com._1c.g5.properties.ui.feature.feature.group" version="0.0.0"/>
<unit id="com._1c.g5.v8.dt.bp.scheme.feature.feature.group" version="0.0.0"/>
<unit id="com._1c.g5.v8.dt.cli.feature.feature.group" version="0.0.0"/>
<unit id="com._1c.g5.v8.dt.diagram.framework.feature.feature.group" version="0.0.0"/>
<unit id="com._1c.g5.v8.dt.erd.feature.feature.group" version="0.0.0"/>
<unit id="com._1c.g5.v8.dt.eventhandlers.feature.feature.group" version="0.0.0"/>
<unit id="com._1c.g5.v8.dt.extension.feature.group" version="0.0.0"/>
<unit id="com._1c.g5.v8.dt.feature.feature.group" version="0.0.0"/>
<unit id="com._1c.g5.v8.dt.geographicalschema.feature.feature.group" version="0.0.0"/>
<unit id="com._1c.g5.v8.dt.handly.feature.feature.group" version="0.0.0"/>
<unit id="com._1c.g5.v8.dt.markermatcher.feature.feature.group" version="0.0.0"/>
<unit id="com._1c.g5.v8.dt.platform.services.mobile.feature.feature.group" version="0.0.0"/>
<unit id="com._1c.g5.v8.dt.platform.support_v8.3.19.feature.feature.group" version="0.0.0"/> <unit id="com._1c.g5.v8.dt.platform.support_v8.3.19.feature.feature.group" version="0.0.0"/>
<unit id="com._1c.g5.v8.dt.product.docs.feature.feature.group" version="0.0.0"/> <unit id="com._1c.g5.v8.dt.platform.support_v8.3.23.feature.feature.group" version="0.0.0"/>
<unit id="com._1c.g5.v8.dt.product.feature.feature.group" version="0.0.0"/> </location>
<unit id="com._1c.g5.v8.dt.profiling.feature.feature.group" version="0.0.0"/>
<!-- EDT -->
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="slicer" includeSource="true" type="InstallableUnit">
<repository id="dt_repository" location="https://edt.1c.ru/downloads/releases/ruby/2024.1/"/>
<unit id="com._1c.g5.v8.dt.rcp" version="0.0.0"/> <unit id="com._1c.g5.v8.dt.rcp" version="0.0.0"/>
<unit id="com._1c.g5.v8.dt.ring.feature.feature.group" version="0.0.0"/>
<unit id="com._1c.g5.v8.dt.testing.feature.group" version="0.0.0"/>
<unit id="com._1c.g5.v8.dt.thirdparty.feature.group" version="0.0.0"/> <unit id="com._1c.g5.v8.dt.thirdparty.feature.group" version="0.0.0"/>
<unit id="com._1c.g5.v8.dt.wst.feature.group" version="0.0.0"/>
<unit id="com._1c.g5.v8.dt.xtext.runtime.feature.group" version="0.0.0"/>
<unit id="com._1c.g5.v8.dt.xtext.ui.feature.group" version="0.0.0"/>
<unit id="com._1c.g5.wiring.feature.feature.group" version="0.0.0"/>
<unit id="com.company1c.link.agent.core.feature.feature.group" version="0.0.0"/>
<unit id="com.company1c.link.agent.dependencies.feature.feature.group" version="0.0.0"/>
<unit id="com.company1c.link.ide.edt.feature.feature.group" version="0.0.0"/>
<unit id="com.e1c.g5.v8.dt.gsw.feature.feature.group" version="0.0.0"/>
<unit id="com.e1c.g5.v8.dt.mw.feature.feature.group" version="0.0.0"/>
<unit id="com.make.chromium.cef.feature.feature.group" version="0.0.0"/>
<unit id="de.itemis.xtext.antlr.feature.feature.group" version="0.0.0"/>
<unit id="org.eclipse.draw2d.feature.group" version="0.0.0"/>
<unit id="org.eclipse.e4.rcp.feature.group" version="0.0.0"/>
<unit id="org.eclipse.ecf.core.feature.feature.group" version="0.0.0"/>
<unit id="org.eclipse.ecf.filetransfer.feature.feature.group" version="0.0.0"/>
<unit id="org.eclipse.egit.feature.group" version="0.0.0"/>
<unit id="org.eclipse.emf.common.feature.group" version="0.0.0"/>
<unit id="org.eclipse.emf.common.ui.feature.group" version="0.0.0"/>
<unit id="org.eclipse.emf.databinding.edit.feature.group" version="0.0.0"/>
<unit id="org.eclipse.emf.databinding.feature.group" version="0.0.0"/>
<unit id="org.eclipse.emf.ecore.edit.feature.group" version="0.0.0"/>
<unit id="org.eclipse.emf.ecore.editor.feature.group" version="0.0.0"/>
<unit id="org.eclipse.emf.ecore.feature.group" version="0.0.0"/>
<unit id="org.eclipse.emf.ecore.xcore.lib.feature.group" version="0.0.0"/>
<unit id="org.eclipse.emf.edit.feature.group" version="0.0.0"/>
<unit id="org.eclipse.emf.edit.ui.feature.group" version="0.0.0"/>
<unit id="org.eclipse.emf.query.feature.group" version="0.0.0"/>
<unit id="org.eclipse.emf.query.ocl.feature.group" version="0.0.0"/>
<unit id="org.eclipse.emf.transaction.feature.group" version="0.0.0"/>
<unit id="org.eclipse.emf.validation.feature.group" version="0.0.0"/>
<unit id="org.eclipse.emf.validation.ocl.feature.group" version="0.0.0"/>
<unit id="org.eclipse.emf.workspace.feature.group" version="0.0.0"/>
<unit id="org.eclipse.equinox.ds" version="0.0.0"/>
<unit id="org.eclipse.equinox.p2.core.feature.feature.group" version="0.0.0"/>
<unit id="org.eclipse.equinox.p2.discovery.feature.feature.group" version="0.0.0"/>
<unit id="org.eclipse.equinox.p2.extras.feature.feature.group" version="0.0.0"/>
<unit id="org.eclipse.equinox.p2.rcp.feature.feature.group" version="0.0.0"/>
<unit id="org.eclipse.equinox.p2.user.ui.feature.group" version="0.0.0"/>
<unit id="org.eclipse.fx.runtime.min.feature.feature.group" version="0.0.0"/>
<unit id="org.eclipse.gef.feature.group" version="0.0.0"/>
<unit id="org.eclipse.gmf.feature.group" version="0.0.0"/>
<unit id="org.eclipse.gmf.runtime.notation.feature.group" version="0.0.0"/>
<unit id="org.eclipse.gmf.runtime.thirdparty.feature.group" version="0.0.0"/>
<unit id="org.eclipse.help.feature.group" version="0.0.0"/>
<unit id="org.eclipse.jgit.feature.group" version="0.0.0"/>
<unit id="org.eclipse.jgit.http.apache.feature.group" version="0.0.0"/>
<unit id="org.eclipse.jgit.lfs.feature.group" version="0.0.0"/>
<unit id="org.eclipse.jgit.pgm.feature.group" version="0.0.0"/>
<unit id="org.eclipse.nebula.widgets.datechooser.feature.feature.group" version="0.0.0"/>
<unit id="org.eclipse.nebula.widgets.formattedtext.feature.feature.group" version="0.0.0"/>
<unit id="org.eclipse.nebula.widgets.grid.feature.feature.group" version="0.0.0"/>
<unit id="org.eclipse.ocl.feature.group" version="0.0.0"/>
<unit id="org.eclipse.platform.feature.group" version="0.0.0"/>
<unit id="org.eclipse.rcp.feature.group" version="0.0.0"/>
<unit id="org.eclipse.userstorage.feature.group" version="0.0.0"/>
<unit id="org.eclipse.xsd.edit.feature.group" version="0.0.0"/>
<unit id="org.eclipse.xsd.feature.group" version="0.0.0"/>
<unit id="org.eclipse.xtext.xbase.lib.feature.group" version="0.0.0"/>
<unit id="org.apache.xalan" version="0.0.0"/>
<unit id="org.apache.batik.script" version="0.0.0"/>
<unit id="org.apache.batik.codec" version="0.0.0"/>
<unit id="org.apache.batik.ext" version="0.0.0"/>
<unit id="org.apache.batik.transcoder" version="0.0.0"/>
<unit id="javax.servlet" version="0.0.0"/>
<unit id="org.apache.lucene.grouping" version="0.0.0"/>
<unit id="org.apache.lucene.queries" version="0.0.0"/>
</location> </location>
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="slicer" includeSource="true" type="InstallableUnit"> <location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="slicer" includeSource="true" type="InstallableUnit">
@ -122,14 +36,19 @@
<unit id="org.objenesis" version="0.0.0"/> <unit id="org.objenesis" version="0.0.0"/>
<unit id="net.bytebuddy.byte-buddy" version="0.0.0"/> <unit id="net.bytebuddy.byte-buddy" version="0.0.0"/>
<unit id="net.bytebuddy.byte-buddy-agent" version="0.0.0"/> <unit id="net.bytebuddy.byte-buddy-agent" version="0.0.0"/>
<unit id="com.google.protobuf" version="0.0.0"/> <unit id="org.apache.commons.codec" version="1.6.0.v201305230611"/>
<repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20211213173813/repository/"/> <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20211213173813/repository/"/>
</location> </location>
<!-- Eclipse --> <!-- Eclipse -->
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="slicer" includeSource="true" type="InstallableUnit"> <location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="slicer" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.jdt.annotation" version="0.0.0"/> <repository id="eclipse_repository" location="https://download.eclipse.org/releases/2023-12/"/>
<repository id="eclipse_repository" location="https://download.eclipse.org/releases/2022-03/"/>
<unit id="org.eclipse.sdk.feature.group" version="0.0.0"/>
<unit id="org.eclipse.platform.feature.group" version="0.0.0"/>
<unit id="org.eclipse.pde.feature.group" version="0.0.0"/>
<unit id="org.eclipse.orbit.xml-apis-ext" version="0.0.0"/>
<unit id="org.eclipse.ecf.filetransfer.httpclientjava.feature.feature.group" version="0.0.0"/>
</location> </location>
</locations> </locations>

View File

@ -80,7 +80,7 @@
<unit id="org.eclipse.emf.validation.feature.group" version="0.0.0"/> <unit id="org.eclipse.emf.validation.feature.group" version="0.0.0"/>
<unit id="org.eclipse.emf.validation.ocl.feature.group" version="0.0.0"/> <unit id="org.eclipse.emf.validation.ocl.feature.group" version="0.0.0"/>
<unit id="org.eclipse.emf.workspace.feature.group" version="0.0.0"/> <unit id="org.eclipse.emf.workspace.feature.group" version="0.0.0"/>
<unit id="org.eclipse.equinox.ds" version="0.0.0"/> <unit id="org.apache.felix.scr" version="0.0.0"/>
<unit id="org.eclipse.equinox.p2.core.feature.feature.group" version="0.0.0"/> <unit id="org.eclipse.equinox.p2.core.feature.feature.group" version="0.0.0"/>
<unit id="org.eclipse.equinox.p2.discovery.feature.feature.group" version="0.0.0"/> <unit id="org.eclipse.equinox.p2.discovery.feature.feature.group" version="0.0.0"/>
<unit id="org.eclipse.equinox.p2.extras.feature.feature.group" version="0.0.0"/> <unit id="org.eclipse.equinox.p2.extras.feature.feature.group" version="0.0.0"/>
@ -96,6 +96,7 @@
<unit id="org.eclipse.jgit.http.apache.feature.group" version="0.0.0"/> <unit id="org.eclipse.jgit.http.apache.feature.group" version="0.0.0"/>
<unit id="org.eclipse.jgit.lfs.feature.group" version="0.0.0"/> <unit id="org.eclipse.jgit.lfs.feature.group" version="0.0.0"/>
<unit id="org.eclipse.jgit.pgm.feature.group" version="0.0.0"/> <unit id="org.eclipse.jgit.pgm.feature.group" version="0.0.0"/>
<unit id="org.eclipse.jgit.gpg.bc.feature.group" version="0.0.0"/>
<unit id="org.eclipse.nebula.widgets.datechooser.feature.feature.group" version="0.0.0"/> <unit id="org.eclipse.nebula.widgets.datechooser.feature.feature.group" version="0.0.0"/>
<unit id="org.eclipse.nebula.widgets.formattedtext.feature.feature.group" version="0.0.0"/> <unit id="org.eclipse.nebula.widgets.formattedtext.feature.feature.group" version="0.0.0"/>
<unit id="org.eclipse.nebula.widgets.grid.feature.feature.group" version="0.0.0"/> <unit id="org.eclipse.nebula.widgets.grid.feature.feature.group" version="0.0.0"/>
@ -149,7 +150,34 @@
<unit id="org.eclipse.epp.mpc.ui" version="0.0.0"/> <unit id="org.eclipse.epp.mpc.ui" version="0.0.0"/>
<unit id="org.eclipse.epp.mpc.ui.css" version="0.0.0"/> <unit id="org.eclipse.epp.mpc.ui.css" version="0.0.0"/>
<unit id="org.eclipse.epp.mpc.help.ui" version="0.0.0"/> <unit id="org.eclipse.epp.mpc.help.ui" version="0.0.0"/>
<repository id="eclipse_repository" location="https://download.eclipse.org/releases/2022-03/"/> <unit id="org.eclipse.search.core" version="0.0.0"/>
<unit id="com.google.guava" version="32.1.3.jre"/>
<unit id="com.google.guava.failureaccess" version="1.0.2"/>
<unit id="com.google.inject.assistedinject" version="7.0.0"/>
<unit id="com.google.inject" version="7.0.0"/>
<unit id="jakarta.inject.jakarta.inject-api" version="1.0.5"/>
<unit id="jakarta.inject.jakarta.inject-api" version="2.0.1"/>
<unit id="com.ibm.icu" version="0.0.0"/>
<!--osgi.extender=osgi.serviceloader.processor-->
<unit id="org.apache.aries.spifly.dynamic.bundle" version="0.0.0"/>
<!--Bouncycastle-->
<unit id="bcprov" version="0.0.0"/>
<unit id="bcpg" version="0.0.0"/>
<unit id="bcpkix" version="0.0.0"/>
<unit id="bcutil" version="0.0.0"/>
<unit id="org.eclipse.orbit.xml-apis-ext" version="0.0.0"/>
<unit id="org.apache.commons.jxpath" version="0.0.0"/>
<unit id="org.apache.commons.commons-io" version="0.0.0"/>
<unit id="jakarta.annotation-api" version="2.1.1"/>
<unit id="org.sat4j.core" version="2.3.6.v20201214"/>
<unit id="org.sat4j.pb" version="2.3.6.v20201214"/>
<repository id="eclipse_repository" location="https://download.eclipse.org/releases/2023-12/"/>
</location> </location>
<!-- XText Tools: https://github.com/OLibutzki/xtext.tools --> <!-- XText Tools: https://github.com/OLibutzki/xtext.tools -->

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<classpath> <classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/> <classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/> <classpathentry kind="output" path="bin"/>

View File

@ -1,10 +1,10 @@
eclipse.preferences.version=1 eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
org.eclipse.jdt.core.compiler.compliance=11 org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
org.eclipse.jdt.core.compiler.release=enabled org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=11 org.eclipse.jdt.core.compiler.source=17

View File

@ -6,7 +6,7 @@ Bundle-Version: 0.7.0.qualifier
Bundle-Vendor: %providerName Bundle-Vendor: %providerName
Fragment-Host: com.e1c.v8codestyle.autosort;bundle-version="[0.7.0,0.8.0)" Fragment-Host: com.e1c.v8codestyle.autosort;bundle-version="[0.7.0,0.8.0)"
Automatic-Module-Name: com.e1c.v8codestyle.autosort.itests Automatic-Module-Name: com.e1c.v8codestyle.autosort.itests
Bundle-RequiredExecutionEnvironment: JavaSE-11 Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-Localization: fragment Bundle-Localization: fragment
Import-Package: com._1c.g5.v8.dt.platform.version;version="[2.14.0,3.0.0)", 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)", com._1c.g5.v8.dt.testing;version="[3.1.0,4.0.0)",

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<classpath> <classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/> <classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/> <classpathentry kind="output" path="bin"/>

View File

@ -1,10 +1,10 @@
eclipse.preferences.version=1 eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
org.eclipse.jdt.core.compiler.compliance=11 org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=enabled org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=11 org.eclipse.jdt.core.compiler.source=17

View File

@ -6,15 +6,13 @@ Bundle-Version: 0.7.0.qualifier
Bundle-Vendor: %providerName Bundle-Vendor: %providerName
Fragment-Host: com.e1c.v8codestyle.bsl;bundle-version="[0.7.0,0.8.0)" Fragment-Host: com.e1c.v8codestyle.bsl;bundle-version="[0.7.0,0.8.0)"
Automatic-Module-Name: com.e1c.v8codestyle.md.itests Automatic-Module-Name: com.e1c.v8codestyle.md.itests
Bundle-RequiredExecutionEnvironment: JavaSE-11 Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-Localization: fragment Bundle-Localization: fragment
Import-Package: com._1c.g5.v8.dt.core.naming;version="[7.0.0,8.0.0)", 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.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.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.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.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.validation.marker;version="[9.0.0,10.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.e1c.g5.v8.dt.testing.check;version="[1.0.0,2.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)" org.junit;version="[4.13.0,5.0.0)"

View File

@ -41,5 +41,15 @@ Function CorrectCheckForCommonModule() Export
return new Structure("Key1, Key2", 10, CommonModule); return new Structure("Key1, Key2", 10, CommonModule);
EndFunction EndFunction
// Returns:
// Structure - complaint:
// * Ref - CatalogRef -
Function CorrectCheckForTypeSets() Export
EmptyRef = Catalogs.Catalog1.EmptyRef();
Str = Новый Structure;
Str.Вставить("Ref", EmptyRef);
Возврат Str;
EndFunction

View File

@ -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<Marker> 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<Marker> getModuleMarkers()
{
String moduleId = Path.ROOT.append(getTestConfigurationName()).append(getModuleFileName()).toString();
List<Marker> markers = List.of(markerManager.getMarkers(getProject().getWorkspaceProject(), moduleId));
return markers.stream()
.filter(marker -> CHECK_ID.equals(getCheckIdFromMarker(marker, getProject())))
.collect(Collectors.toList());
}
}

View File

@ -16,14 +16,8 @@ import org.junit.Ignore;
import org.junit.Test; import org.junit.Test;
import com._1c.g5.v8.bm.core.IBmObject; 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.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.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.v8.dt.validation.marker.Marker;
import com._1c.g5.wiring.ServiceAccess; import com._1c.g5.wiring.ServiceAccess;
import com.e1c.g5.v8.dt.check.qfix.FixProcessHandle; 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 DESCRIPTION = "Clear extra empty lines";
private static final String COMMON_MODULE_FILE_NAME = "/src/CommonModules/CommonModule/Module.bsl"; private static final String COMMON_MODULE_FILE_NAME = "/src/CommonModules/CommonModule/Module.bsl";
private IFixManager fixManager = ServiceAccess.get(IFixManager.class); 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 //after fixing the problem in EDT - delete it
@Ignore @Ignore
@ -96,10 +87,7 @@ public class ConsecutiveEmptyLinesFixTest
*/ */
private void applyFix(Marker marker, IDtProject dtProject) private void applyFix(Marker marker, IDtProject dtProject)
{ {
IMarkerWrapper markerWrapper = new BmMarkerWrapper(marker, dtProject.getWorkspaceProject(), bmModelManager, FixProcessHandle handle = fixManager.prepareFix(marker, dtProject);
projectManager, symbolicLinkLocalizer, openHelper);
FixProcessHandle handle = fixManager.prepareFix(markerWrapper, dtProject);
FixVariantDescriptor variantDescr = null; FixVariantDescriptor variantDescr = null;

View File

@ -387,8 +387,8 @@ public class CommonModuleStrictTypesTest
Module module = updateAndGetModule(checkId); Module module = updateAndGetModule(checkId);
List<Function> finctions = EcoreUtil2.eAllOfType(module, Function.class); List<Function> functions = EcoreUtil2.eAllOfType(module, Function.class);
assertEquals(4, finctions.size()); assertEquals(5, functions.size());
List<Marker> markers = getMarters(checkId, module); List<Marker> markers = getMarters(checkId, module);

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>ExtensionNotifyDescriptionToServerProcedureCheck</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
<nature>com._1c.g5.v8.dt.core.V8ConfigurationNature</nature>
</natures>
</projectDescription>

View File

@ -0,0 +1,3 @@
addModuleStrictTypesAnnotation=true
createModuleStructure=true
eclipse.preferences.version=1

View File

@ -0,0 +1,3 @@
commonChecks=true
eclipse.preferences.version=1
standardChecks=true

View File

@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8

View File

@ -0,0 +1,2 @@
Manifest-Version: 1.0
Runtime-Version: 8.3.23

Some files were not shown because too many files have changed in this diff Show More