void (@NotNull Project project, @NotNull PsiElement token, @NotNull ModPsiUpdater updater) { PsiBinaryExpression expression = ObjectUtils.tryCast(token.getParent(), PsiBinaryExpression.class); if (expression == null) return; String text = expression.getText(); TextRange range = token.getTextRangeInParent(); String result = text.substring(0, range.getStartOffset()) + "==" + text.substring(range.getEndOffset()); expression.replace(JavaPsiFacade.getElementFactory(project).createExpressionFromText(result, null)); }