本文整理匯總了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;
}