Skip to content

Commit d9dfbf3

Browse files
committed
Оптимизировано (и местами исправлено) формирование ссылки на объекты MD
1 parent d9296b9 commit d9dfbf3

24 files changed

+121
-174
lines changed

build.gradle.kts

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ dependencies {
8686
exclude("org.antlr", "antlr-runtime")
8787
}
8888
api("io.github.1c-syntax", "utils", "0.6.2")
89-
api("io.github.1c-syntax", "mdclasses", "0.15.0")
89+
api("io.github.1c-syntax", "mdclasses", "develop-SNAPSHOT")
9090
api("io.github.1c-syntax", "bsl-common-library", "0.8.0")
9191
api("io.github.1c-syntax", "supportconf", "0.14.2")
9292
api("io.github.1c-syntax", "bsl-parser-core", "0.3.0")

src/main/java/com/github/_1c_syntax/bsl/languageserver/cli/AnalyzeCommand.java

+1-6
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626
import com.github._1c_syntax.bsl.languageserver.reporters.ReportersAggregator;
2727
import com.github._1c_syntax.bsl.languageserver.reporters.data.AnalysisInfo;
2828
import com.github._1c_syntax.bsl.languageserver.reporters.data.FileInfo;
29-
import com.github._1c_syntax.bsl.mdo.MD;
30-
import com.github._1c_syntax.bsl.types.MdoReference;
3129
import com.github._1c_syntax.utils.Absolute;
3230
import lombok.RequiredArgsConstructor;
3331
import lombok.SneakyThrows;
@@ -205,10 +203,7 @@ private FileInfo getFileInfoFromFile(Path srcDir, File file) {
205203
var filePath = srcDir.relativize(Absolute.path(file));
206204
var diagnostics = documentContext.getDiagnostics();
207205
var metrics = documentContext.getMetrics();
208-
var mdoRef = documentContext.getMdObject()
209-
.map(MD::getMdoReference)
210-
.map(MdoReference::getMdoRef)
211-
.orElse("");
206+
var mdoRef = documentContext.getMdoRef();
212207

213208
var fileInfo = new FileInfo(filePath, mdoRef, diagnostics, metrics);
214209

src/main/java/com/github/_1c_syntax/bsl/languageserver/context/DocumentContext.java

+11
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
import com.github._1c_syntax.bsl.languageserver.context.computer.SymbolTreeComputer;
3333
import com.github._1c_syntax.bsl.languageserver.context.symbol.MethodSymbol;
3434
import com.github._1c_syntax.bsl.languageserver.context.symbol.SymbolTree;
35+
import com.github._1c_syntax.bsl.languageserver.utils.MdoRefBuilder;
3536
import com.github._1c_syntax.bsl.languageserver.utils.Trees;
3637
import com.github._1c_syntax.bsl.mdo.MD;
3738
import com.github._1c_syntax.bsl.mdo.support.ScriptVariant;
@@ -256,6 +257,16 @@ public Optional<MD> getMdObject() {
256257
return getServerContext().getConfiguration().findChild(getUri());
257258
}
258259

260+
/**
261+
* Возвращает строковое представление ссылки связанного с объектом объекта метаданных 1С либо строку URI для
262+
* остальных случаев
263+
*
264+
* @return Строковое представление ссылки
265+
*/
266+
public String getMdoRef() {
267+
return MdoRefBuilder.getMdoRef(this);
268+
}
269+
259270
public List<SDBLTokenizer> getQueries() {
260271
return queries.getOrCompute();
261272
}

src/main/java/com/github/_1c_syntax/bsl/languageserver/context/ServerContext.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323

2424
import com.github._1c_syntax.bsl.languageserver.WorkDoneProgressHelper;
2525
import com.github._1c_syntax.bsl.languageserver.configuration.LanguageServerConfiguration;
26-
import com.github._1c_syntax.bsl.languageserver.utils.MdoRefBuilder;
2726
import com.github._1c_syntax.bsl.languageserver.utils.NamedForkJoinWorkerThreadFactory;
2827
import com.github._1c_syntax.bsl.languageserver.utils.Resources;
2928
import com.github._1c_syntax.bsl.mdclasses.CF;
@@ -307,7 +306,7 @@ private CF computeConfigurationMetadata() {
307306
}
308307

309308
private void addMdoRefByUri(URI uri, DocumentContext documentContext) {
310-
String mdoRef = MdoRefBuilder.getMdoRef(documentContext);
309+
var mdoRef = documentContext.getMdoRef();
311310

312311
mdoRefs.put(uri, mdoRef);
313312
documentsByMDORef.computeIfAbsent(

src/main/java/com/github/_1c_syntax/bsl/languageserver/context/computer/ModuleSymbolComputer.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323

2424
import com.github._1c_syntax.bsl.languageserver.context.DocumentContext;
2525
import com.github._1c_syntax.bsl.languageserver.context.symbol.ModuleSymbol;
26-
import com.github._1c_syntax.bsl.languageserver.utils.MdoRefBuilder;
2726
import com.github._1c_syntax.bsl.languageserver.utils.Ranges;
2827
import com.github._1c_syntax.bsl.parser.BSLLexer;
2928
import com.github._1c_syntax.bsl.types.ModuleType;
@@ -69,7 +68,7 @@ public ModuleSymbol compute() {
6968
}
7069

7170
private static String getName(DocumentContext documentContext) {
72-
String name = MdoRefBuilder.getMdoRef(documentContext);
71+
var name = documentContext.getMdoRef();
7372
var moduleType = documentContext.getModuleType();
7473
if (MODULE_TYPES_TO_APPEND_NAME.contains(moduleType)) {
7574
name += "." + moduleType.name();

src/main/java/com/github/_1c_syntax/bsl/languageserver/diagnostics/AbstractMetadataDiagnostic.java

+4
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@ protected void addDiagnostic(String message) {
103103
diagnosticStorage.addDiagnostic(diagnosticRange, message);
104104
}
105105

106+
protected String getMdoRefLocal(MD mdo) {
107+
return documentContext.getServerContext().getConfiguration().getMdoRefLocal(mdo);
108+
}
109+
106110
protected abstract void checkMetadata(MD mdo);
107111

108112
private void checkMetadataWithModules() {

src/main/java/com/github/_1c_syntax/bsl/languageserver/diagnostics/DenyIncompleteValuesDiagnostic.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
import com.github._1c_syntax.bsl.languageserver.diagnostics.metadata.DiagnosticSeverity;
2727
import com.github._1c_syntax.bsl.languageserver.diagnostics.metadata.DiagnosticTag;
2828
import com.github._1c_syntax.bsl.languageserver.diagnostics.metadata.DiagnosticType;
29-
import com.github._1c_syntax.bsl.languageserver.utils.MdoRefBuilder;
3029
import com.github._1c_syntax.bsl.mdo.MD;
3130
import com.github._1c_syntax.bsl.mdo.Register;
3231
import com.github._1c_syntax.bsl.mdo.children.Dimension;
@@ -59,11 +58,11 @@ public DenyIncompleteValuesDiagnostic() {
5958
@Override
6059
protected void checkMetadata(MD mdo) {
6160
if (mdo instanceof Register register) {
61+
var mdoRefLocal = getMdoRefLocal(mdo);
6262
register.getDimensions().stream()
6363
.filter(dimension -> !dimension.isDenyIncompleteValues())
6464
.forEach((Dimension dimension) -> {
65-
var ownerMDOName = MdoRefBuilder.getLocaleOwnerMdoName(documentContext, mdo);
66-
addDiagnostic(info.getMessage(dimension.getName(), ownerMDOName));
65+
addDiagnostic(info.getMessage(dimension.getName(), mdoRefLocal));
6766
});
6867
}
6968
}

src/main/java/com/github/_1c_syntax/bsl/languageserver/diagnostics/ForbiddenMetadataNameDiagnostic.java

+4-12
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,14 @@
2121
*/
2222
package com.github._1c_syntax.bsl.languageserver.diagnostics;
2323

24-
import com.github._1c_syntax.bsl.languageserver.configuration.Language;
2524
import com.github._1c_syntax.bsl.languageserver.configuration.LanguageServerConfiguration;
2625
import com.github._1c_syntax.bsl.languageserver.diagnostics.metadata.DiagnosticMetadata;
2726
import com.github._1c_syntax.bsl.languageserver.diagnostics.metadata.DiagnosticScope;
2827
import com.github._1c_syntax.bsl.languageserver.diagnostics.metadata.DiagnosticSeverity;
2928
import com.github._1c_syntax.bsl.languageserver.diagnostics.metadata.DiagnosticTag;
3029
import com.github._1c_syntax.bsl.languageserver.diagnostics.metadata.DiagnosticType;
3130
import com.github._1c_syntax.bsl.mdo.AttributeOwner;
32-
import com.github._1c_syntax.bsl.mdo.ChildrenOwner;
3331
import com.github._1c_syntax.bsl.mdo.MD;
34-
import com.github._1c_syntax.bsl.types.MdoReference;
3532
import com.github._1c_syntax.bsl.types.ModuleType;
3633
import com.github._1c_syntax.utils.CaseInsensitivePattern;
3734
import lombok.RequiredArgsConstructor;
@@ -134,23 +131,18 @@ public class ForbiddenMetadataNameDiagnostic extends AbstractMetadataDiagnostic
134131
protected void checkMetadata(MD mdo) {
135132

136133
// проверка имени метаданного
137-
checkName(mdo.getName(), mdo.getMdoReference());
134+
checkName(mdo.getName(), mdo);
138135

139136
// проверка имен реквизитов и табличных частей
140137
if (mdo instanceof AttributeOwner childrenOwner) {
141138
childrenOwner.getPlainStorageFields()
142-
.forEach(child -> checkName(child.getName(), child.getMdoReference()));
139+
.forEach(child -> checkName(child.getName(), child));
143140
}
144141
}
145142

146-
private void checkName(String name, MdoReference mdoReference) {
143+
private void checkName(String name, MD md) {
147144
if (FORBIDDEN_NAMES_PATTERN.matcher(name).matches()) {
148-
String mdoRef;
149-
if (serverConfiguration.getLanguage() == Language.RU) {
150-
mdoRef = mdoReference.getMdoRefRu();
151-
} else {
152-
mdoRef = mdoReference.getMdoRef();
153-
}
145+
var mdoRef = getMdoRefLocal(md);
154146
addDiagnostic(info.getMessage(name, mdoRef));
155147
}
156148
}

src/main/java/com/github/_1c_syntax/bsl/languageserver/diagnostics/MetadataObjectNameLengthDiagnostic.java

+1-12
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
*/
2222
package com.github._1c_syntax.bsl.languageserver.diagnostics;
2323

24-
import com.github._1c_syntax.bsl.languageserver.configuration.Language;
2524
import com.github._1c_syntax.bsl.languageserver.configuration.LanguageServerConfiguration;
2625
import com.github._1c_syntax.bsl.languageserver.diagnostics.metadata.DiagnosticMetadata;
2726
import com.github._1c_syntax.bsl.languageserver.diagnostics.metadata.DiagnosticParameter;
@@ -65,7 +64,7 @@ public class MetadataObjectNameLengthDiagnostic extends AbstractMetadataDiagnost
6564
@Override
6665
protected void checkMetadata(MD mdo) {
6766
if (mdo.getName().length() > maxMetadataObjectNameLength) {
68-
addAttributeDiagnostic(mdo);
67+
addDiagnostic(info.getMessage(getMdoRefLocal(mdo), maxMetadataObjectNameLength));
6968
}
7069
}
7170

@@ -81,14 +80,4 @@ protected void check() {
8180
super.check();
8281
}
8382
}
84-
85-
private void addAttributeDiagnostic(MD attribute) {
86-
String mdoRef;
87-
if (serverConfiguration.getLanguage() == Language.RU) {
88-
mdoRef = attribute.getMdoReference().getMdoRefRu();
89-
} else {
90-
mdoRef = attribute.getMdoReference().getMdoRef();
91-
}
92-
addDiagnostic(info.getMessage(mdoRef, maxMetadataObjectNameLength));
93-
}
9483
}

src/main/java/com/github/_1c_syntax/bsl/languageserver/diagnostics/MissingCommonModuleMethodDiagnostic.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ private static String getMethodNameByLocation(BSLParserRuleContext node, Range r
6565

6666
@Override
6767
protected void check() {
68-
if (documentContext.getServerContext().getConfiguration().getConfigurationSource() == ConfigurationSource.EMPTY){
68+
if (documentContext.getServerContext().getConfiguration().getConfigurationSource() == ConfigurationSource.EMPTY) {
6969
return;
7070
}
7171
locationRepository.getSymbolOccurrencesByLocationUri(documentContext.getUri())
@@ -88,7 +88,7 @@ private Optional<CallData> getReferenceToMethodCall(SymbolOccurrence symbolOccur
8888
// т.к. через refIndex.getReferences нельзя получить приватные методы, приходится обходить символы модуля
8989
final var methodSymbol = document.get()
9090
.getSymbolTree().getMethodSymbol(symbol.getSymbolName());
91-
if (methodSymbol.isEmpty()){
91+
if (methodSymbol.isEmpty()) {
9292
final var location = symbolOccurrence.getLocation();
9393
// Нельзя использовать symbol.getSymbolName(), т.к. имя в нижнем регистре
9494
return Optional.of(
@@ -97,7 +97,7 @@ private Optional<CallData> getReferenceToMethodCall(SymbolOccurrence symbolOccur
9797
location.getRange(), false, false));
9898
}
9999
// вызовы приватных методов внутри самого модуля пропускаем
100-
if (document.get().getUri().equals(documentContext.getUri())){
100+
if (document.get().getUri().equals(documentContext.getUri())) {
101101
return Optional.empty();
102102
}
103103
return methodSymbol
@@ -109,7 +109,7 @@ private Optional<CallData> getReferenceToMethodCall(SymbolOccurrence symbolOccur
109109

110110
private void fireIssue(CallData callData) {
111111
final String message;
112-
if (!callData.exists){
112+
if (!callData.exists) {
113113
message = info.getMessage(callData.methodName, callData.moduleName);
114114
} else {
115115
message = info.getResourceString(PRIVATE_METHOD_MESSAGE, callData.methodName, callData.moduleName);

src/main/java/com/github/_1c_syntax/bsl/languageserver/diagnostics/MissingEventSubscriptionHandlerDiagnostic.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ protected void check() {
109109

110110
private void checkMethod(EventSubscription eventSubs, String methodName, CommonModule commonModule) {
111111
documentContext.getServerContext()
112-
.getDocument(commonModule.getMdoReference().getMdoRef(), ModuleType.CommonModule)
112+
.getDocument(commonModule.getMdoRef(), ModuleType.CommonModule)
113113
.ifPresent((DocumentContext commonModuleContext) -> {
114114
var method = commonModuleContext.getSymbolTree().getMethods().stream()
115115
.filter(methodSymbol -> methodSymbol.getName().equalsIgnoreCase(methodName))

src/main/java/com/github/_1c_syntax/bsl/languageserver/diagnostics/PrivilegedModuleMethodCallDiagnostic.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,7 @@ private List<ModuleSymbol> getPrivilegedModuleSymbols() {
8585
}
8686

8787
private Optional<ModuleSymbol> getPrivilegedModuleSymbol(CommonModule mdCommonModule) {
88-
return documentContext.getServerContext().getDocument(
89-
mdCommonModule.getMdoReference().getMdoRef(), ModuleType.CommonModule)
88+
return documentContext.getServerContext().getDocument(mdCommonModule.getMdoRef(), ModuleType.CommonModule)
9089
.map(documentContext1 -> documentContext1.getSymbolTree().getModule());
9190
}
9291

src/main/java/com/github/_1c_syntax/bsl/languageserver/diagnostics/ProtectedModuleDiagnostic.java

+1-7
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
import com.github._1c_syntax.bsl.languageserver.diagnostics.metadata.DiagnosticSeverity;
2828
import com.github._1c_syntax.bsl.languageserver.diagnostics.metadata.DiagnosticTag;
2929
import com.github._1c_syntax.bsl.languageserver.diagnostics.metadata.DiagnosticType;
30-
import com.github._1c_syntax.bsl.languageserver.utils.MdoRefBuilder;
3130
import com.github._1c_syntax.bsl.languageserver.utils.Ranges;
3231
import com.github._1c_syntax.bsl.mdo.Module;
3332
import com.github._1c_syntax.bsl.mdo.ModuleOwner;
@@ -79,13 +78,8 @@ protected void check() {
7978
.filter(Module::isProtected)
8079
.findAny();
8180
if (hasProtected.isPresent()) {
82-
addDiagnostic(moduleOwner);
81+
diagnosticStorage.addDiagnostic(diagnosticRange, info.getMessage(configuration.getMdoRefLocal(moduleOwner)));
8382
}
8483
});
8584
}
86-
87-
private void addDiagnostic(ModuleOwner moduleOwner) {
88-
var ownerMDOName = MdoRefBuilder.getLocaleOwnerMdoName(documentContext, moduleOwner);
89-
diagnosticStorage.addDiagnostic(diagnosticRange, info.getMessage(ownerMDOName));
90-
}
9185
}

src/main/java/com/github/_1c_syntax/bsl/languageserver/diagnostics/SameMetadataObjectAndChildNamesDiagnostic.java

+4-15
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
*/
2222
package com.github._1c_syntax.bsl.languageserver.diagnostics;
2323

24-
import com.github._1c_syntax.bsl.languageserver.configuration.Language;
2524
import com.github._1c_syntax.bsl.languageserver.configuration.LanguageServerConfiguration;
2625
import com.github._1c_syntax.bsl.languageserver.diagnostics.metadata.DiagnosticMetadata;
2726
import com.github._1c_syntax.bsl.languageserver.diagnostics.metadata.DiagnosticScope;
@@ -92,30 +91,20 @@ protected void checkMetadata(MD mdo) {
9291

9392
if (mdo instanceof AttributeOwner attributeOwner && !attributeOwner.getAllAttributes().isEmpty()) {
9493
var mdoName = stringInterner.intern(mdo.getName());
95-
checkkAttributes(attributeOwner.getAllAttributes(), mdoName);
94+
checkAttributes(attributeOwner.getAllAttributes(), mdoName);
9695
}
9796

9897
if (mdo instanceof TabularSectionOwner tabularSectionOwner && !tabularSectionOwner.getTabularSections().isEmpty()) {
9998
tabularSectionOwner.getTabularSections().forEach((TabularSection table) -> {
10099
var tableName = stringInterner.intern(table.getName());
101-
checkkAttributes(table.getAllAttributes(), tableName);
100+
checkAttributes(table.getAllAttributes(), tableName);
102101
});
103102
}
104103
}
105104

106-
private void checkkAttributes(List<Attribute> attributeOwner, String mdoName) {
105+
private void checkAttributes(List<Attribute> attributeOwner, String mdoName) {
107106
attributeOwner.stream()
108107
.filter(attribute -> mdoName.equalsIgnoreCase(attribute.getName()))
109-
.forEach(attribute -> addAttributeDiagnostic(attribute, mdoName));
110-
}
111-
112-
private void addAttributeDiagnostic(Attribute attribute, String mdoName) {
113-
String mdoRef;
114-
if (serverConfiguration.getLanguage() == Language.RU) {
115-
mdoRef = attribute.getMdoReference().getMdoRefRu();
116-
} else {
117-
mdoRef = attribute.getMdoReference().getMdoRef();
118-
}
119-
addDiagnostic(info.getMessage(mdoRef, mdoName));
108+
.forEach(attribute -> addDiagnostic(info.getMessage(getMdoRefLocal(attribute), mdoName)));
120109
}
121110
}

src/main/java/com/github/_1c_syntax/bsl/languageserver/diagnostics/ScheduledJobHandlerDiagnostic.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,7 @@ private void checkMethod(ScheduledJob scheduleJob, CommonModule mdCommonModule,
134134
final var fullName = getFullName(mdCommonModule, methodName);
135135
scheduledJobHandlers.computeIfAbsent(fullName, k -> new ArrayList<>()).add(scheduleJob);
136136

137-
documentContext.getServerContext().getDocument(
138-
mdCommonModule.getMdoReference().getMdoRef(), ModuleType.CommonModule)
137+
documentContext.getServerContext().getDocument(mdCommonModule.getMdoRef(), ModuleType.CommonModule)
139138
.ifPresent((DocumentContext commonModuleContext) -> {
140139
var method = commonModuleContext.getSymbolTree().getMethods().stream()
141140
.filter(methodSymbol -> methodSymbol.getName().equalsIgnoreCase(methodName))

src/main/java/com/github/_1c_syntax/bsl/languageserver/diagnostics/WrongDataPathForFormElementsDiagnostic.java

+1-5
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
import com.github._1c_syntax.bsl.mdo.Form;
3131
import com.github._1c_syntax.bsl.mdo.MD;
3232
import com.github._1c_syntax.bsl.mdo.storage.form.FormItem;
33-
import com.github._1c_syntax.bsl.mdo.support.ScriptVariant;
3433
import com.github._1c_syntax.bsl.types.ModuleType;
3534
import org.eclipse.lsp4j.Range;
3635

@@ -108,9 +107,6 @@ private void checkForm(Form form) {
108107
}
109108

110109
private String getMdoRef(Form form) {
111-
if (documentContext.getServerContext().getConfiguration().getScriptVariant() == ScriptVariant.ENGLISH) {
112-
return form.getMdoReference().getMdoRef();
113-
}
114-
return form.getMdoReference().getMdoRefRu();
110+
return documentContext.getServerContext().getConfiguration().getMdoRefLocal(form);
115111
}
116112
}

src/main/java/com/github/_1c_syntax/bsl/languageserver/diagnostics/WrongHttpServiceHandlerDiagnostic.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ private void checkService(HTTPService httpService) {
7373
httpService.getUrlTemplates().stream()
7474
.flatMap(httpServiceURLTemplate -> httpServiceURLTemplate.getMethods().stream())
7575
.forEach((HTTPServiceMethod service) -> {
76-
final var serviceName = service.getMdoReference().getMdoRef();
76+
final var serviceName = service.getMdoRef();
7777
if (service.getHandler().isEmpty()) {
7878
addMissingHandlerDiagnostic(serviceName);
7979
return;

src/main/java/com/github/_1c_syntax/bsl/languageserver/hover/DescriptionFormatter.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
import com.github._1c_syntax.bsl.languageserver.context.symbol.description.MethodDescription;
3030
import com.github._1c_syntax.bsl.languageserver.context.symbol.description.ParameterDescription;
3131
import com.github._1c_syntax.bsl.languageserver.context.symbol.description.TypeDescription;
32-
import com.github._1c_syntax.bsl.languageserver.utils.MdoRefBuilder;
3332
import com.github._1c_syntax.bsl.languageserver.utils.Resources;
3433
import lombok.RequiredArgsConstructor;
3534
import org.eclipse.lsp4j.SymbolKind;
@@ -142,7 +141,7 @@ public String getSectionWithCodeFences(Collection<String> codeBlocks, String res
142141
public String getLocation(MethodSymbol symbol) {
143142
var documentContext = symbol.getOwner();
144143
var startPosition = symbol.getSelectionRange().getStart();
145-
String mdoRef = MdoRefBuilder.getMdoRef(documentContext);
144+
var mdoRef = documentContext.getMdoRef();
146145

147146
return String.format(
148147
"[%s](%s#%d)",
@@ -155,7 +154,7 @@ public String getLocation(MethodSymbol symbol) {
155154
public String getLocation(VariableSymbol symbol) {
156155
var documentContext = symbol.getOwner();
157156
var startPosition = symbol.getSelectionRange().getStart();
158-
String mdoRef = MdoRefBuilder.getMdoRef(documentContext);
157+
var mdoRef = documentContext.getMdoRef();
159158

160159
String parentPostfix = symbol.getRootParent(SymbolKind.Method)
161160
.map(sourceDefinedSymbol -> "." + sourceDefinedSymbol.getName())

0 commit comments

Comments
 (0)