public void register(ChainContext context) {
    LOG.assertTrue(myName == null);
    String[] fromType = JavaCodeStyleManager.getInstance(context.getProject())
      .suggestVariableName(VariableKind.LOCAL_VARIABLE, null, null, myType, true).names;
    List<String> variants = StreamEx.of(myBestCandidates).append(myOtherCandidates).append(fromType).distinct().toList();
    if (variants.isEmpty()) variants = List.of("val");
    myName = context.registerVarName(variants);
    myBestCandidates = myOtherCandidates = null;
  }
public void register(ChainContext context)