From f8561effd6c12024bbfb5f8eaa4b90c0aeb4967d Mon Sep 17 00:00:00 2001 From: David Thompson Date: Thu, 5 Dec 2024 11:32:04 -0500 Subject: [PATCH] Use progress monitor when finding types in project This allows for nested types to be resolved. Without a progress monitor, JDT doesn't resolve nested types. Signed-off-by: David Thompson --- .../src/main/java/com/redhat/qute/jdt/utils/JDTTypeUtils.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qute.jdt/com.redhat.qute.jdt/src/main/java/com/redhat/qute/jdt/utils/JDTTypeUtils.java b/qute.jdt/com.redhat.qute.jdt/src/main/java/com/redhat/qute/jdt/utils/JDTTypeUtils.java index 5d75af452..06ffc77d0 100644 --- a/qute.jdt/com.redhat.qute.jdt/src/main/java/com/redhat/qute/jdt/utils/JDTTypeUtils.java +++ b/qute.jdt/com.redhat.qute.jdt/src/main/java/com/redhat/qute/jdt/utils/JDTTypeUtils.java @@ -17,6 +17,7 @@ import java.util.logging.Logger; import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.jdt.core.IField; import org.eclipse.jdt.core.IJavaProject; import org.eclipse.jdt.core.IMember; @@ -48,7 +49,7 @@ public static String getSimpleClassName(String className) { public static IType findType(IJavaProject project, String className) { try { - return project.findType(className); + return project.findType(className, new NullProgressMonitor()); } catch (JavaModelException e) { LOGGER.log(Level.SEVERE, "Error while finding type for '" + className + "'.", e); return null;