package jetbrains.mps.java.workbench.actions;

/*Generated by MPS */

import jetbrains.mps.plugins.applicationplugins.BaseApplicationPlugin;
import com.intellij.openapi.extensions.PluginId;
import org.jetbrains.annotations.NotNull;
import jetbrains.mps.ide.actions.SolutionActions_ActionGroup;
import jetbrains.mps.ide.actions.ToolsInternal_ActionGroup;
import jetbrains.mps.ide.actions.AnalyzeModule_ActionGroup;
import jetbrains.mps.ide.actions.DevkitActions_ActionGroup;
import jetbrains.mps.ide.actions.GeneratorNewActions_ActionGroup;
import jetbrains.mps.ide.actions.LanguageNewActions_ActionGroup;
import jetbrains.mps.ide.actions.SolutionNewActions_ActionGroup;
import java.util.List;
import jetbrains.mps.plugins.actions.BaseKeymapChanges;
import jetbrains.mps.internal.collections.runtime.ListSequence;
import java.util.ArrayList;

public class Workbench_ApplicationPlugin extends BaseApplicationPlugin {
  private final PluginId myId = PluginId.getId("jetbrains.mps.java.workbench");

  public Workbench_ApplicationPlugin() {
  }

  @NotNull
  public PluginId getId() {
    return myId;
  }

  public void createGroups() {
    // actions w/o parameters
    addAction(new AnalyzeClasspath_Action());
    addAction(new CalcClassifiersInRootsStatistic_Action());
    addAction(new ChangeMethodSignature_Action());
    addAction(new MigrateSourcesToMPS_Action());
    addAction(new NewModelFromSource_Action());
    // groups
    addGroup(new AddToToolsInternal_ActionGroup(this));
    addGroup(new AnalyzeJavaActions_ActionGroup(this));
    addGroup(new ModelNewActions_ActionGroup(this));
    addGroup(new RefactoringAdditions_ActionGroup(this));
    addGroup(new SolutionActionsEx_ActionGroup(this));
    addGroup(new TouchBarDefault_shift_ActionGroup(this));
  }
  public void adjustRegularGroups() {
    insertGroupIntoAnother(SolutionActionsEx_ActionGroup.ID, SolutionActions_ActionGroup.ID, SolutionActions_ActionGroup.LABEL_ID_contents);
    insertGroupIntoAnother(AddToToolsInternal_ActionGroup.ID, ToolsInternal_ActionGroup.ID, null);
    insertGroupIntoAnother(TouchBarDefault_shift_ActionGroup.ID, jetbrains.mps.ide.actions.TouchBarDefault_shift_ActionGroup.ID, jetbrains.mps.ide.actions.TouchBarDefault_shift_ActionGroup.LABEL_ID_refactoring);
    insertGroupIntoAnother(AnalyzeJavaActions_ActionGroup.ID, AnalyzeModule_ActionGroup.ID, AnalyzeModule_ActionGroup.LABEL_ID_analyze);
    insertGroupIntoAnother(AnalyzeJavaActions_ActionGroup.ID, DevkitActions_ActionGroup.ID, DevkitActions_ActionGroup.LABEL_ID_analyze);
    insertGroupIntoAnother(RefactoringAdditions_ActionGroup.ID, "jetbrains.mps.ide.platform.actions.NodeRefactoring_ActionGroup", null);
    insertGroupIntoAnother(ModelNewActions_ActionGroup.ID, GeneratorNewActions_ActionGroup.ID, GeneratorNewActions_ActionGroup.LABEL_ID_newModel);
    insertGroupIntoAnother(ModelNewActions_ActionGroup.ID, LanguageNewActions_ActionGroup.ID, LanguageNewActions_ActionGroup.LABEL_ID_newModel);
    insertGroupIntoAnother(ModelNewActions_ActionGroup.ID, SolutionNewActions_ActionGroup.ID, SolutionNewActions_ActionGroup.LABEL_ID_newModel);
  }
  public List<BaseKeymapChanges> initKeymaps() {
    List<BaseKeymapChanges> res = ListSequence.fromList(new ArrayList<BaseKeymapChanges>());
    ListSequence.fromList(res).addElement(new Default_KeymapChanges());
    return res;
  }
}
