Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkersten2007-06-25 22:01:21 -0400
committermkersten2007-06-25 22:01:21 -0400
commite6f1b8189314a371b758ce9a11aabc5d19284af7 (patch)
tree91456332188873ef8c517f30683081ffd7d82250
parent1edde4b0c0332981d3eacf81fa71ae70013ebe71 (diff)
downloadorg.eclipse.mylyn.tasks-e6f1b8189314a371b758ce9a11aabc5d19284af7.tar.gz
org.eclipse.mylyn.tasks-e6f1b8189314a371b758ce9a11aabc5d19284af7.tar.xz
org.eclipse.mylyn.tasks-e6f1b8189314a371b758ce9a11aabc5d19284af7.zip
RESOLVED - bug 193423: merge Open Repository Task dialog and Search functionality
https://bugs.eclipse.org/bugs/show_bug.cgi?id=193423
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/LocalRepositoryConnector.java2
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/elcl16/task-search.gifbin603 -> 587 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/plugin.xml39
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskSearchPage.java1
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenTaskSearchAction.java39
5 files changed, 64 insertions, 17 deletions
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/LocalRepositoryConnector.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/LocalRepositoryConnector.java
index 823a96039..a7cd57ef5 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/LocalRepositoryConnector.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/LocalRepositoryConnector.java
@@ -44,7 +44,7 @@ public class LocalRepositoryConnector extends AbstractRepositoryConnector {
@Override
public boolean canCreateTaskFromKey(TaskRepository repository) {
- return true;
+ return false;
}
@Override
diff --git a/org.eclipse.mylyn.tasks.ui/icons/elcl16/task-search.gif b/org.eclipse.mylyn.tasks.ui/icons/elcl16/task-search.gif
index b59e62b81..caa4b8510 100644
--- a/org.eclipse.mylyn.tasks.ui/icons/elcl16/task-search.gif
+++ b/org.eclipse.mylyn.tasks.ui/icons/elcl16/task-search.gif
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/plugin.xml b/org.eclipse.mylyn.tasks.ui/plugin.xml
index ff202ac55..f2dd46746 100644
--- a/org.eclipse.mylyn.tasks.ui/plugin.xml
+++ b/org.eclipse.mylyn.tasks.ui/plugin.xml
@@ -257,17 +257,14 @@
<viewContribution
id="org.eclipse.mylyn.tasks.ui.actions.view"
targetID="org.eclipse.mylyn.tasks.ui.views.tasks">
-
- <action
- class="org.eclipse.mylyn.internal.tasks.ui.actions.SynchronizeAllAction"
- enablesFor="*"
- icon="icons/etool16/repository-synchronize.gif"
- id="org.eclipse.mylyn.tasks.ui.synchronize.changed"
- label="Synchronize Changed"
+ <action
+ class="org.eclipse.mylyn.internal.tasks.ui.actions.RestoreTaskListAction"
+ icon="icons/etool16/import.gif"
+ id="org.eclipse.mylyn.tasks.ui.tasks.restore"
+ label="Restore Tasks from History..."
menubarPath="tasks"
- toolbarPath="new"
- tooltip="Synchronize Changed">
- </action>
+ style="push">
+ </action>
<action
class="org.eclipse.mylyn.internal.tasks.ui.actions.ShowTaskRepositoriesViewAction"
@@ -278,13 +275,23 @@
menubarPath="tasks"
tooltip="Show Task Repositories View">
</action>
- <action
- class="org.eclipse.mylyn.internal.tasks.ui.actions.RestoreTaskListAction"
- icon="icons/etool16/import.gif"
- id="org.eclipse.mylyn.tasks.ui.tasks.restore"
- label="Restore Tasks from History..."
+
+ <action
+ class="org.eclipse.mylyn.internal.tasks.ui.actions.SynchronizeAllAction"
+ enablesFor="*"
+ icon="icons/etool16/repository-synchronize.gif"
+ id="org.eclipse.mylyn.tasks.ui.synchronize.changed"
+ label="Synchronize Changed"
menubarPath="tasks"
- style="push">
+ toolbarPath="new"
+ tooltip="Synchronize Changed">
+ </action>
+ <action
+ class="org.eclipse.mylyn.internal.tasks.ui.actions.OpenTaskSearchAction"
+ icon="icons/elcl16/task-search.gif"
+ id="org.eclipse.mylyn.tasks.ui.search.open"
+ label="Search Repository..."
+ menubarPath="tasks">
</action>
<action
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskSearchPage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskSearchPage.java
index 4c89f4638..34f288d16 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskSearchPage.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskSearchPage.java
@@ -141,6 +141,7 @@ public class TaskSearchPage extends DialogPage implements ISearchPage {
openHyperlink.addHyperlinkListener(new IHyperlinkListener() {
public void linkActivated(HyperlinkEvent e) {
+ getShell().close();
new OpenRepositoryTask().run(null);
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenTaskSearchAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenTaskSearchAction.java
new file mode 100644
index 000000000..b3d4754e7
--- /dev/null
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenTaskSearchAction.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2004 - 2006 University Of British Columbia 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:
+ * University Of British Columbia - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.mylyn.internal.tasks.ui.actions;
+
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.mylyn.internal.tasks.ui.TaskSearchPage;
+import org.eclipse.search.internal.ui.SearchDialog;
+import org.eclipse.ui.IViewActionDelegate;
+import org.eclipse.ui.IViewPart;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * @author Mik Kersten
+ */
+public class OpenTaskSearchAction implements IViewActionDelegate {
+
+ public void init(IViewPart view) {
+ // ignore
+ }
+
+ public void run(IAction action) {
+ new SearchDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow(), TaskSearchPage.ID).open();
+ }
+
+ public void selectionChanged(IAction action, ISelection selection) {
+ // ignore
+ }
+
+}

Back to the top