Package org.eclipse.ui.actions
Class ActionContext
- java.lang.Object
-
- org.eclipse.ui.actions.ActionContext
-
public class ActionContext extends Object
AnActionContextrepresents the context used to determine which actions are added by anActionGroup, and what their enabled state should be.This class encapsulates a selection and an input element. Clients may subclass this class to add more information to the context.
-
-
Constructor Summary
Constructors Constructor Description ActionContext(ISelection selection)Creates a new action context with the given selection.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectgetInput()Returns the input element.ISelectiongetSelection()voidsetInput(Object input)Sets the input element.voidsetSelection(ISelection selection)Sets the selection.
-
-
-
Constructor Detail
-
ActionContext
public ActionContext(ISelection selection)
Creates a new action context with the given selection.- Parameters:
selection- the selection
-
-
Method Detail
-
getSelection
public ISelection getSelection()
- Returns:
- the selection.
-
setSelection
public void setSelection(ISelection selection)
Sets the selection.- Parameters:
selection- the selection to set
-
getInput
public Object getInput()
Returns the input element.- Returns:
- the input element
-
setInput
public void setInput(Object input)
Sets the input element.- Parameters:
input- the input to set.
-
-