use of com.intellij.ide.ui.customization.CustomActionsSchema in project intellij-community by JetBrains.
the class PyCharmEduInitialConfigurator method patchMainMenu.
private static void patchMainMenu() {
final CustomActionsSchema schema = new CustomActionsSchema();
final JTree actionsTree = new Tree();
Group rootGroup = new Group("root", null, null);
final DefaultMutableTreeNode root = new DefaultMutableTreeNode(rootGroup);
DefaultTreeModel model = new DefaultTreeModel(root);
actionsTree.setModel(model);
schema.fillActionGroups(root);
for (int i = 0; i < root.getChildCount(); i++) {
final DefaultMutableTreeNode treeNode = (DefaultMutableTreeNode) root.getChildAt(i);
if ("Main menu".equals(getItemId(treeNode))) {
hideActionFromMainMenu(root, schema, treeNode);
}
hideActions(schema, root, treeNode, HIDDEN_ACTIONS);
}
CustomActionsSchema.getInstance().copyFrom(schema);
}
Aggregations