use of com.goide.psi.GoSignature in project go-lang-idea-plugin by go-lang-plugin-org.
the class GoEmptySignatureQuickFix method invoke.
@Override
public void invoke(@NotNull Project project, @NotNull PsiFile file, @Nullable("is null when called from inspection") Editor editor, @NotNull PsiElement startElement, @NotNull PsiElement endElement) {
GoFunctionDeclaration function = ObjectUtils.tryCast(startElement, GoFunctionDeclaration.class);
GoSignature signature = function != null ? function.getSignature() : null;
if (signature == null)
return;
signature.replace(GoElementFactory.createFunctionSignatureFromText(project, ""));
}
Aggregations