use of com.goide.psi.GoFieldDeclaration in project go-lang-idea-plugin by go-lang-plugin-org.
the class GoFieldNameMacro method fieldNames.
private static Set<String> fieldNames(ExpressionContext context) {
PsiElement psiElement = context != null ? context.getPsiElementAtStartOffset() : null;
GoFieldDeclaration fieldDeclaration = PsiTreeUtil.getNonStrictParentOfType(psiElement, GoFieldDeclaration.class);
if (fieldDeclaration == null) {
return Collections.emptySet();
}
return ContainerUtil.map2LinkedSet(fieldDeclaration.getFieldDefinitionList(), PsiNamedElement::getName);
}
Aggregations