diff --git a/build.gradle.kts b/build.gradle.kts index dc7d77d9991..c6dc7ec1c61 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -29,7 +29,7 @@ repositories { mavenLocal() mavenCentral() maven(url = "https://jitpack.io") - maven(url = "https://projectlombok.org/edge-releases") + maven(url = "https://projectlombok.org/edge-releases") } group = "io.github.1c-syntax" @@ -83,7 +83,7 @@ dependencies { exclude("org.glassfish", "javax.json") } api("com.github.1c-syntax", "utils", "0.5.1") - api("com.github.1c-syntax", "mdclasses", "develop-SNAPSHOT") + api("io.github.1c-syntax", "mdclasses", "0.12.0-rc.5") api("io.github.1c-syntax", "bsl-common-library", "0.5.0") api("io.github.1c-syntax", "supportconf", "0.12.1") diff --git a/src/main/java/com/github/_1c_syntax/bsl/languageserver/diagnostics/PrivilegedModuleMethodCallDiagnostic.java b/src/main/java/com/github/_1c_syntax/bsl/languageserver/diagnostics/PrivilegedModuleMethodCallDiagnostic.java index 078b8187e2e..ea463293767 100644 --- a/src/main/java/com/github/_1c_syntax/bsl/languageserver/diagnostics/PrivilegedModuleMethodCallDiagnostic.java +++ b/src/main/java/com/github/_1c_syntax/bsl/languageserver/diagnostics/PrivilegedModuleMethodCallDiagnostic.java @@ -30,8 +30,8 @@ import com.github._1c_syntax.bsl.languageserver.diagnostics.metadata.DiagnosticType; import com.github._1c_syntax.bsl.languageserver.references.ReferenceIndex; import com.github._1c_syntax.bsl.languageserver.references.model.Reference; +import com.github._1c_syntax.bsl.mdo.CommonModule; import com.github._1c_syntax.bsl.types.ModuleType; -import com.github._1c_syntax.mdclasses.mdo.MDCommonModule; import lombok.RequiredArgsConstructor; import org.eclipse.lsp4j.SymbolKind; @@ -64,10 +64,10 @@ public class PrivilegedModuleMethodCallDiagnostic extends AbstractDiagnostic { @Override protected void check() { - if (privilegedModuleSymbols.isEmpty()){ + if (privilegedModuleSymbols.isEmpty()) { privilegedModuleSymbols = getPrivilegedModuleSymbols(); } - if (privilegedModuleSymbols.isEmpty()){ + if (privilegedModuleSymbols.isEmpty()) { return; } @@ -78,20 +78,20 @@ protected void check() { private List getPrivilegedModuleSymbols() { return documentContext.getServerContext().getConfiguration().getCommonModules() - .values().stream() - .filter(MDCommonModule::isPrivileged) + .stream() + .filter(CommonModule::isPrivileged) .flatMap(mdCommonModule -> getPrivilegedModuleSymbol(mdCommonModule).stream()) .toList(); } - private Optional getPrivilegedModuleSymbol(MDCommonModule mdCommonModule) { + private Optional getPrivilegedModuleSymbol(CommonModule mdCommonModule) { return documentContext.getServerContext().getDocument( mdCommonModule.getMdoReference().getMdoRef(), ModuleType.CommonModule) .map(documentContext1 -> documentContext1.getSymbolTree().getModule()); } private boolean isReferenceToModules(Reference reference) { - if (!validateNestedCalls && reference.getUri().equals(documentContext.getUri())){ + if (!validateNestedCalls && reference.getUri().equals(documentContext.getUri())) { return false; } return reference.getSourceDefinedSymbol()