org.eclipse.ease.ui.completion

## Class CodeCompletionAggregator

- java.lang.Object
- - org.eclipse.ease.ui.completion.CodeCompletionAggregator

All Implemented Interfaces:
  IContentProposalProvider

    public class CodeCompletionAggregator
    extends Object
    implements IContentProposalProvider

Dispatcher class create code completion proposals. First checks all registered `ICompletionProvider` objects to get the `ICompletionContext` for the desired line. Then uses all registered `ICompletionProvider` objects to calculate the `IContentProposal` array for `getProposals(String, int)`. TODO: Refactor to use multi-threading.

### Field Summary

Fields
`static String` `ATTRIBUTE_CLASS` String constant for class attribute of codeCompletionProvider extension.
`static String` `ATTRIBUTE_SCRIPT_TYPE` String constant for script type attribute of codeCompletionProvider extension.
`static String` `COMPLETION_PROCESSOR` String constant for codeCompletionProvider extension point.

### Constructor Summary

Constructors
Constructor and Description
`CodeCompletionAggregator()`

### Method Summary

All Methods Instance Methods Concrete Methods
`char[]` `getActivationChars()`
`List<ICompletionProposal>` `getCompletionProposals(Object resource, String relevantText, int insertOffset, int selectionRange, IProgressMonitor monitor)`
`IContentProposal[]` `getProposals(String contents, int position)`
`void` `setCodeParser(ICodeParser codeParser)` Setter method for ICompletionAnalyzer.
`void` `setScriptEngine(IScriptEngine scriptEngine)` Sets the given script engine for all registered completion providers.
`void` `setScriptType(ScriptType scriptType)`

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

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

### Field Detail

#### COMPLETION_PROCESSOR

    public static final String COMPLETION_PROCESSOR

String constant for codeCompletionProvider extension point.

See Also:
  Constant Field Values

#### ATTRIBUTE_SCRIPT_TYPE

    public static final String ATTRIBUTE_SCRIPT_TYPE

String constant for script type attribute of codeCompletionProvider extension.

See Also:
  Constant Field Values

#### ATTRIBUTE_CLASS

    public static final String ATTRIBUTE_CLASS

String constant for class attribute of codeCompletionProvider extension.

See Also:
  Constant Field Values

### Constructor Detail

#### CodeCompletionAggregator

    public CodeCompletionAggregator()

### Method Detail

#### setCodeParser

    public void setCodeParser(ICodeParser codeParser)

Setter method for ICompletionAnalyzer.

Parameters:
  `codeParser` - `ICodeParser` for completion calculation.

#### getActivationChars

    public char[] getActivationChars()

#### setScriptEngine

    public void setScriptEngine(IScriptEngine scriptEngine)

Sets the given script engine for all registered completion providers. Calls `ICompletionProvider#setScriptEngine(IScriptEngine)`.

Parameters:
  `scriptEngine` - `IScriptEngine` to be set.

#### setScriptType

    public void setScriptType(ScriptType scriptType)

#### getCompletionProposals

    public List<ICompletionProposal> getCompletionProposals(Object resource,
                                                            String relevantText,
                                                            int insertOffset,
                                                            int selectionRange,
                                                            IProgressMonitor monitor)

Parameters:
  `resource` -
  `relevantText` -
  `selectionRange` -
  `monitor` -
  `i` -
Returns:

#### getProposals

    public IContentProposal[] getProposals(String contents,
                                           int position)

Specified by:
  `getProposals` in interface `IContentProposalProvider`