View | Details | Raw Unified | Return to bug 232766 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/team/internal/ccvs/ui/ConfigureRepositoryLocationsTable.java (-4 / +15 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2007 IBM Corporation and others.
2
 * Copyright (c) 2000, 2008 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 16-22 Link Here
16
16
17
import org.eclipse.jface.viewers.*;
17
import org.eclipse.jface.viewers.*;
18
import org.eclipse.swt.SWT;
18
import org.eclipse.swt.SWT;
19
import org.eclipse.swt.custom.TableEditor;
20
import org.eclipse.swt.events.ControlAdapter;
19
import org.eclipse.swt.events.ControlAdapter;
21
import org.eclipse.swt.events.ControlEvent;
20
import org.eclipse.swt.events.ControlEvent;
22
import org.eclipse.swt.graphics.*;
21
import org.eclipse.swt.graphics.*;
Lines 186-196 Link Here
186
		fTableViewer.setContentProvider(this);
185
		fTableViewer.setContentProvider(this);
187
		fTableViewer.setLabelProvider(this);
186
		fTableViewer.setLabelProvider(this);
188
		fTableViewer.setComparator(new AlternativeRepositoryComparator());
187
		fTableViewer.setComparator(new AlternativeRepositoryComparator());
189
188
		
190
		/**
189
		/**
191
		 * Add a cell editor in the 'Alternative repository locations' column
190
		 * Add a cell editor in the 'Alternative repository locations' column
192
		 */
191
		 */
193
		new TableEditor(table);
192
		TableViewerFocusCellManager focusCellManager = new TableViewerFocusCellManager(
193
				fTableViewer, new FocusCellOwnerDrawHighlighter(fTableViewer));
194
		ColumnViewerEditorActivationStrategy editorActivationStrategy = new ColumnViewerEditorActivationStrategy(
195
				fTableViewer) {
196
			protected boolean isEditorActivationEvent(
197
					ColumnViewerEditorActivationEvent event) {
198
				return event.eventType == ColumnViewerEditorActivationEvent.MOUSE_DOUBLE_CLICK_SELECTION
199
						|| (event.eventType == ColumnViewerEditorActivationEvent.KEY_PRESSED && event.keyCode == SWT.F2);
200
			}
201
		};
202
		TableViewerEditor.create(fTableViewer, focusCellManager,
203
				editorActivationStrategy, ColumnViewerEditor.DEFAULT
204
						| ColumnViewerEditor.KEYBOARD_ACTIVATION);
194
205
195
		cellEditors = new CellEditor[2];
206
		cellEditors = new CellEditor[2];
196
		cellEditors[0] = null;
207
		cellEditors[0] = null;

Return to bug 232766