use of org.eclipse.mylyn.tasks.core.IRepositoryQuery in project eclipse-integration-commons by spring-projects.
the class IdeUiUtils method getQuery.
private static IRepositoryQuery getQuery(String queryLabel) {
TaskList taskList = TasksUiPlugin.getTaskList();
Set<RepositoryQuery> queries = taskList.getQueries();
for (RepositoryQuery query : queries) {
if (queryLabel.equals(query.getSummary())) {
// query already exists
return query;
}
}
return null;
}
use of org.eclipse.mylyn.tasks.core.IRepositoryQuery in project eclipse-integration-commons by spring-projects.
the class IdeUiUtils method createQuery.
public static IRepositoryQuery createQuery(String repositoryUrl, String queryLabel, String queryUrl) {
TaskRepository taskRepository = TasksUiPlugin.getRepositoryManager().getRepository(repositoryUrl);
if (taskRepository == null) {
StatusHandler.log(new Status(IStatus.WARNING, IdeUiPlugin.PLUGIN_ID, "Query initialization failed, repository configuration not found: " + repositoryUrl));
return null;
}
IRepositoryQuery query = getQuery(queryLabel);
if (query != null) {
return query;
}
query = TasksUi.getRepositoryModel().createRepositoryQuery(taskRepository);
query.setUrl(queryUrl);
query.setSummary(queryLabel);
TasksUiPlugin.getTaskList().addQuery((RepositoryQuery) query);
TasksUiInternal.synchronizeRepository(taskRepository, false);
return query;
}
Aggregations