## org.eclipse.datatools.sqltools.sql.parser
Class ParserProposalAdvisor

    java.lang.Object
      org.eclipse.datatools.sqltools.sql.parser.ParserProposalAdvisor

    public class ParserProposalAdvisor

extends java.lang.Object

This class knows how to convert information generated by a SQL parser into completion proposals for content assist. Vendor extenders may need to use different advisors based on their parser generator technoligy and grammar.

Author:
  Hui Cao

Constructor Summary
`ParserProposalAdvisor()`

Method Summary
`boolean` `acceptsUserDefinedDataType(UserDefinedType udt)` Tells whether to accept the user defined data type in the content assist.
`boolean` `containsDataTypeProposals(java.lang.String[] parserProposals, java.util.Collection unreservedKeywords)` Returns whether the proposal list contains datatype.
`java.lang.String` `getGlobalVariablePrefix()`
`java.lang.String` `getLocalVariablePrefix()`
`java.lang.String[]` `getParserProposals(ParsingResult result)`
`boolean` `isGlobalVariableTokenDefinition(java.lang.String token)` Tells whether the given token represents a global variable token definition.
`boolean` `isIdentifierTokenDefinition(java.lang.String token)` Tells whether the given token represents an identifier token definition.
`boolean` `isLocalVariableTokenDefinition(java.lang.String token)` Tells whether the given token represents a local variable token definition.
`boolean` `isTokenDefinition(java.lang.String token)` Tells whether the given token represents a token definition.
`boolean` `isTokenName(java.lang.String token)` Tests whether the given string represents a token name

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ParserProposalAdvisor

    public ParserProposalAdvisor()

Method Detail

### getLocalVariablePrefix

    public java.lang.String getLocalVariablePrefix()

### getGlobalVariablePrefix

    public java.lang.String getGlobalVariablePrefix()

### isLocalVariableTokenDefinition

    public boolean isLocalVariableTokenDefinition(java.lang.String token)

  Tells whether the given token represents a local variable token definition.

### isGlobalVariableTokenDefinition

    public boolean isGlobalVariableTokenDefinition(java.lang.String token)

  Tells whether the given token represents a global variable token definition.

### isIdentifierTokenDefinition

    public boolean isIdentifierTokenDefinition(java.lang.String token)

  Tells whether the given token represents an identifier token definition.

### isTokenDefinition

    public boolean isTokenDefinition(java.lang.String token)

  Tells whether the given token represents a token definition.

### isTokenName

    public boolean isTokenName(java.lang.String token)

  Tests whether the given string represents a token name

### getParserProposals

    public java.lang.String[] getParserProposals(ParsingResult result)

### containsDataTypeProposals

    public boolean containsDataTypeProposals(java.lang.String[] parserProposals,
                                             java.util.Collection unreservedKeywords)

  Returns whether the proposal list contains datatype. The default implementation uses a simple algorithm: as long as the proposals contains "char", "varchar" and "int".

  Parameters:
    `config` -
    `result` -
  Returns:
    list the user defined datatype name list.

### acceptsUserDefinedDataType

    public boolean acceptsUserDefinedDataType(UserDefinedType udt)

  Tells whether to accept the user defined data type in the content assist. Default implementation simply returns true;

  Parameters:
    `udts` -