Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkersten2006-12-18 21:00:43 -0500
committermkersten2006-12-18 21:00:43 -0500
commite301eed464204fd713376a829b0974cd052752ab (patch)
tree4897a13abf7b079dfe542bf4f07636c3cb440a21
parent167b9ffcd4bdac24e46a5f22d93f855151be3d44 (diff)
downloadorg.eclipse.mylyn.tasks-e301eed464204fd713376a829b0974cd052752ab.tar.gz
org.eclipse.mylyn.tasks-e301eed464204fd713376a829b0974cd052752ab.tar.xz
org.eclipse.mylyn.tasks-e301eed464204fd713376a829b0974cd052752ab.zip
RESOLVED - bug 168248: Double-click support on Open/Activate Task dialog
https://bugs.eclipse.org/bugs/show_bug.cgi?id=168248
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskSelectionDialog.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskSelectionDialog.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskSelectionDialog.java
index fa793085c..e51e471a8 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskSelectionDialog.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskSelectionDialog.java
@@ -18,8 +18,10 @@ import java.util.regex.Pattern;
import org.eclipse.jface.text.ITextSelection;
import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.IOpenListener;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.OpenEvent;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.Viewer;
@@ -221,6 +223,15 @@ public class TaskSelectionDialog extends SelectionStatusDialog {
}
});
+ viewer.addOpenListener(new IOpenListener() {
+
+ public void open(OpenEvent event) {
+ if (getOkButton().getEnabled()) {
+ okPressed();
+ }
+ }
+
+ });
filterText.addKeyListener(new KeyAdapter() {
@@ -249,7 +260,7 @@ public class TaskSelectionDialog extends SelectionStatusDialog {
if (selection instanceof ITextSelection) {
String text = ((ITextSelection) selection).getText();
int n = text.indexOf('\n');
- if(n>-1) {
+ if (n > -1) {
text.substring(0, n);
}
filterText.setText(text);

Back to the top