Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Wolf2019-12-21 13:54:56 +0000
committerThomas Wolf2019-12-24 13:51:13 +0000
commit9072fa39911083d1507f44c1380dba66f0b5fbae (patch)
tree770b9cb235682b346871cef5ade812d5b530fd7e
parent08264b9fac4686e9c91752022e39cc3ae3e00f90 (diff)
downloadegit-9072fa39911083d1507f44c1380dba66f0b5fbae.tar.gz
egit-9072fa39911083d1507f44c1380dba66f0b5fbae.tar.xz
egit-9072fa39911083d1507f44c1380dba66f0b5fbae.zip
[repo view] Work-around for SWT regression on GTK
Remove the focus cell manager. It is needed only for keyboard activation of inline cell editing, but we don't use that anyway since we always go through the rename command, which is a programmatic editor activation. The focus manager ensures the focus cell is visible by calling Tree.showItem(), which is specified to do nothing if the cell is already visible. But since the changes made in the GTK version of SWT for bug 552096, showItem() _always_ scrolls the item to the center of the tree, which is quite annoying and makes double-clicking an item impossible unless it already is in the center of the view. As a work-around, remove that unnecessary focus manager. Bug: 558496 Change-Id: I69f5c4274350a909dd0288a0f8650346ba8da175 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositoriesView.java9
1 files changed, 1 insertions, 8 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositoriesView.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositoriesView.java
index a208ae43ae..ae1ccdb532 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositoriesView.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositoriesView.java
@@ -95,7 +95,6 @@ import org.eclipse.jface.viewers.ColumnViewerEditor;
import org.eclipse.jface.viewers.ColumnViewerEditorActivationEvent;
import org.eclipse.jface.viewers.ColumnViewerEditorActivationStrategy;
import org.eclipse.jface.viewers.DoubleClickEvent;
-import org.eclipse.jface.viewers.FocusCellHighlighter;
import org.eclipse.jface.viewers.ICellModifier;
import org.eclipse.jface.viewers.IDoubleClickListener;
import org.eclipse.jface.viewers.ILabelProvider;
@@ -109,7 +108,6 @@ import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.TextCellEditor;
import org.eclipse.jface.viewers.TreeSelection;
import org.eclipse.jface.viewers.TreeViewerEditor;
-import org.eclipse.jface.viewers.TreeViewerFocusCellManager;
import org.eclipse.jface.viewers.ViewerCell;
import org.eclipse.jface.window.Window;
import org.eclipse.jgit.events.ConfigChangedListener;
@@ -576,11 +574,6 @@ public class RepositoriesView extends CommonNavigator implements IShowInSource,
}
private void setupInlineEditing(CommonViewer viewer) {
- TreeViewerFocusCellManager focusCellManager = new TreeViewerFocusCellManager(
- viewer, new FocusCellHighlighter(viewer) {
- // Empty; SWT highlights already.
- });
-
ColumnViewerEditorActivationStrategy editorActivation = new ColumnViewerEditorActivationStrategy(
viewer) {
@@ -597,7 +590,7 @@ public class RepositoriesView extends CommonNavigator implements IShowInSource,
// tabbing. It may jump otherwise into an open editor (closing the cell
// editor), and when the user is typing he may then inadvertently modify
// that file.
- TreeViewerEditor.create(viewer, focusCellManager, editorActivation,
+ TreeViewerEditor.create(viewer, editorActivation,
ColumnViewerEditor.TABBING_HORIZONTAL);
// Record the initial value so that the validator can avoid producing an

Back to the top