Examples of TaskContainer


Examples of hu.u_szeged.nbo.res_alloc.model.container.TaskContainer

  }
 
  private void loadTasks(String filename)
  throws FileNotFoundException, IOException {
    try {
      TaskContainer tasks = new TaskContainer(model);
      StringTokenizer tokenizer = this.openFile(filename);
     
      //ignore header fields
      tokenizer.nextToken();
      tokenizer.nextToken();
      tokenizer.nextToken();
      tokenizer.nextToken();
      tokenizer.nextToken();
      tokenizer.nextToken();
      tokenizer.nextToken();
      tokenizer.nextToken();
     
      while (tokenizer.hasMoreTokens()) {
        Task task = new Task();
        int id = Integer.parseInt(tokenizer.nextToken());
        task.setId(id);
        int place_id = Integer.parseInt(tokenizer.nextToken());
        task.setPlace(model.getPlaceContainer().getPlaceById(place_id));
        int normtime = Integer.parseInt(tokenizer.nextToken());
        task.setNormTime(normtime);
        int tp1 = Integer.parseInt(tokenizer.nextToken());
        int tp2 = Integer.parseInt(tokenizer.nextToken());
        task.setPrefferedTimeInterval(new TimeInterval(tp1, tp2));
        int ck1 = Integer.parseInt(tokenizer.nextToken());
        task.setDCost1(ck1);
        int ck2 = Integer.parseInt(tokenizer.nextToken());
        task.setDCost2(ck2);
        int ck3 = Integer.parseInt(tokenizer.nextToken());
        task.setDCost3(ck3);
       
        tasks.putTask(id, task);
      }
     
      model.setTaskContainer(tasks);
    }
    catch (FileNotFoundException e) {
View Full Code Here

Examples of org.apache.tools.ant.TaskContainer

        }
    }

    private void executeSequential(Vector tasks)
    {
        TaskContainer tc = (TaskContainer) getProject().createTask("sequential");
        Enumeration e = tasks.elements();
        Task t = null;
        while (e.hasMoreElements())
        {
            t = (Task)e.nextElement();
            tc.addTask(t);
        }

        ((Task)tc).execute();
    }
View Full Code Here

Examples of org.gradle.api.tasks.TaskContainer

     * @param taskArray the tasks to attach to the parent. these must be mock objects. Pass in null or an empty array to
     * set no tasks.
    */
    public static void attachTasks(JUnit4Mockery context, final Project parentProject, Task... taskArray) {
        //first, make our project return our task container
        final TaskContainer taskContainer = context.mock(TaskContainer.class, "[taskcontainer]_" + parentProject.getName() + '_' + uniqueNameCounter++);

        context.checking(new Expectations() {{
            allowing(parentProject).getTasks();
            will(returnValue(taskContainer));
        }});
View Full Code Here

Examples of org.gradle.api.tasks.TaskContainer

    }
   
    private void expectTaskLookupInOtherProject(final String projectPath, final String taskName, final Task task) {
        context.checking(new Expectations() {{
            Project otherProject = context.mock(Project.class);
            TaskContainer otherTaskContainer = context.mock(TaskContainer.class);

            allowing(project).findProject(projectPath);
            will(returnValue(otherProject));

            allowing(otherProject).getTasks();
View Full Code Here

Examples of org.gradle.api.tasks.TaskContainer

        final ProjectDependency projectDependencyStub = context.mock(ProjectDependency.class);
        superConfig.addDependency(projectDependencyStub);

        final Project projectStub = context.mock(Project.class);
        final TaskContainer taskContainerStub = context.mock(TaskContainer.class);
        final Task taskStub = context.mock(Task.class);
        final String taskName = "testit";

        context.checking(new Expectations() {{
            allowing(projectDependencyStub).getDependencyProject(); will(returnValue(projectStub));
View Full Code Here

Examples of org.gradle.api.tasks.TaskContainer

        }
    }

    protected void setDefaultIvyDescriptor() {
        Project project = getProject();
        TaskContainer tasks = project.getTasks();
        Configuration archiveConfig = project.getConfigurations().findByName(Dependency.ARCHIVES_CONFIGURATION);
        if (archiveConfig == null) {
            log.warn("Cannot publish Ivy descriptor if ivyDescriptor not set in task '{}' " +
                    "and no '{}' configuration exists in project '{}'.", Dependency.ARCHIVES_CONFIGURATION,
                    project.getPath());
        } else {
            // Flag to publish the Ivy XML file, but no ivy descriptor file inputted, activate default upload${configuration}.
            // ATTENTION: Tasks not part of the execution graph have withType(Upload.class) false ?!? Need to check for type our self.
            Task candidateUploadTask = tasks.findByName(archiveConfig.getUploadTaskName());
            if (candidateUploadTask == null) {
                log.warn("Cannot publish Ivy descriptor if ivyDescriptor not set in task '{}' " +
                        "and task '{}' does not exist." +
                        "\nAdding \"apply plugin: 'java'\" or any other plugin extending the 'base' plugin" +
                        "will solve this issue.",
View Full Code Here

Examples of org.gradle.api.tasks.TaskContainer

    protected void setDefaultMavenDescriptor() {
        // Flag to publish the Maven POM, but no pom file inputted, activate default Maven install.
        // if the project doesn't have the maven install task, warn
        Project project = getProject();
        TaskContainer tasks = project.getTasks();
        Upload installTask = tasks.withType(Upload.class).findByName("install");
        if (installTask == null) {
            log.warn("Cannot publish pom for project '{}' since it does not contain the Maven " +
                    "plugin install task and task '{}' does not specify a custom pom path.",
                    new Object[]{project.getPath(), getPath()});
            mavenDescriptor = null;
View Full Code Here

Examples of org.gradle.api.tasks.TaskContainer

     * @param parentProject where to attach the sub projects. This must be a mock object.
     * @param taskArray the tasks to attach to the root. these must be mock objects. Pass in null or an empty array to set no tasks.
     */
    public static void attachTasks(JUnit4Mockery context, final Project parentProject, Task... taskArray) {
        //first, make our project return our task container
        final TaskContainer taskContainer = context.mock(TaskContainer.class, "[taskcontainer]_" + parentProject.getName() + '_' + uniqueNameCounter++);

        context.checking(new Expectations() {{
            allowing(parentProject).getTasks();
            will(returnValue(taskContainer));
        }});
View Full Code Here

Examples of org.gradle.api.tasks.TaskContainer

    }

    public void apply(final Project project) {
        project.apply(Collections.singletonMap("plugin", PublishingPlugin.class));

        final TaskContainer tasks = project.getTasks();
        final Task publishLocalLifecycleTask = tasks.create(PUBLISH_LOCAL_LIFECYCLE_TASK_NAME);
        publishLocalLifecycleTask.setDescription("Publishes all Maven publications produced by this project to the local Maven cache.");
        publishLocalLifecycleTask.setGroup(PublishingPlugin.PUBLISH_TASK_GROUP);

        // Can't move this to rules yet, because it has to happen before user deferred configurable actions
        project.getExtensions().configure(PublishingExtension.class, new Action<PublishingExtension>() {
View Full Code Here

Examples of org.zkoss.ganttz.data.TaskContainer

        public void render(final Treeitem item, Object data) throws Exception {
            Task task = (Task) data;
            item.setOpen(isOpened(task));
            if (task instanceof TaskContainer) {
                final TaskContainer container = (TaskContainer) task;
                IExpandListener expandListener = new IExpandListener() {

                    @Override
                    public void expandStateChanged(boolean isNowExpanded) {
                        item.setOpen(isNowExpanded);
                    }
                };
                expandListeners.put(container, expandListener);
                container.addExpandListener(expandListener);

            }
            LeftTasksTreeRow leftTasksTreeRow = LeftTasksTreeRow.create(
                    disabilityConfiguration, task, new TreeNavigator(
                            tasksTreeModel, task), planner);
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.