Ejemplo n.º 1
0
  @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);
  }
Ejemplo n.º 2
0
 @NotNull
 @Override
 public String getText() {
   return JetBundle.message(
       "add.star.projections", TypeUtils.getTypeNameAndStarProjectionsString("", argumentCount));
 }