Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 160698
Collapse All | Expand All

(-)src/org/eclipse/mylar/internal/tasks/ui/actions/TaskSelectionDialog.java (-2 / +9 lines)
Lines 18-23 Link Here
18
import java.util.regex.Pattern;
18
import java.util.regex.Pattern;
19
19
20
import org.eclipse.jface.viewers.ArrayContentProvider;
20
import org.eclipse.jface.viewers.ArrayContentProvider;
21
import org.eclipse.jface.viewers.DoubleClickEvent;
22
import org.eclipse.jface.viewers.IDoubleClickListener;
21
import org.eclipse.jface.viewers.IStructuredSelection;
23
import org.eclipse.jface.viewers.IStructuredSelection;
22
import org.eclipse.jface.viewers.StructuredSelection;
24
import org.eclipse.jface.viewers.StructuredSelection;
23
import org.eclipse.jface.viewers.TableViewer;
25
import org.eclipse.jface.viewers.TableViewer;
Lines 48-54 Link Here
48
/**
50
/**
49
 * @author wmitsuda
51
 * @author wmitsuda
50
 */
52
 */
51
public class TaskSelectionDialog extends SelectionStatusDialog {
53
public class TaskSelectionDialog extends SelectionStatusDialog implements IDoubleClickListener{
52
54
53
	/**
55
	/**
54
	 * Implements a {@link ViewFilter} based on content typed in the filter
56
	 * Implements a {@link ViewFilter} based on content typed in the filter
Lines 132-138 Link Here
132
134
133
		Label matches = new Label(area, SWT.NONE);
135
		Label matches = new Label(area, SWT.NONE);
134
		matches.setText("&Matching tasks:");
136
		matches.setText("&Matching tasks:");
135
		viewer = new TableViewer(area);
137
		viewer = new TableViewer(area, SWT.SINGLE);
136
		Control control = viewer.getControl();
138
		Control control = viewer.getControl();
137
		GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
139
		GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
138
		control.setLayoutData(gd);
140
		control.setLayoutData(gd);
Lines 148-153 Link Here
148
		final TaskElementLabelProvider labelProvider = new TaskElementLabelProvider();
150
		final TaskElementLabelProvider labelProvider = new TaskElementLabelProvider();
149
		viewer.setLabelProvider(labelProvider);
151
		viewer.setLabelProvider(labelProvider);
150
		viewer.setContentProvider(new ArrayContentProvider());
152
		viewer.setContentProvider(new ArrayContentProvider());
153
		viewer.addDoubleClickListener(this);
151
154
152
		// Compute all existing tasks or query hits (if corresponding task does
155
		// Compute all existing tasks or query hits (if corresponding task does
153
		// not exist yet...)
156
		// not exist yet...)
Lines 251-254 Link Here
251
		return super.close();
254
		return super.close();
252
	}
255
	}
253
256
257
	public void doubleClick(DoubleClickEvent event) {
258
		okPressed();
259
	}
260
254
}
261
}

Return to bug 160698