Skip to content
This repository has been archived by the owner on Oct 26, 2023. It is now read-only.

Extend set of supported entities for GoToThriftDefinitionMarkerProvider #94

Merged
merged 1 commit into from
Aug 31, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,18 @@ public class GoToThriftDefinitionMarkerProvider extends RelatedItemLineMarkerPro

private static Set<String> 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
Expand Down