Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Wolf2016-05-19 04:48:08 +0000
committerThomas Wolf2016-05-19 05:00:33 +0000
commit000cdb097ee8717d056e5f0ba9fa527ddb5c4d82 (patch)
tree878371dbdf0c30eb7dd010a8c4fd266585af6d73
parent1044971834a5c2a7ad00f6c0f0b7d9136c56b470 (diff)
downloadegit-000cdb097ee8717d056e5f0ba9fa527ddb5c4d82.tar.gz
egit-000cdb097ee8717d056e5f0ba9fa527ddb5c4d82.tar.xz
egit-000cdb097ee8717d056e5f0ba9fa527ddb5c4d82.zip
Ensure compatibility with pre-Mars Eclipse
TreeViewer.getStructuredSelection() was introduced in Jface 3.11 only. Do not use it to ensure compatibility with olderJFace versions in older Eclipses. Bug: 493945 Change-Id: I1588a04a4b13ed4b6ee841262da78761d58dfcc0 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
-rw-r--r--org.eclipse.egit.gitflow.ui/src/org/eclipse/egit/gitflow/ui/internal/dialogs/FilteredBranchesWidget.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/org.eclipse.egit.gitflow.ui/src/org/eclipse/egit/gitflow/ui/internal/dialogs/FilteredBranchesWidget.java b/org.eclipse.egit.gitflow.ui/src/org/eclipse/egit/gitflow/ui/internal/dialogs/FilteredBranchesWidget.java
index f4568b7c6..9182ec0d4 100644
--- a/org.eclipse.egit.gitflow.ui/src/org/eclipse/egit/gitflow/ui/internal/dialogs/FilteredBranchesWidget.java
+++ b/org.eclipse.egit.gitflow.ui/src/org/eclipse/egit/gitflow/ui/internal/dialogs/FilteredBranchesWidget.java
@@ -15,6 +15,7 @@ import java.util.List;
import org.eclipse.egit.ui.internal.repository.tree.RepositoryTreeNodeType;
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.jface.viewers.ColumnLabelProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerComparator;
@@ -120,7 +121,7 @@ public class FilteredBranchesWidget {
@SuppressWarnings("unchecked") // conversion to conform to List<Ref>
List<Ref> getSelection() {
- return branchesViewer.getStructuredSelection().toList();
+ return ((IStructuredSelection) branchesViewer.getSelection()).toList();
}
TreeViewer getBranchesList() {

Back to the top