当前位置: 首页>>代码示例>>Java>>正文


Java ITask.getSynchronizationState方法代码示例

本文整理汇总了Java中org.eclipse.mylyn.tasks.core.ITask.getSynchronizationState方法的典型用法代码示例。如果您正苦于以下问题:Java ITask.getSynchronizationState方法的具体用法?Java ITask.getSynchronizationState怎么用?Java ITask.getSynchronizationState使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.mylyn.tasks.core.ITask的用法示例。


在下文中一共展示了ITask.getSynchronizationState方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: markTaskSeen

import org.eclipse.mylyn.tasks.core.ITask; //导入方法依赖的package包/类
void markTaskSeen (final ITask task, boolean seen) {
    ITask.SynchronizationState syncState = task.getSynchronizationState();
    taskDataManager.setTaskRead(task, seen);
    if (!seen && syncState == task.getSynchronizationState()
            && syncState == ITask.SynchronizationState.OUTGOING
            && task instanceof AbstractTask) {
        // mylyn does not set to CONFLICT status
        try {
            taskList.run(new ITaskListRunnable() {
                @Override
                public void execute (IProgressMonitor monitor) throws CoreException {
                    ((AbstractTask) task).setSynchronizationState(ITask.SynchronizationState.CONFLICT);
                }
            });
            taskList.notifyElementChanged(task);
        } catch (CoreException ex) {
            LOG.log(Level.INFO, null, ex);
        }
    }
    task.setAttribute(ATTR_TASK_INCOMING_NEW, null);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:22,代码来源:MylynSupport.java

示例2: toNbTasks

import org.eclipse.mylyn.tasks.core.ITask; //导入方法依赖的package包/类
Collection<NbTask> toNbTasks (Collection<ITask> tasks, boolean includeUnsubmittedNewTasks) {
    Set<NbTask> nbTasks = new LinkedHashSet<NbTask>(tasks.size());
    for (ITask task : tasks) {
        if (includeUnsubmittedNewTasks || task.getSynchronizationState() != ITask.SynchronizationState.OUTGOING_NEW) {
            // remember that unsubmitted tasks are local tasks and should not be included
            // in tasks for local task repository
            nbTasks.add(toNbTask(task));
        }
    }
    return Collections.unmodifiableSet(nbTasks);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:12,代码来源:MylynSupport.java

示例3: containersChanged

import org.eclipse.mylyn.tasks.core.ITask; //导入方法依赖的package包/类
@Override
public void containersChanged (Set<TaskContainerDelta> deltas) {
    // listen on changes on all tasks
    boolean change = false;
    for (TaskContainerDelta delta : deltas) {
        if (delta.getElement() instanceof ITask) {
            ITask task = (ITask) delta.getElement();
            NbTask nbTask = supp.toNbTask(task);
            if (delta.getKind() == TaskContainerDelta.Kind.CONTENT) {
                if (repository.getRepositoryUrl().equals(task.getRepositoryUrl())) {
                    // the task may change its status
                    change |= nbTask.isOutgoing() ? tasks.add(nbTask) : tasks.remove(nbTask);
                }
            } else if (delta.getKind() == TaskContainerDelta.Kind.DELETED) {
                // the task was deleted permanently
                change |= tasks.remove(nbTask);
            } else if (delta.getKind() == TaskContainerDelta.Kind.ADDED
                    && task.getSynchronizationState() == ITask.SynchronizationState.OUTGOING_NEW) {
                // task may be added to the unsubmitted category
                change |= taskList.getUnsubmittedContainer(repository.getRepositoryUrl())
                        .getChildren().contains(task) && tasks.add(nbTask);
            }
        }
    }
    if (change) {
        fireIssuesChanged();
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:29,代码来源:UnsubmittedTasksContainer.java

示例4: isUnsubmittedRepositoryTask

import org.eclipse.mylyn.tasks.core.ITask; //导入方法依赖的package包/类
boolean isUnsubmittedRepositoryTask (ITask task) {
    return task.getSynchronizationState() == ITask.SynchronizationState.OUTGOING_NEW
            && task.getAttribute(ITasksCoreConstants.ATTRIBUTE_OUTGOING_NEW_CONNECTOR_KIND) != null;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:5,代码来源:MylynSupport.java


注:本文中的org.eclipse.mylyn.tasks.core.ITask.getSynchronizationState方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。