30
30
import com .github ._1c_syntax .bsl .languageserver .diagnostics .metadata .DiagnosticType ;
31
31
import com .github ._1c_syntax .bsl .languageserver .references .ReferenceIndex ;
32
32
import com .github ._1c_syntax .bsl .languageserver .references .model .Reference ;
33
+ import com .github ._1c_syntax .bsl .mdo .CommonModule ;
33
34
import com .github ._1c_syntax .bsl .types .ModuleType ;
34
- import com .github ._1c_syntax .mdclasses .mdo .MDCommonModule ;
35
35
import lombok .RequiredArgsConstructor ;
36
36
import org .eclipse .lsp4j .SymbolKind ;
37
37
@@ -64,10 +64,10 @@ public class PrivilegedModuleMethodCallDiagnostic extends AbstractDiagnostic {
64
64
65
65
@ Override
66
66
protected void check () {
67
- if (privilegedModuleSymbols .isEmpty ()){
67
+ if (privilegedModuleSymbols .isEmpty ()) {
68
68
privilegedModuleSymbols = getPrivilegedModuleSymbols ();
69
69
}
70
- if (privilegedModuleSymbols .isEmpty ()){
70
+ if (privilegedModuleSymbols .isEmpty ()) {
71
71
return ;
72
72
}
73
73
@@ -78,20 +78,20 @@ protected void check() {
78
78
79
79
private List <ModuleSymbol > getPrivilegedModuleSymbols () {
80
80
return documentContext .getServerContext ().getConfiguration ().getCommonModules ()
81
- .values (). stream ()
82
- .filter (MDCommonModule ::isPrivileged )
81
+ .stream ()
82
+ .filter (CommonModule ::isPrivileged )
83
83
.flatMap (mdCommonModule -> getPrivilegedModuleSymbol (mdCommonModule ).stream ())
84
84
.toList ();
85
85
}
86
86
87
- private Optional <ModuleSymbol > getPrivilegedModuleSymbol (MDCommonModule mdCommonModule ) {
87
+ private Optional <ModuleSymbol > getPrivilegedModuleSymbol (CommonModule mdCommonModule ) {
88
88
return documentContext .getServerContext ().getDocument (
89
89
mdCommonModule .getMdoReference ().getMdoRef (), ModuleType .CommonModule )
90
90
.map (documentContext1 -> documentContext1 .getSymbolTree ().getModule ());
91
91
}
92
92
93
93
private boolean isReferenceToModules (Reference reference ) {
94
- if (!validateNestedCalls && reference .getUri ().equals (documentContext .getUri ())){
94
+ if (!validateNestedCalls && reference .getUri ().equals (documentContext .getUri ())) {
95
95
return false ;
96
96
}
97
97
return reference .getSourceDefinedSymbol ()
0 commit comments