@NotNull
  @Override
  public DefaultActionGroup createPopupActionGroup(@NotNull JComponent component, @NotNull DataContext context) {
    final DefaultActionGroup group = new DefaultActionGroup();

    final List<NamedScope> predefinedScopes = new ArrayList<>();
    final List<NamedScope> customScopes = new ArrayList<>();
    for (final NamedScopesHolder holder : NamedScopesHolder.getAllNamedScopeHolders(myProject)) {
      Collections.addAll(customScopes, holder.getEditableScopes());
      predefinedScopes.addAll(holder.getPredefinedScopes());
    }
    predefinedScopes.remove(CustomScopesProviderEx.getAllScope());
    for (NamedScope predefinedScope : predefinedScopes) {
      if (predefinedScope instanceof NonProjectFilesScope) {
        predefinedScopes.remove(predefinedScope);
        break;
      }
    }

    fillActionGroup(group, predefinedScopes, myDefaultDescriptors, myInspectionProfile, myExcludedScopeNames);
    group.addSeparator();
    fillActionGroup(group, customScopes, myDefaultDescriptors, myInspectionProfile, myExcludedScopeNames);

    group.addSeparator();
    group.add(new DumbAwareAction(IdeBundle.messagePointer("action.Anonymous.text.edit.scopes.order")) {
      @Override
      public void actionPerformed(@NotNull final AnActionEvent e) {
        final ScopesOrderDialog dlg = new ScopesOrderDialog(component, myInspectionProfile, myProject);
        if (dlg.showAndGet()) {
          onScopesOrderChanged();
        }
      }
    });

    return group;
  }
@NotNull
  @Override
  public DefaultActionGroup createPopupActionGroup(@NotNull JComponent component, @NotNull DataContext context)