diff options
author | spingel | 2010-04-03 01:33:20 +0000 |
---|---|---|
committer | spingel | 2010-04-03 01:33:20 +0000 |
commit | ac04a12c6f57645283593918e5f0f47dad4ea44e (patch) | |
tree | 1f42c4b4f3073e8ee63d83bd9dc3ebe3c8f5bd06 /org.eclipse.mylyn.tasks.search/src/org/eclipse | |
parent | 3a236a4458dd45d54e3243943c67f286a74da59b (diff) | |
download | org.eclipse.mylyn.tasks-ac04a12c6f57645283593918e5f0f47dad4ea44e.tar.gz org.eclipse.mylyn.tasks-ac04a12c6f57645283593918e5f0f47dad4ea44e.tar.xz org.eclipse.mylyn.tasks-ac04a12c6f57645283593918e5f0f47dad4ea44e.zip |
NEW - bug 305075: [patch] consume search extension point
https://bugs.eclipse.org/bugs/show_bug.cgi?id=305075
Diffstat (limited to 'org.eclipse.mylyn.tasks.search/src/org/eclipse')
2 files changed, 37 insertions, 3 deletions
diff --git a/org.eclipse.mylyn.tasks.search/src/org/eclipse/mylyn/internal/tasks/ui/TaskSearchPage.java b/org.eclipse.mylyn.tasks.search/src/org/eclipse/mylyn/internal/tasks/ui/TaskSearchPage.java index 4f1b0a3b9..06050c204 100644 --- a/org.eclipse.mylyn.tasks.search/src/org/eclipse/mylyn/internal/tasks/ui/TaskSearchPage.java +++ b/org.eclipse.mylyn.tasks.search/src/org/eclipse/mylyn/internal/tasks/ui/TaskSearchPage.java @@ -545,11 +545,8 @@ public class TaskSearchPage extends DialogPage implements ISearchPage { private class DeadSearchPage extends AbstractRepositoryQueryPage { - private final Status status; - public DeadSearchPage(TaskRepository rep, Status status) { super("Search page error", rep); //$NON-NLS-1$ - this.status = status; } public void createControl(Composite parent) { diff --git a/org.eclipse.mylyn.tasks.search/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchTaskHandler.java b/org.eclipse.mylyn.tasks.search/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchTaskHandler.java new file mode 100644 index 000000000..ee3ed888c --- /dev/null +++ b/org.eclipse.mylyn.tasks.search/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchTaskHandler.java @@ -0,0 +1,37 @@ +/******************************************************************************* + * Copyright (c) 2010 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 + * + * Contributors: + * Tasktop Technologies - initial API and implementation + *******************************************************************************/ + +package org.eclipse.mylyn.internal.tasks.ui.search; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.mylyn.internal.tasks.ui.TaskSearchPage; +import org.eclipse.search.ui.NewSearchUI; +import org.eclipse.ui.IWorkbenchWindow; +import org.eclipse.ui.handlers.HandlerUtil; + +/** + * A command handler that opens the task search dialog. + * + * @author Steffen Pingel + */ +public class SearchTaskHandler extends AbstractHandler { + + public Object execute(ExecutionEvent event) throws ExecutionException { + IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindow(event); + if (window != null) { + NewSearchUI.openSearchDialog(window, TaskSearchPage.ID); + } + return null; + } + +} |