diff --git a/thrift/src/main/java/com/intellij/plugins/thrift/editor/GoToThriftDefinitionMarkerProvider.java b/thrift/src/main/java/com/intellij/plugins/thrift/editor/GoToThriftDefinitionMarkerProvider.java index b23f6863..f36db53f 100644 --- a/thrift/src/main/java/com/intellij/plugins/thrift/editor/GoToThriftDefinitionMarkerProvider.java +++ b/thrift/src/main/java/com/intellij/plugins/thrift/editor/GoToThriftDefinitionMarkerProvider.java @@ -34,12 +34,18 @@ public class GoToThriftDefinitionMarkerProvider extends RelatedItemLineMarkerPro private static Set thriftStructBaseClasses = Sets.newHashSet( + "org.apache.thrift.TBase", "com.twitter.scrooge.ThriftStruct", - "org.apache.thrift.TBase" + "com.twitter.scrooge.ThriftEnum", + "com.twitter.scrooge.ThriftUnion", + "com.twitter.scrooge.ThriftException" ); private boolean isThriftStruct(PsiClass element) { - return Arrays.stream(element.getSupers()).anyMatch(superClass -> thriftStructBaseClasses.contains(superClass.getQualifiedName())); + return Arrays + .stream(element.getSupers()) + .anyMatch(superClass -> thriftStructBaseClasses.contains(superClass.getQualifiedName())) + || element.getAnnotation("javax.annotation.Generated") != null; } @Override