diff options
| author | Thomas Wolf | 2016-09-16 13:35:17 +0000 |
|---|---|---|
| committer | Thomas Wolf | 2016-09-16 13:35:17 +0000 |
| commit | 0b3d796e305d1d5a2359ba96dda47ed67ed05380 (patch) | |
| tree | e70ce9c2bc1a6f36e30dd03139e148be0838a0d2 | |
| parent | 1a479707e19b43c2ead0f09bbe063c32ecad218f (diff) | |
| download | org.eclipse.egerrit-0b3d796e305d1d5a2359ba96dda47ed67ed05380.tar.gz org.eclipse.egerrit-0b3d796e305d1d5a2359ba96dda47ed67ed05380.tar.xz org.eclipse.egerrit-0b3d796e305d1d5a2359ba96dda47ed67ed05380.zip | |
Bug 501543 - Fix dashboard's context menu
The context menu in the Gerrit dashboard sometimes got stray
contributions. This was caused by the view not setting a selection
provider. Menu contributions to popup:org.eclipse.ui.popup.any would
thus be evaluated with the previous selection, possibly from another
view or editor, and then could falsely show up in the Gerrit dashboard.
Change-Id: I33e901712384c4016dfd6e9c6d531949011dfd51
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
| -rw-r--r-- | org.eclipse.egerrit.dashboard.ui/src/org/eclipse/egerrit/internal/dashboard/ui/views/GerritTableView.java | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/org.eclipse.egerrit.dashboard.ui/src/org/eclipse/egerrit/internal/dashboard/ui/views/GerritTableView.java b/org.eclipse.egerrit.dashboard.ui/src/org/eclipse/egerrit/internal/dashboard/ui/views/GerritTableView.java index 4e657263..aa2a662d 100644 --- a/org.eclipse.egerrit.dashboard.ui/src/org/eclipse/egerrit/internal/dashboard/ui/views/GerritTableView.java +++ b/org.eclipse.egerrit.dashboard.ui/src/org/eclipse/egerrit/internal/dashboard/ui/views/GerritTableView.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2013,2015 Ericsson + * Copyright (c) 2013,2016 Ericsson 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 @@ -7,10 +7,11 @@ * http://www.eclipse.org/legal/epl-v10.html * * Contributors: - * Jacques Bouthillier - Initial Implementation of the plug-in - * Francois Chouinard - Handle gerrit queries and open reviews in editor - * Guy Perron - Add review counter, Add Gerrit button selection - * Jacques Bouthillier - Bug 426580 Add the starred functionality + * Jacques Bouthillier - Initial Implementation of the plug-in + * Francois Chouinard - Handle gerrit queries and open reviews in editor + * Guy Perron - Add review counter, Add Gerrit button selection + * Jacques Bouthillier - Bug 426580 Add the starred functionality + * Thomas Wolf <thomas.wolf@paranor.ch> - Bug 501543 ******************************************************************************/ package org.eclipse.egerrit.internal.dashboard.ui.views; @@ -310,6 +311,7 @@ public class GerritTableView extends ViewPart { reviewTable.createTableViewerSection(topComposite).setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); fViewer = reviewTable.getViewer(); + getSite().setSelectionProvider(fViewer); makeActions(); hookDoubleClickAction(); |
