lsp4jakarta
lsp4jakarta copied to clipboard
Test projects signature types not resolving correctly
Description:
Integration test fails to get the resolved type of a signature when the test Java Project is loaded.
Specification:
As an example of the current test behavior, JavaModelUtil.getResolvedTypeName() fails to find the resolved Type (returning null) even though the primaryType and the formatSignature values are correct and are found in the Test Java Project. When doing manual testing, JavaModelUtil.getResolvedTypeName() returns the right resolvedTypeName.
for (ILocalVariable var : method.getParameters()) {
String signature = val.getTypeSignature();
String formatSignature = signature.replace("/", ".");
IType primaryType = param.getTypeRoot().findPrimaryType();
String resolvedTypeName = JavaModelUtil.getResolvedTypeName(formatSignature, primaryType);
}