org.eclipse.cdt.core.dom
Interface IASTServiceProvider

All Known Implementing Classes:
CDOM, InternalASTServiceProvider

public interface IASTServiceProvider

This is the mechanism that represents a parser service in the CDT. IASTTranslationUnits and ASTCompletionNodes are artifacts that this service returns.

Author:
jcamelon

Nested Class Summary
static class IASTServiceProvider.UnsupportedDialectException
          This exception is thrown when there is not a service provider that can handle the request due to dialect mis-match.
 
Method Summary
 org.eclipse.cdt.core.dom.ast.IASTCompletionNode getCompletionNode(org.eclipse.core.resources.IFile fileToParse, int offset, org.eclipse.cdt.core.dom.ICodeReaderFactory fileCreator)
          Returns a parse tree that represents the content provided as parameters.
 org.eclipse.cdt.core.dom.ast.IASTCompletionNode getCompletionNode(org.eclipse.core.resources.IStorage fileToParse, org.eclipse.core.resources.IProject project, int offset, org.eclipse.cdt.core.dom.ICodeReaderFactory fileCreator)
          Returns a parse tree that represents the content provided as parameters.
 org.eclipse.cdt.core.dom.ast.IASTTranslationUnit getTranslationUnit(org.eclipse.core.resources.IFile fileToParse)
          Returns a parse tree that represents the content provided as parameters.
 org.eclipse.cdt.core.dom.ast.IASTTranslationUnit getTranslationUnit(org.eclipse.core.resources.IFile fileToParse, boolean parseComments)
          Returns a parse tree that represents the content provided as parameters.
 org.eclipse.cdt.core.dom.ast.IASTTranslationUnit getTranslationUnit(org.eclipse.core.resources.IFile fileToParse, org.eclipse.cdt.core.dom.ICodeReaderFactory fileCreator)
          Returns a parse tree that represents the content provided as parameters.
 org.eclipse.cdt.core.dom.ast.IASTTranslationUnit getTranslationUnit(org.eclipse.core.resources.IFile fileToParse, org.eclipse.cdt.core.dom.ICodeReaderFactory fileCreator, boolean parseComments)
          Returns a parse tree that represents the content provided as parameters.
 org.eclipse.cdt.core.dom.ast.IASTTranslationUnit getTranslationUnit(org.eclipse.core.resources.IFile fileToParse, org.eclipse.cdt.core.dom.ICodeReaderFactory fileCreator, org.eclipse.cdt.core.dom.IParserConfiguration configuration)
          Returns a parse tree that represents the content provided as parameters.
 org.eclipse.cdt.core.dom.ast.IASTTranslationUnit getTranslationUnit(org.eclipse.core.resources.IStorage fileToParse, org.eclipse.core.resources.IProject project)
          Returns a parse tree that represents the content provided as parameters.
 org.eclipse.cdt.core.dom.ast.IASTTranslationUnit getTranslationUnit(org.eclipse.core.resources.IStorage fileToParse, org.eclipse.core.resources.IProject project, org.eclipse.cdt.core.dom.ICodeReaderFactory fileCreator)
          Returns a parse tree that represents the content provided as parameters.
 

Method Detail

getTranslationUnit

org.eclipse.cdt.core.dom.ast.IASTTranslationUnit getTranslationUnit(org.eclipse.core.resources.IFile fileToParse)
                                                                    throws IASTServiceProvider.UnsupportedDialectException
Returns a parse tree that represents the content provided as parameters.

Parameters:
fileToParse - the file in question
Returns:
syntactical parse tree
Throws:
IASTServiceProvider.UnsupportedDialectException

getTranslationUnit

org.eclipse.cdt.core.dom.ast.IASTTranslationUnit getTranslationUnit(org.eclipse.core.resources.IFile fileToParse,
                                                                    boolean parseComments)
                                                                    throws IASTServiceProvider.UnsupportedDialectException
Returns a parse tree that represents the content provided as parameters.

Parameters:
fileToParse - the file in question
parseComments - parse commtents flag
Returns:
syntactical parse tree
Throws:
IASTServiceProvider.UnsupportedDialectException

getTranslationUnit

org.eclipse.cdt.core.dom.ast.IASTTranslationUnit getTranslationUnit(org.eclipse.core.resources.IStorage fileToParse,
                                                                    org.eclipse.core.resources.IProject project,
                                                                    org.eclipse.cdt.core.dom.ICodeReaderFactory fileCreator)
                                                                    throws IASTServiceProvider.UnsupportedDialectException
Returns a parse tree that represents the content provided as parameters.

Parameters:
fileToParse - the file in question
project - project handle to help us figure out build settings
fileCreator - @see CDOM#getCodeReaderFactory(int)
Returns:
syntactical parse tree
Throws:
IASTServiceProvider.UnsupportedDialectException

getTranslationUnit

org.eclipse.cdt.core.dom.ast.IASTTranslationUnit getTranslationUnit(org.eclipse.core.resources.IStorage fileToParse,
                                                                    org.eclipse.core.resources.IProject project)
                                                                    throws IASTServiceProvider.UnsupportedDialectException
Returns a parse tree that represents the content provided as parameters.

Parameters:
fileToParse - the file in question
project - project handle to help us figure out build settings
Returns:
syntactical parse tree
Throws:
IASTServiceProvider.UnsupportedDialectException

getTranslationUnit

org.eclipse.cdt.core.dom.ast.IASTTranslationUnit getTranslationUnit(org.eclipse.core.resources.IFile fileToParse,
                                                                    org.eclipse.cdt.core.dom.ICodeReaderFactory fileCreator)
                                                                    throws IASTServiceProvider.UnsupportedDialectException
Returns a parse tree that represents the content provided as parameters.

Parameters:
fileToParse - the file in question
fileCreator - @see CDOM#getCodeReaderFactory(int)
Returns:
syntactical parse tree
Throws:
IASTServiceProvider.UnsupportedDialectException

getTranslationUnit

org.eclipse.cdt.core.dom.ast.IASTTranslationUnit getTranslationUnit(org.eclipse.core.resources.IFile fileToParse,
                                                                    org.eclipse.cdt.core.dom.ICodeReaderFactory fileCreator,
                                                                    boolean parseComments)
                                                                    throws IASTServiceProvider.UnsupportedDialectException
Returns a parse tree that represents the content provided as parameters.

Parameters:
fileToParse - the file in question
fileCreator - @see CDOM#getCodeReaderFactory(int)
parseComments - parse commtents flag
Returns:
syntactical parse tree
Throws:
IASTServiceProvider.UnsupportedDialectException

getTranslationUnit

org.eclipse.cdt.core.dom.ast.IASTTranslationUnit getTranslationUnit(org.eclipse.core.resources.IFile fileToParse,
                                                                    org.eclipse.cdt.core.dom.ICodeReaderFactory fileCreator,
                                                                    org.eclipse.cdt.core.dom.IParserConfiguration configuration)
                                                                    throws IASTServiceProvider.UnsupportedDialectException
Returns a parse tree that represents the content provided as parameters.

Parameters:
fileToParse - the file in question
fileCreator - @see CDOM#getCodeReaderFactory(int)
configuration - parser configuration provided rather than discovered by service
Returns:
syntactical parse tree
Throws:
IASTServiceProvider.UnsupportedDialectException

getCompletionNode

org.eclipse.cdt.core.dom.ast.IASTCompletionNode getCompletionNode(org.eclipse.core.resources.IFile fileToParse,
                                                                  int offset,
                                                                  org.eclipse.cdt.core.dom.ICodeReaderFactory fileCreator)
                                                                  throws IASTServiceProvider.UnsupportedDialectException
Returns a parse tree that represents the content provided as parameters.

Parameters:
fileToParse - the file in question
offset - the offset at which you require completion at
fileCreator - @see CDOM#getCodeReaderFactory(int)
Returns:
syntactical parse tree
Throws:
IASTServiceProvider.UnsupportedDialectException

getCompletionNode

org.eclipse.cdt.core.dom.ast.IASTCompletionNode getCompletionNode(org.eclipse.core.resources.IStorage fileToParse,
                                                                  org.eclipse.core.resources.IProject project,
                                                                  int offset,
                                                                  org.eclipse.cdt.core.dom.ICodeReaderFactory fileCreator)
                                                                  throws IASTServiceProvider.UnsupportedDialectException
Returns a parse tree that represents the content provided as parameters.

Parameters:
fileToParse - the file in question
project - the project containing the scanner info
offset - the offset at which you require completion at
fileCreator - @see CDOM#getCodeReaderFactory(int)
Returns:
syntactical parse tree
Throws:
IASTServiceProvider.UnsupportedDialectException