Package org.eclipse.core.resources

Examples of org.eclipse.core.resources.ICommand


        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


        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

    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

    /**
     * Adds a builder to the build spec for the given project.
     */
    protected void addToBuildSpec(String builderID) throws CoreException {
        IProjectDescription description = getProject().getDescription();
        ICommand findBugsCommand = getFindBugsCommand(description);
        if (findBugsCommand == null) {
            // Add a Java command to the build spec
            ICommand newCommand = description.newCommand();
            newCommand.setBuilderName(builderID);
            setFindBugsCommand(description, newCommand);
        }
    }
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("org.drools.eclipse.droolsbuilder");
        newCommands[commands.length + 1] = droolsCommand;
       
        description.setBuildSpec(newCommands);
        project.getProject().setDescription(description, monitor);
    }
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(SampleBuilder.BUILDER_ID);
    newCommands[newCommands.length - 1] = command;
    desc.setBuildSpec(newCommands);
    project.setDescription(desc, null);
  }
View Full Code Here

            if (commands[i].getBuilderName().equals(BUILDER_ID)) {
                found = true;
            }
        }
        if (!found) {
            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

        javaProject.setOutputLocation(binFolder.getFullPath(), null);
    }

    private void addJavaBuilder(IJavaProject javaProject) throws CoreException {
        IProjectDescription desc = javaProject.getProject().getDescription();
        ICommand command = desc.newCommand();
        command.setBuilderName(JavaCore.BUILDER_ID);
        desc.setBuildSpec(new ICommand[] { command });
        javaProject.getProject().setDescription(desc, null);
    }
View Full Code Here

    for(int i=0;i<commands.length;i++){
      if(commands[i].getBuilderName().equals(HTML_BUILDER_ID)){
        return;
      }
    }
    ICommand command = desc.newCommand();
    command.setBuilderName(HTML_BUILDER_ID);
    ICommand[] newCommands = new ICommand[commands.length + 1];
    for(int i=0;i<commands.length;i++){
      newCommands[i] = commands[i];
    }
    newCommands[newCommands.length - 1] = 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(FscriptBuilder.BUILDER_ID);
    newCommands[newCommands.length - 1] = command;
    desc.setBuildSpec(newCommands);
    project.setDescription(desc, null);
    if (project.getPersistentProperty(forteRootQualifiedName) == null){
      project.setPersistentProperty(forteRootQualifiedName, System.getenv("FORTE_ROOT"));
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.