Skip to content

Commit 90567fe

Browse files
committed
langauge-server: fix SWC symbol detection when SWC is referened in multiple ActionScriptProjectData instances but projectData.project is null in the first
1 parent 10ce3a7 commit 90567fe

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

language-server/src/main/java/com/as3mxml/vscode/utils/DefinitionURI.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,14 @@ public static DefinitionURI decode(String encodedQuery,
6666
List<ActionScriptProjectData> allProjectData = actionScriptProjectManager
6767
.getAllProjectDataForSWCFile(Paths.get(result.swcFilePath));
6868
if (allProjectData.size() > 0) {
69-
ActionScriptProjectData projectData = allProjectData.get(0);
70-
ILspProject project = projectData.project;
69+
ILspProject project = null;
70+
while (allProjectData.size() > 0) {
71+
ActionScriptProjectData projectData = allProjectData.remove(0);
72+
project = projectData.project;
73+
if (project != null) {
74+
break;
75+
}
76+
}
7177
if (project != null) {
7278
result.project = project;
7379
String currentSymbol = symbols.remove(0);

0 commit comments

Comments
 (0)