diff options
author | spingel | 2010-04-03 00:37:07 +0000 |
---|---|---|
committer | spingel | 2010-04-03 00:37:07 +0000 |
commit | 303067bc98d9d6057d5f42de91331c6a24fb981b (patch) | |
tree | b420eba38eac28ce8d10d2bb182ea27ea5b98805 /org.eclipse.mylyn.tasks.ui | |
parent | 89cfdaaa835d5b420bbccb04a23cd5f91016ff60 (diff) | |
download | org.eclipse.mylyn.tasks-303067bc98d9d6057d5f42de91331c6a24fb981b.tar.gz org.eclipse.mylyn.tasks-303067bc98d9d6057d5f42de91331c6a24fb981b.tar.xz org.eclipse.mylyn.tasks-303067bc98d9d6057d5f42de91331c6a24fb981b.zip |
NEW - bug 304099: [patch][api] create extension point for tasks related search functionality
https://bugs.eclipse.org/bugs/show_bug.cgi?id=304099
Diffstat (limited to 'org.eclipse.mylyn.tasks.ui')
-rw-r--r-- | org.eclipse.mylyn.tasks.ui/schema/searchProvider.exsd | 100 | ||||
-rw-r--r-- | org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/AbstractSearchProvider.java | 51 |
2 files changed, 151 insertions, 0 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/schema/searchProvider.exsd b/org.eclipse.mylyn.tasks.ui/schema/searchProvider.exsd new file mode 100644 index 000000000..5a52ab017 --- /dev/null +++ b/org.eclipse.mylyn.tasks.ui/schema/searchProvider.exsd @@ -0,0 +1,100 @@ +<?xml version='1.0' encoding='UTF-8'?> +<!-- Schema file written by PDE --> +<schema targetNamespace="org.eclipse.mylyn.tasks.ui" xmlns="http://www.w3.org/2001/XMLSchema"> +<annotation> + <appInfo> + <meta.schema plugin="org.eclipse.mylyn.tasks.ui" id="searchProvider" name="Search Handling Provider"/> + </appInfo> + <documentation> + Provides search functionality, only one should be specified + </documentation> + </annotation> + + <element name="extension"> + <annotation> + <appInfo> + <meta.element internal="true" /> + </appInfo> + </annotation> + <complexType> + <sequence> + <element ref="searchProvider"/> + </sequence> + <attribute name="point" type="string" use="required"> + <annotation> + <documentation> + + </documentation> + </annotation> + </attribute> + <attribute name="id" type="string"> + <annotation> + <documentation> + + </documentation> + </annotation> + </attribute> + <attribute name="name" type="string"> + <annotation> + <documentation> + + </documentation> + <appInfo> + <meta.attribute translatable="true"/> + </appInfo> + </annotation> + </attribute> + </complexType> + </element> + + <element name="searchProvider"> + <complexType> + <attribute name="class" type="string" use="required"> + <annotation> + <documentation> + + </documentation> + <appInfo> + <meta.attribute kind="java" basedOn=":org.eclipse.mylyn.ISearchProvider"/> + </appInfo> + </annotation> + </attribute> + <attribute name="id" type="string" use="required"> + <annotation> + <documentation> + + </documentation> + <appInfo> + <meta.attribute kind="identifier"/> + </appInfo> + </annotation> + </attribute> + </complexType> + </element> + + <annotation> + <appInfo> + <meta.section type="since"/> + </appInfo> + <documentation> + 3.4 + </documentation> + </annotation> + + + + + <annotation> + <appInfo> + <meta.section type="copyright"/> + </appInfo> + <documentation> + Copyright (c) 2004, 2009 Tasktop Technologies and others. +All rights reserved. This program and the accompanying materials +are made available under the terms of the Eclipse Public License v1.0 +which accompanies this distribution, and is available at +http://www.eclipse.org/legal/epl-v10.html + </documentation> + </annotation> + +</schema> diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/AbstractSearchProvider.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/AbstractSearchProvider.java new file mode 100644 index 000000000..a9983029c --- /dev/null +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/AbstractSearchProvider.java @@ -0,0 +1,51 @@ +/******************************************************************************* + * Copyright (c) 2010 Flavio Donze and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Flavio Donze - initial API and implementation + * Tasktop Technologies - improvements + *******************************************************************************/ + +package org.eclipse.mylyn.internal.tasks.ui.search; + +import org.eclipse.mylyn.internal.tasks.core.ITaskList; +import org.eclipse.mylyn.tasks.core.IRepositoryQuery; +import org.eclipse.mylyn.tasks.core.TaskRepository; +import org.eclipse.ui.IWorkbenchWindow; + +/** + * Search providers should implement this class. + * + * @author Flavio Donze + * @since 3.4 + */ +public abstract class AbstractSearchProvider { + + /** + * Opens the search dialog. Shows the task search page. + * + * @param window + * parent window + */ + public abstract void openSearchDialog(IWorkbenchWindow window); + + /** + * Runs a search query. + * + * @param tasklist + * task list to receive the task from + * @param repository + * task repository to run query against + * @param query + * query to run + * @param activateResultView + * true if the result view should activate + */ + public abstract void runSearchQuery(ITaskList tasklist, TaskRepository repository, IRepositoryQuery query, + boolean activateResultView); + +} |