Examples of ICommand


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 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

Examples of org.eclipse.core.resources.ICommand

    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

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

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

Examples of org.eclipse.core.resources.ICommand

    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

Examples of org.eclipse.core.resources.ICommand

    /**
     * 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

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("org.drools.eclipse.droolsbuilder");
        newCommands[commands.length + 1] = droolsCommand;
       
        description.setBuildSpec(newCommands);
        project.getProject().setDescription(description, monitor);
    }
View Full Code Here

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(SampleBuilder.BUILDER_ID);
    newCommands[newCommands.length - 1] = command;
    desc.setBuildSpec(newCommands);
    project.setDescription(desc, null);
  }
View Full Code Here

Examples of org.eclipse.core.resources.ICommand

            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

Examples of org.eclipse.core.resources.ICommand

        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
TOP
Copyright © 2018 www.massapi.com. 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.