Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspingel2010-02-26 20:59:37 +0000
committerspingel2010-02-26 20:59:37 +0000
commitbb5338f9e590a61562eda85cebc636f194b5f39f (patch)
tree600ff45fd0e49b8ed596fb1c908eabed1b77f4cc /org.eclipse.mylyn.tasks.search/src/org/eclipse/mylyn/internal/tasks/ui/actions
parentf67d195914c9eb65d11ef17af5015bf70b1dada4 (diff)
downloadorg.eclipse.mylyn.tasks-bb5338f9e590a61562eda85cebc636f194b5f39f.tar.gz
org.eclipse.mylyn.tasks-bb5338f9e590a61562eda85cebc636f194b5f39f.tar.xz
org.eclipse.mylyn.tasks-bb5338f9e590a61562eda85cebc636f194b5f39f.zip
bug 304086: [api] decouple tasks.ui from org.eclipse.search
https://bugs.eclipse.org/bugs/show_bug.cgi?id=304086
Diffstat (limited to 'org.eclipse.mylyn.tasks.search/src/org/eclipse/mylyn/internal/tasks/ui/actions')
-rw-r--r--org.eclipse.mylyn.tasks.search/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenTaskSearchAction.java53
1 files changed, 53 insertions, 0 deletions
diff --git a/org.eclipse.mylyn.tasks.search/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenTaskSearchAction.java b/org.eclipse.mylyn.tasks.search/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenTaskSearchAction.java
new file mode 100644
index 000000000..0c6f858b6
--- /dev/null
+++ b/org.eclipse.mylyn.tasks.search/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenTaskSearchAction.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2008 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.actions;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.mylyn.internal.tasks.ui.TaskSearchPage;
+import org.eclipse.search.ui.NewSearchUI;
+import org.eclipse.ui.IViewActionDelegate;
+import org.eclipse.ui.IViewPart;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * @author Mik Kersten
+ * @author Steffen Pingel
+ */
+public class OpenTaskSearchAction extends Action implements IViewActionDelegate {
+
+ public OpenTaskSearchAction() {
+ }
+
+ public void init(IViewPart view) {
+ // ignore
+ }
+
+ @Override
+ public void run() {
+ IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+ if (window != null) {
+ NewSearchUI.openSearchDialog(window, TaskSearchPage.ID);
+ }
+ }
+
+ public void run(IAction action) {
+ run();
+ }
+
+ public void selectionChanged(IAction action, ISelection selection) {
+ // ignore
+ }
+
+}

Back to the top