@Override
  public void apply(@NotNull Editor editor, @NotNull GroovySmartEnterProcessor processor, @NotNull PsiElement psiElement) {
    if (psiElement instanceof GrLiteral) {
      String text = psiElement.getText();
      if (StringUtil.startsWith(text, "'''")) {
        if (!StringUtil.endsWith(text, "'''")) {
          editor.getDocument().insertString(psiElement.getTextRange().getEndOffset(), "'''");
        }
      }
      else if (StringUtil.startsWith(text, "'")) {
        if (!StringUtil.endsWith(text, "'")) {
          editor.getDocument().insertString(psiElement.getTextRange().getEndOffset(), "'");
        }
      }
      else if (StringUtil.startsWith(text, "\"\"\"")) {
        if (!StringUtil.endsWith(text, "\"\"\"")) {
          editor.getDocument().insertString(psiElement.getTextRange().getEndOffset(), "\"\"\"");
        }
      }
      else if (StringUtil.startsWith(text, "\"")) {
        if (!StringUtil.endsWith(text, "\"")) {
          editor.getDocument().insertString(psiElement.getTextRange().getEndOffset(), "\"");
        }
      }
    }
  }
@Override
  public void apply(@NotNull Editor editor, @NotNull GroovySmartEnterProcessor processor, @NotNull PsiElement psiElement)