S
- user type for data that is read from selectionpublic abstract class SelectionBasedAction<S>
extends java.lang.Object
IObjectActionDelegate
and IActionDelegate2
.Modifier and Type | Class and Description |
---|---|
static interface |
SelectionBasedAction.ActionRunnable |
static class |
SelectionBasedAction.Single<T>
Base class for actions that are enabled only for a single element in selection.
|
Constructor and Description |
---|
SelectionBasedAction() |
Modifier and Type | Method and Description |
---|---|
protected abstract SelectionBasedAction.ActionRunnable |
createRunnable(S selectedElements) |
void |
dispose() |
protected IAction |
getAction() |
void |
init(IAction action) |
protected void |
modifyActionText(java.lang.String newText) |
protected abstract S |
readSelection(IStructuredSelection selection) |
protected void |
restoreActionText() |
void |
run(IAction action) |
void |
runWithEvent(IAction action,
Event event) |
void |
selectionChanged(IAction actionParam,
ISelection selection) |
void |
setActivePart(IAction action,
IWorkbenchPart targetPart) |
protected abstract S readSelection(IStructuredSelection selection)
public void setActivePart(IAction action, IWorkbenchPart targetPart)
public void run(IAction action)
public void selectionChanged(IAction actionParam, ISelection selection)
protected abstract SelectionBasedAction.ActionRunnable createRunnable(S selectedElements)
protected void modifyActionText(java.lang.String newText)
protected void restoreActionText()
protected IAction getAction()
public void dispose()
public void init(IAction action)
public void runWithEvent(IAction action, Event event)
Copyright (c) IBM Corp. and others 2000, 2016. All Rights Reserved.