Exemplo n.º 1
0
 public void setTools(ToolsGroup[] tools) {
   mySchemesManager.clearAllSchemes();
   for (ToolsGroup newGroup : tools) {
     mySchemesManager.addNewScheme(newGroup, true);
   }
   registerActions();
 }
Exemplo n.º 2
0
 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()]);
 }
Exemplo n.º 3
0
 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()]);
 }
Exemplo n.º 4
0
  public ToolManager(ActionManagerEx actionManagerEx, SchemesManagerFactory factory) {
    myActionManager = actionManagerEx;

    mySchemesManager =
        factory.createSchemesManager(
            "$ROOT_CONFIG$/tools", new ToolsProcessor(), RoamingType.PER_USER);

    mySchemesManager.loadSchemes();
    registerActions();
  }
Exemplo n.º 5
0
 @NotNull
 public File[] getExportFiles() {
   return new File[] {mySchemesManager.getRootDirectory()};
 }
Exemplo n.º 6
0
 public ToolsGroup[] getGroups() {
   Collection<ToolsGroup> groups = mySchemesManager.getAllSchemes();
   return groups.toArray(new ToolsGroup[groups.size()]);
 }