public final class SelectionHelper extends Object
ISelection
Modifier and Type | Class and Description |
---|---|
static class |
SelectionHelper.ListMode |
Modifier and Type | Method and Description |
---|---|
static <T> T |
first(org.eclipse.jface.viewers.ISelection selection,
Class<T> clazz) |
static <T> Iterable<T> |
iterable(org.eclipse.jface.viewers.ISelection selection,
Class<T> clazz) |
static <T> Iterator<T> |
iterator(org.eclipse.jface.viewers.ISelection selection,
Class<T> clazz)
Create an iterator that iterates only over objects in the selection of
the provided type
|
static List<?> |
list(org.eclipse.jface.viewers.ISelection selection) |
static <T> List<T> |
list(org.eclipse.jface.viewers.ISelection selection,
Class<T> clazz) |
static <T> List<T> |
list(org.eclipse.jface.viewers.ISelection selection,
SelectionHelper.ListMode mode,
Class<T> clazz) |
public static <T> Iterator<T> iterator(org.eclipse.jface.viewers.ISelection selection, Class<T> clazz)
This implementation will only work with IStructuredSelection
but
does not fail for others.
selection
- the selectionclazz
- the required typenull
public static List<?> list(org.eclipse.jface.viewers.ISelection selection)
public static <T> List<T> list(org.eclipse.jface.viewers.ISelection selection, SelectionHelper.ListMode mode, Class<T> clazz)
public static <T> Iterable<T> iterable(org.eclipse.jface.viewers.ISelection selection, Class<T> clazz)
public static <T> T first(org.eclipse.jface.viewers.ISelection selection, Class<T> clazz)
Copyright © 2016 Eclipse NeoSCADA Project. All rights reserved.