public void setTools(ToolsGroup[] tools) { mySchemesManager.clearAllSchemes(); for (ToolsGroup newGroup : tools) { mySchemesManager.addNewScheme(newGroup, true); } registerActions(); }
public Tool[] getTools() { ArrayList<Tool> result = new ArrayList<Tool>(); for (ToolsGroup group : mySchemesManager.getAllSchemes()) { result.addAll(group.getElements()); } return result.toArray(new Tool[result.size()]); }
public Tool[] getTools(String group) { ArrayList<Tool> list = new ArrayList<Tool>(); ToolsGroup groupByName = mySchemesManager.findSchemeByName(group); if (groupByName != null) { list.addAll(groupByName.getElements()); } return list.toArray(new Tool[list.size()]); }
public ToolManager(ActionManagerEx actionManagerEx, SchemesManagerFactory factory) { myActionManager = actionManagerEx; mySchemesManager = factory.createSchemesManager( "$ROOT_CONFIG$/tools", new ToolsProcessor(), RoamingType.PER_USER); mySchemesManager.loadSchemes(); registerActions(); }
@NotNull public File[] getExportFiles() { return new File[] {mySchemesManager.getRootDirectory()}; }
public ToolsGroup[] getGroups() { Collection<ToolsGroup> groups = mySchemesManager.getAllSchemes(); return groups.toArray(new ToolsGroup[groups.size()]); }