Package org.eclipse.e4.core.commands.internal

# Class CommandServiceCreationFunction

java.lang.Object
org.eclipse.e4.core.contexts.ContextFunction
org.eclipse.e4.core.commands.internal.CommandServiceCreationFunction

All Implemented Interfaces:
  `IContextFunction`

public class CommandServiceCreationFunction extends ContextFunction

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`ROOT_CONTEXT`
A context key (value "rootContext") that identifies the root of this context chain.

### Fields inherited from interface org.eclipse.e4.core.contexts.IContextFunction

`SERVICE_CONTEXT_KEY, SERVICE_NAME`

## Constructor Summary

Constructors
Constructor
Description
`CommandServiceCreationFunction()`

## Method Summary

Modifier and Type
Method
Description
`Object`
`compute(IEclipseContext context, String contextKey)`
Evaluates the function based on the provided arguments and context to produce a consistent result.

### Methods inherited from class org.eclipse.e4.core.contexts.ContextFunction

`compute`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### ROOT_CONTEXT

public static final String ROOT_CONTEXT
A context key (value "rootContext") that identifies the root of this context chain. It does not have to be the global root, but signifies the topmost context for the purposes of function management and active context chains.

See Also:
  - Constant Field Values

## Constructor Details

### CommandServiceCreationFunction

public CommandServiceCreationFunction()

## Method Details

### compute

public Object compute(IEclipseContext context, String contextKey)
Description copied from interface: `IContextFunction`
Evaluates the function based on the provided arguments and context to produce a consistent result.

Specified by:
  `compute` in interface `IContextFunction`
Overrides:
  `compute` in class `ContextFunction`
Parameters:
  `context` - The context in which to perform the value computation.
  `contextKey` - The context key used to find this function; may be `null` such as if invoked directly.
Returns:
  The concrete value. Implementations may return `IInjector.NOT_A_VALUE` to cause lookup to continue up the context hierarchy.