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


Java TaskRepository.getRepositoryUrl方法代码示例

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


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

示例1: createSubtask

import org.eclipse.mylyn.tasks.core.TaskRepository; //导入方法依赖的package包/类
public NbTask createSubtask (NbTask parentTask) throws CoreException {
    ensureTaskListLoaded();
    TaskRepository taskRepository = taskRepositoryManager.getRepository(parentTask.getDelegate().getRepositoryUrl());
    if (taskRepository == null || parentTask.isUnsubmittedRepositoryTask()) {
        throw new IllegalStateException("Task repository: " + parentTask.getDelegate().getRepositoryUrl()
                + " - parent: " + parentTask.isUnsubmittedRepositoryTask());
    }
    AbstractTask task = createNewTask(taskRepository);
    AbstractRepositoryConnector repositoryConnector = taskRepositoryManager.getRepositoryConnector(taskRepository.getConnectorKind());
    AbstractTaskDataHandler taskDataHandler = repositoryConnector.getTaskDataHandler();
    
    TaskAttributeMapper attributeMapper = repositoryConnector.getTaskDataHandler().getAttributeMapper(taskRepository);
    TaskData taskData = new TaskData(attributeMapper, repositoryConnector.getConnectorKind(), taskRepository.getRepositoryUrl(), "");
    taskDataHandler.initializeSubTaskData(taskRepository, taskData, parentTask.getTaskDataState().getRepositoryData(), new NullProgressMonitor());
    initializeTask(repositoryConnector, taskData, task, taskRepository);        
    return MylynSupport.getInstance().toNbTask(task);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:18,代码来源:MylynSupport.java

示例2: createTask

import org.eclipse.mylyn.tasks.core.TaskRepository; //导入方法依赖的package包/类
/**
 * Creates an unsubmitted task that's to be populated and submitted later.
 * The task is local until submitted and kept in the tasklist under
 * "Unsubmitted" category.
 *
 * @param taskRepository repository the task will be submitted to later.
 * @param initializingData default data (such as product/component) to
 * preset in the new task's data
 * @return the newly created task.
 * @throws CoreException tasklist or task data storage is inaccessible
 */
public NbTask createTask (TaskRepository taskRepository, ITaskMapping initializingData) throws CoreException {
    ensureTaskListLoaded();
    AbstractTask task = createNewTask(taskRepository);
    AbstractRepositoryConnector repositoryConnector = taskRepositoryManager.getRepositoryConnector(taskRepository.getConnectorKind());
    AbstractTaskDataHandler taskDataHandler = taskRepository == localTaskRepository
            ? new LocalTaskDataHandler(taskRepository)
            : repositoryConnector.getTaskDataHandler();
    TaskAttributeMapper attributeMapper = taskDataHandler.getAttributeMapper(taskRepository);
    TaskData taskData = new TaskData(attributeMapper, repositoryConnector.getConnectorKind(), taskRepository.getRepositoryUrl(), "");
    taskDataHandler.initializeTaskData(taskRepository, taskData, initializingData, new NullProgressMonitor());
    initializeTask(repositoryConnector, taskData, task, taskRepository);
    return MylynSupport.getInstance().toNbTask(task);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:25,代码来源:MylynSupport.java

示例3: createTaskData

import org.eclipse.mylyn.tasks.core.TaskRepository; //导入方法依赖的package包/类
public static TaskData createTaskData(BugzillaRepositoryConnector brc, TaskRepository repository, String summary, String desc, String typeName) throws MalformedURLException, CoreException {
    TaskAttributeMapper attributeMapper = brc.getTaskDataHandler().getAttributeMapper(repository);
    TaskData data = new TaskData(attributeMapper, repository.getConnectorKind(), repository.getRepositoryUrl(), "");
    TaskAttribute rta = data.getRoot();
    TaskAttribute ta = rta.getMappedAttribute(TaskAttribute.USER_ASSIGNED);
    ta = rta.createMappedAttribute(TaskAttribute.SUMMARY);
    ta.setValue(summary);
    ta = rta.createMappedAttribute(TaskAttribute.DESCRIPTION);
    ta.setValue(desc);

    BugzillaClient client = brc.getClientManager().getClient(repository, NULL_PROGRESS_MONITOR);
    RepositoryConfiguration rc = brc.getRepositoryConfiguration(repository, false, new NullProgressMonitor());
    String os = client.getRepositoryConfiguration().getOSs().get(0);
    ta = rta.createMappedAttribute(BugzillaAttribute.OP_SYS.getKey());
    ta.setValue(os);

    ta = rta.createMappedAttribute(BugzillaAttribute.PRODUCT.getKey());
    ta.setValue(TEST_PROJECT);

    String platform = client.getRepositoryConfiguration().getPlatforms().get(0);
    ta = rta.createMappedAttribute(BugzillaAttribute.REP_PLATFORM.getKey());
    ta.setValue(platform);

    String version = client.getRepositoryConfiguration().getVersions(TEST_PROJECT).get(0);
    ta = rta.createMappedAttribute(BugzillaAttribute.VERSION.getKey());
    ta.setValue(version);

    String component = client.getRepositoryConfiguration().getComponents(TEST_PROJECT).get(0);
    ta = rta.createMappedAttribute(BugzillaAttribute.COMPONENT.getKey());
    ta.setValue(component);

    return data;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:34,代码来源:TestUtil.java

示例4: parseQueryResults

import org.eclipse.mylyn.tasks.core.TaskRepository; //导入方法依赖的package包/类
public TaskData parseQueryResults(TaskRepository repository, CharmQueryResult result, IProgressMonitor monitor)
		throws CoreException {

	TaskData taskData = new TaskData(getAttributeMapper(repository), repository.getConnectorKind(),
			repository.getRepositoryUrl(), result.getGuid());

	initializeTaskData(repository, taskData, null, monitor);

	setAttributeValue(TaskAttribute.SUMMARY, result.getDescription(), taskData);
	return taskData;
}
 
开发者ID:theits,项目名称:CharmMylynConnector,代码行数:12,代码来源:CharmTaskDataHandler.java


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