@Override
    public AnAction @NotNull [] getChildren(@Nullable AnActionEvent e) {
        if (!isEnabled(e)) return AnAction.EMPTY_ARRAY;

        final Project project = getEventProject(e);
        if (project == null) return AnAction.EMPTY_ARRAY;
        final PsiFile psiFile = getPsiFile(e);
        if (psiFile == null) return AnAction.EMPTY_ARRAY;

        final FileAssociationsManager fileAssociationsManager = FileAssociationsManager.getInstance(project);
        final PsiFile[] associationsFor = fileAssociationsManager.getAssociationsFor(psiFile, FileAssociationsManager.Holder.XML_FILES);
        final AnAction[] children;
        if (associationsFor.length == 0) {
            children = new AnAction[2];
        } else {
            children = new AnAction[associationsFor.length + 3];
            for (int i = 0; i < associationsFor.length; i++) {
                PsiFile assoc = associationsFor[i];
                children[i] = new ToggleAssociationAction(fileAssociationsManager, psiFile, assoc);
            }
            children[children.length - 3] = Separator.getInstance();
        }
        children[children.length - 2] = new AddAssociationAction(fileAssociationsManager);
        children[children.length - 1] = new ConfigureAssociationsAction();
        return children;
    }
@Override
    public AnAction @NotNull [] getChildren(@Nullable AnActionEvent e)