本文整理汇总了Java中org.eclipse.mylyn.internal.tasks.core.AbstractTask.setAttribute方法的典型用法代码示例。如果您正苦于以下问题:Java AbstractTask.setAttribute方法的具体用法?Java AbstractTask.setAttribute怎么用?Java AbstractTask.setAttribute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.mylyn.internal.tasks.core.AbstractTask
的用法示例。
在下文中一共展示了AbstractTask.setAttribute方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initializeTask
import org.eclipse.mylyn.internal.tasks.core.AbstractTask; //导入方法依赖的package包/类
private void initializeTask (AbstractRepositoryConnector repositoryConnector, TaskData taskData, AbstractTask task, TaskRepository taskRepository) throws CoreException {
ITaskMapping mapping = repositoryConnector.getTaskMapping(taskData);
String taskKind = mapping.getTaskKind();
if (taskKind != null && taskKind.length() > 0) {
task.setTaskKind(taskKind);
}
ITaskDataWorkingCopy workingCopy = taskDataManager.createWorkingCopy(task, taskData);
workingCopy.save(null, null);
repositoryConnector.updateNewTaskFromTaskData(taskRepository, task, taskData);
String summary = mapping.getSummary();
if (summary != null && summary.length() > 0) {
task.setSummary(summary);
}
if (taskRepository == localTaskRepository) {
taskList.addTask(task);
} else {
taskList.addTask(task, taskList.getUnsubmittedContainer(task.getAttribute(ITasksCoreConstants.ATTRIBUTE_OUTGOING_NEW_REPOSITORY_URL)));
}
task.setAttribute(AbstractNbTaskWrapper.ATTR_NEW_UNREAD, Boolean.TRUE.toString());
}
示例2: createNewTask
import org.eclipse.mylyn.internal.tasks.core.AbstractTask; //导入方法依赖的package包/类
private AbstractTask createNewTask (TaskRepository taskRepository) {
AbstractTask task = new LocalTask(String.valueOf(taskList.getNextLocalTaskId()), Bundle.MSG_NewTaskSummary());
if (taskRepository != localTaskRepository) {
task.setSynchronizationState(ITask.SynchronizationState.OUTGOING_NEW);
task.setAttribute(ITasksCoreConstants.ATTRIBUTE_OUTGOING_NEW_CONNECTOR_KIND, taskRepository.getConnectorKind());
task.setAttribute(ITasksCoreConstants.ATTRIBUTE_OUTGOING_NEW_REPOSITORY_URL, taskRepository.getUrl());
}
return task;
}