private static String[] getNames (final ExpressionContext context) {
    Project project = context.getProject();
    DumbService dumbService = DumbService.getInstance(project);
    String[] names = dumbService.computeWithAlternativeResolveEnabled(() -> ExpressionUtil.getNames(context));
    if (names == null || names.length == 0) return names;
    PsiFile file = PsiDocumentManager.getInstance(project).getPsiFile(context.getEditor().getDocument());
    PsiElement e = file.findElementAt(context.getStartOffset());
    PsiVariable[] vars = dumbService.computeWithAlternativeResolveEnabled(() -> MacroUtil.getVariablesVisibleAt(e, ""));
    LinkedList<String> namesList = new LinkedList<>(Arrays.asList(names));
    for (PsiVariable var : vars) {
      if (e.equals(var.getNameIdentifier())) continue;
      namesList.remove(var.getName());
    }

    if (namesList.isEmpty()) {
      String name = names[0];
      index:
      for (int j = 1; ; j++) {
        String name1 = name + j;
        for (PsiVariable var : vars) {
          if (name1.equals(var.getName()) && !var.getNameIdentifier().equals(e)) continue index;
        }
        return new String[]{name1};
      }
    }

    return ArrayUtilRt.toStringArray(namesList);
  }
private static String[] getNames (final ExpressionContext context)