update
This commit is contained in:
@@ -244,9 +244,13 @@ public class CodebaseContext {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Recursively index nested types
|
// Recursively index nested types
|
||||||
for (Object type : td.getTypes()) {
|
for (Object decl : td.bodyDeclarations()) {
|
||||||
if (type instanceof TypeDeclaration nestedTd) {
|
if (decl instanceof TypeDeclaration nestedTd) {
|
||||||
indexType(nestedTd, fqn, javaFile);
|
indexType(nestedTd, fqn, javaFile);
|
||||||
|
} else if (decl instanceof EnumDeclaration nestedEd) {
|
||||||
|
indexEnum(nestedEd, fqn, javaFile);
|
||||||
|
} else if (decl instanceof org.eclipse.jdt.core.dom.RecordDeclaration nestedRd) {
|
||||||
|
indexRecord(nestedRd, fqn, javaFile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -269,10 +273,12 @@ public class CodebaseContext {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Recursively index nested types
|
// Recursively index nested types
|
||||||
for (Object type : rd.bodyDeclarations()) {
|
for (Object decl : rd.bodyDeclarations()) {
|
||||||
if (type instanceof TypeDeclaration nestedTd) {
|
if (decl instanceof TypeDeclaration nestedTd) {
|
||||||
indexType(nestedTd, fqn, javaFile);
|
indexType(nestedTd, fqn, javaFile);
|
||||||
} else if (type instanceof org.eclipse.jdt.core.dom.RecordDeclaration nestedRd) {
|
} else if (decl instanceof EnumDeclaration nestedEd) {
|
||||||
|
indexEnum(nestedEd, fqn, javaFile);
|
||||||
|
} else if (decl instanceof org.eclipse.jdt.core.dom.RecordDeclaration nestedRd) {
|
||||||
indexRecord(nestedRd, fqn, javaFile);
|
indexRecord(nestedRd, fqn, javaFile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -331,6 +337,17 @@ public class CodebaseContext {
|
|||||||
if (!simpleNameToFqn.containsKey(simpleName)) {
|
if (!simpleNameToFqn.containsKey(simpleName)) {
|
||||||
simpleNameToFqn.put(simpleName, fqn);
|
simpleNameToFqn.put(simpleName, fqn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Recursively index nested types inside enum body
|
||||||
|
for (Object decl : ed.bodyDeclarations()) {
|
||||||
|
if (decl instanceof TypeDeclaration nestedTd) {
|
||||||
|
indexType(nestedTd, fqn, javaFile);
|
||||||
|
} else if (decl instanceof EnumDeclaration nestedEd) {
|
||||||
|
indexEnum(nestedEd, fqn, javaFile);
|
||||||
|
} else if (decl instanceof org.eclipse.jdt.core.dom.RecordDeclaration nestedRd) {
|
||||||
|
indexRecord(nestedRd, fqn, javaFile);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Map<String, List<String>> getEnumValuesMap() {
|
public Map<String, List<String>> getEnumValuesMap() {
|
||||||
|
|||||||
Reference in New Issue
Block a user