Skip to content

Commit

Permalink
Check with qualified name of Template fields in AbstractQuteTemplateL…
Browse files Browse the repository at this point in the history
…inkCollector

Signed-off-by: Jessica He <jhe@redhat.com>
  • Loading branch information
JessicaJHee authored and datho7561 committed Aug 25, 2022
1 parent c76ddfb commit 9b5fe02
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

import static com.redhat.qute.jdt.internal.QuteJavaConstants.CHECKED_TEMPLATE_ANNOTATION;
import static com.redhat.qute.jdt.internal.QuteJavaConstants.OLD_CHECKED_TEMPLATE_ANNOTATION;
import static com.redhat.qute.jdt.internal.QuteJavaConstants.TEMPLATE_CLASS;

import java.util.List;
import java.util.logging.Level;
Expand Down Expand Up @@ -65,8 +66,6 @@ public abstract class AbstractQuteTemplateLinkCollector extends ASTVisitor {

private static final String PREFERRED_SUFFIX = ".html"; // TODO make it configurable

private static final String TEMPLATE_TYPE = "Template";

protected final ITypeRoot typeRoot;
protected final IJDTUtils utils;
protected final IProgressMonitor monitor;
Expand Down Expand Up @@ -256,6 +255,6 @@ private static boolean isTemplateType(Type type) {
if (type == null || !type.isSimpleType()) {
return false;
}
return (TEMPLATE_TYPE.equals(((SimpleType) type).getName().toString()));
return (TEMPLATE_CLASS.equals(((SimpleType) type).resolveBinding().getQualifiedName().toString()));
}
}

0 comments on commit 9b5fe02

Please sign in to comment.