void (@NotNull ActionContext context, @NotNull PsiLiteralExpression delimiterArgument, @NotNull ModPsiUpdater updater) { final Set<Character> uniqueChars = new LinkedHashSet<>(); if(!(delimiterArgument.getValue() instanceof String value)) return; for (char c : value.toCharArray()) { uniqueChars.add(c); } final String newDelimiters = StringUtil.join(uniqueChars, ""); final PsiElementFactory elementFactory = JavaPsiFacade.getElementFactory(context.project()); delimiterArgument.replace(elementFactory.createExpressionFromText('"' + StringUtil.escapeStringCharacters(newDelimiters) + '"', null)); }