public abstract static class SelectionBasedAction.Single<T> extends SelectionBasedAction<T>
castElement(Object)
method that map raw selection object
to a custom type T. Action optionally may allow selections with more than 1 object,
but it is required that only a single object is filtered out.SelectionBasedAction.ActionRunnable, SelectionBasedAction.Single<T>
Modifier | Constructor and Description |
---|---|
protected |
Single(boolean allowMutipleSelection) |
Modifier and Type | Method and Description |
---|---|
protected abstract T |
castElement(java.lang.Object element)
User-provided method that casts raw selection element to user type T.
|
protected T |
readSelection(IStructuredSelection selection) |
createRunnable, dispose, getAction, init, modifyActionText, restoreActionText, run, runWithEvent, selectionChanged, setActivePart
protected Single(boolean allowMutipleSelection)
allowMutipleSelection
- if false requires that selection contains exactly 1 element;
if true only requires that selection contains exactly 1 element that gets cast
by castElement(Object)
methodprotected T readSelection(IStructuredSelection selection)
readSelection
in class SelectionBasedAction<T>
protected abstract T castElement(java.lang.Object element)
Copyright (c) IBM Corp. and others 2000, 2016. All Rights Reserved.