Package org.eclipse.core.resources

Examples of org.eclipse.core.resources.ICommand


              for (int i = 0; i < commands.length; ++i) {
                 if (commands[i].getBuilderName().equals(fId))
                    return;
              }
              //add builder to project
              ICommand command = desc.newCommand();
              command.setBuilderName(fId);
              ICommand[] nc = new ICommand[commands.length + 1];
              // Add it after all other builders.
              System.arraycopy(commands, 0, nc, 0, commands.length);
              nc[commands.length] = command;
              desc.setBuildSpec(nc);
View Full Code Here


        IProjectDescription description = project.getProject().getDescription();
        ICommand[] commands = description.getBuildSpec();
        ICommand[] newCommands = new ICommand[commands.length + 2];
        System.arraycopy(commands, 0, newCommands, 0, commands.length);

        ICommand javaCommand = description.newCommand();
        javaCommand.setBuilderName("org.eclipse.jdt.core.javabuilder");
        newCommands[commands.length] = javaCommand;
       
        ICommand droolsCommand = description.newCommand();
        droolsCommand.setBuilderName(DroolsBuilder.BUILDER_ID);
        newCommands[commands.length + 1] = droolsCommand;
       
        description.setBuildSpec(newCommands);
        project.getProject().setDescription(description, null);
    }
View Full Code Here

    int javaCommandIndex = getJavaCommandIndex(description.getBuildSpec());

    if (javaCommandIndex == -1) {

      // Add a Java command to the build spec
      ICommand command = description.newCommand();
      command.setBuilderName(builderID);
      setJavaCommand(description, command);
    }
  }
View Full Code Here

        }

        ICommand[] nu = new ICommand[commands.length + 1];
        System.arraycopy(commands, 0, nu, 0, commands.length);

        ICommand command = desc.newCommand();
        command.setBuilderName(BndtoolsConstants.BUILDER_ID);
        nu[commands.length] = command;
        desc.setBuildSpec(nu);
    }
View Full Code Here

    }
    if (!found) {
      // TODO remove debug output
      System.out.println("Builder added: " + PLUGIN_ID+ ".perlbuilder");
      //add builder to project
      ICommand command = desc.newCommand();
      command.setBuilderName(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;
View Full Code Here

        String[] newNatures = new String[natures.length + 1];
        System.arraycopy(natures, 0, newNatures, 0, natures.length);
        newNatures[natures.length] = SigilCore.NATURE_ID;
        description.setNatureIds(newNatures);

        ICommand sigilBuild = description.newCommand();
        sigilBuild.setBuilderName(SigilCore.BUILDER_ID);

        ICommand javaBuild = description.newCommand();
        javaBuild.setBuilderName(JavaCore.BUILDER_ID);

        description.setBuildSpec(new ICommand[] { javaBuild, sigilBuild });

        project.setDescription(description, new SubProgressMonitor(monitor, 2));
View Full Code Here

      }
    }

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

        logger.trace("Installing validation builder");

        ICommand[] newBuilders = new ICommand[builders.length + 1];
        System.arraycopy(builders, 0, newBuilders, 0, builders.length);
        ICommand validationCommand = description.newCommand();
        validationCommand.setBuilderName(VALIDATION_BUILDER_NAME);
        newBuilders[newBuilders.length - 1] = validationCommand;

        description.setBuildSpec(newBuilders);

        project.setDescription(description, monitor);
View Full Code Here

        IProjectDescription description = project.getProject().getDescription();
        ICommand[] commands = description.getBuildSpec();
        ICommand[] newCommands = new ICommand[commands.length + 2];
        System.arraycopy(commands, 0, newCommands, 0, commands.length);

        ICommand javaCommand = description.newCommand();
        javaCommand.setBuilderName("org.eclipse.jdt.core.javabuilder");
        newCommands[commands.length] = javaCommand;
       
        ICommand mavenCommand = description.newCommand();
        mavenCommand.setBuilderName("org.eclipse.m2e.core.maven2Builder");
        newCommands[commands.length + 1] = mavenCommand;
       
        description.setBuildSpec(newCommands);
        project.getProject().setDescription(description, monitor);
    }
View Full Code Here

    int _length = old.length;
    int _plus = (_length + 1);
    final ICommand[] specs = new ICommand[_plus];
    int _length_1 = old.length;
    System.arraycopy(old, 0, specs, 0, _length_1);
    final ICommand command = description.newCommand();
    String _id = builder.getId();
    command.setBuilderName(_id);
    int _length_2 = old.length;
    specs[_length_2] = command;
    description.setBuildSpec(specs);
    NullProgressMonitor _nullProgressMonitor = new NullProgressMonitor();
    prj.setDescription(description, _nullProgressMonitor);
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.