Package org.eclipse.core.resources

Examples of org.eclipse.core.resources.ICommand


        final IProjectDescription description = this.project.getDescription();
        final int commandIndex = getKarafProjectBuilderCommandIndex(description.getBuildSpec());

        if (commandIndex == -1) {

            final ICommand command = description.newCommand();
            command.setBuilderName(builderID);
            setKarafProjectBuilderCommand(description, command);
        }
    }
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(RiderProjectBuilder.BUILDER_ID);
    newCommands[newCommands.length - 1] = command;
    desc.setBuildSpec(newCommands);
    project.setDescription(desc, null);
  }
View Full Code Here

                ICommand[] commands = desc.getBuildSpec();

                //now, add the builder if it still hasn't been added.
                if (hasBuilder(commands) == false && PyDevBuilderPrefPage.usePydevBuilders()) {

                    ICommand command = desc.newCommand();
                    command.setBuilderName(BUILDER_ID);
                    ICommand[] newCommands = new ICommand[commands.length + 1];

                    System.arraycopy(commands, 0, newCommands, 1, commands.length);
                    newCommands[0] = command;
                    desc.setBuildSpec(newCommands);
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

    public void configure() throws CoreException {
        if (!hasBuilder()) {
            IProjectDescription description = project.getDescription();
            ICommand[] buildCommands = description.getBuildSpec();
            buildCommands = Arrays.copyOf(buildCommands, buildCommands.length + 1);
            ICommand teaVMCommand = description.newCommand();
            teaVMCommand.setBuilderName(TeaVMEclipsePlugin.BUILDER_ID);
            buildCommands[buildCommands.length - 1] = teaVMCommand;
            description.setBuildSpec(buildCommands);
            project.setDescription(description, new NullProgressMonitor());
        }
    }
View Full Code Here

        if (hasBuilder()) {
            IProjectDescription description = project.getDescription();
            ICommand[] buildCommands = description.getBuildSpec();
            int index = -1;
            for (int i = 0; i < buildCommands.length; ++i) {
                ICommand command = buildCommands[i];
                if (command.getBuilderName().equals(TeaVMEclipsePlugin.BUILDER_ID)) {
                    index = i;
                    break;
                }
            }
            ICommand[] newBuildCommands = new ICommand[buildCommands.length - 1];
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, monitor);
    }
View Full Code Here

                return;
            }
        }

        // associate builder with project.
        ICommand newCmd = description.newCommand();
        newCmd.setBuilderName(builderId);
        List<ICommand> newCmds = new ArrayList<ICommand>();
        newCmds.addAll(Arrays.asList(cmds));
        newCmds.add(newCmd);
        description.setBuildSpec(newCmds.toArray(new ICommand[newCmds.size()]));
View Full Code Here

    list.toArray( newCommands );
    description.setBuildSpec( newCommands );
  }

  private static ICommand createBuildCommand( IProjectDescription description, String builderId ) {
    ICommand command = description.newCommand();
    command.setBuilderName( builderId );
    return command;
  }
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(ClickProjectBuilder.BUILDER_ID);
    newCommands[newCommands.length - 1] = command;
    desc.setBuildSpec(newCommands);
    project.setDescription(desc, null);
  }
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.