Package org.eclipse.core.resources

Examples of org.eclipse.core.resources.ICommand


      }
    }

    ICommand[] newCommands = new ICommand[commands.length + 1];
    System.arraycopy(commands, 0, newCommands, 0, commands.length);
    ICommand command = desc.newCommand();
    command.setBuilderName(DynamicPluginBuilder.BUILDER_ID);
    newCommands[newCommands.length - 1] = command;
    desc.setBuildSpec(newCommands);
    project.setDescription(desc, null);
  }
View Full Code Here


      }
    }

    ICommand[] newCommands = new ICommand[commands.length + 1];
    System.arraycopy(commands, 0, newCommands, 0, commands.length);
    ICommand command = desc.newCommand();
    command.setBuilderName(DynamicWebBuilder.BUILDER_ID);
    newCommands[newCommands.length - 1] = command;
    desc.setBuildSpec(newCommands);
    project.setDescription(desc, null);
  }
View Full Code Here

    }
   
    ICommand[] newCommands = new ICommand[commands.length + 1];
    System.arraycopy(commands, 0, newCommands, 0, commands.length);
   
    ICommand newBuilder = description.newCommand();
    newBuilder.setBuilderName(Activator.OPENEJB_BUILDER);
    newCommands[commands.length] = newBuilder;
    description.setBuildSpec(newCommands);
    project.setDescription(description, null);
  }
View Full Code Here

      }
    }

    ICommand[] newCommands = new ICommand[commands.length + 1];
    System.arraycopy(commands, 0, newCommands, 0, commands.length);
    ICommand command = desc.newCommand();
    command.setBuilderName(BndBuilder.BUILDER_ID);
    newCommands[newCommands.length - 1] = command;
    desc.setBuildSpec(newCommands);
    project.setDescription(desc, null);
  }
View Full Code Here

        break;
      }
    }
    if (!found) {
      // add builder to project
      ICommand command = desc.newCommand();
      command.setBuilderName(BuilderUtilities.BUILDER_ID);
      ICommand[] newCommands = new ICommand[commands.length + 1];
      // Add it before other builders.
      System.arraycopy(commands, 0, newCommands, 1, commands.length);
      newCommands[0] = command;
      desc.setBuildSpec(newCommands);
View Full Code Here

      IProject p = (IProject) projects.next();
      Map buildermap = (Map) changes.get(p);
      Iterator builders = buildermap.keySet().iterator();
      while (builders.hasNext())
      {
        ICommand command = (ICommand) builders.next();
        ILaunchConfiguration config = BuilderUtils.configFromBuildCommandArgs(p, command.getArguments(), new String[1]);

        SysOutProgressMonitor.out.println("REVERTING EXTERNAL TOOL BUILDER '" + config.getName() + "' ON PROJECT: " + p.getName());
       
        Map attrs = (Map) buildermap.get(command);
        ILaunchConfigurationWorkingCopy configwc = config.getWorkingCopy();
View Full Code Here

      }
    }

    ICommand[] newCommands = new ICommand[commands.length + 1];
    System.arraycopy(commands, 0, newCommands, 0, commands.length);
    ICommand command = desc.newCommand();
    command.setBuilderName(JavaOntModelBuilder.BUILDER_ID);
    newCommands[newCommands.length - 1] = command;
    desc.setBuildSpec(newCommands);
    project.setDescription(desc, null);
  }
View Full Code Here

    ICommand[] oldBuilders = description.getBuildSpec();
    //
    ICommand[] newBuilders = new ICommand[oldBuilders.length - 1];
    int newIndex = 0;
    for (int oldIndex = 0; oldIndex < oldBuilders.length; oldIndex++) {
      ICommand command = oldBuilders[oldIndex];
      if (!command.getBuilderName().equals(Constants.BUILDER_ID)) {
        newBuilders[newIndex++] = command;
      }
    }
    //
    description.setBuildSpec(newBuilders);
View Full Code Here

     * Update the FindBugs command in the build spec (replace existing one if
     * present, add one first if none).
     */
    private void setFindBugsCommand(IProjectDescription description, ICommand newCommand) throws CoreException {
        ICommand[] oldCommands = description.getBuildSpec();
        ICommand oldFindBugsCommand = getFindBugsCommand(description);
        ICommand[] newCommands;
        if (oldFindBugsCommand == null) {
            // Add the FindBugs build spec AFTER all other builders
            newCommands = new ICommand[oldCommands.length + 1];
            System.arraycopy(oldCommands, 0, newCommands, 0, oldCommands.length);
View Full Code Here

      if(cmd.getBuilderName().equals(BUILDER_ID)) {
        return;
      }
    }
   
    ICommand newCmd = description.newCommand();
    newCmd.setBuilderName(BUILDER_ID);
    List<ICommand> newCmds = new LinkedList<ICommand>();
   
    newCmds.addAll(Arrays.asList(cmds));
    newCmds.add(newCmd);
    description.setBuildSpec(newCmds.toArray(new ICommand[newCmds.size()]));
View Full Code Here

TOP

Related Classes of org.eclipse.core.resources.ICommand

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.