@Override public void invoke(@NotNull Project project, Editor editor, PsiFile file) throws IncorrectOperationException { assert element.getTypeArguments().isEmpty(); String typeString = TypeUtils.getTypeNameAndStarProjectionsString(element.getText(), argumentCount); JetTypeElement replacement = JetPsiFactory.createType(project, typeString).getTypeElement(); assert replacement != null : "No type element after parsing " + typeString; element.replace(replacement); }
@NotNull @Override public String getText() { return JetBundle.message( "add.star.projections", TypeUtils.getTypeNameAndStarProjectionsString("", argumentCount)); }