1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 14:42:11 +02:00

Comment adjustments.

This commit is contained in:
Sergey Prigogin 2009-05-24 04:34:37 +00:00
parent fd233c56eb
commit 8ba4659e47
2 changed files with 29 additions and 35 deletions

View file

@ -22,7 +22,7 @@ import org.eclipse.cdt.core.parser.IToken;
*/ */
public interface IASTNode { public interface IASTNode {
public static final IASTNode [] EMPTY_NODE_ARRAY = new IASTNode[0]; public static final IASTNode[] EMPTY_NODE_ARRAY = new IASTNode[0];
/** /**
* Get the translation unit (master) node that is the ancestor of all nodes * Get the translation unit (master) node that is the ancestor of all nodes
@ -34,15 +34,15 @@ public interface IASTNode {
/** /**
* Get the location of this node. In cases not involving macro expansions, * Get the location of this node. In cases not involving macro expansions,
* the IASTNodeLocation [] result will only have one element in it, and it * the IASTNodeLocation[] result will only have one element in it, and it
* will be an IASTFileLocation. * will be an IASTFileLocation.
* *
* Where the node is completely generated within a macro expansion, * Where the node is completely generated within a macro expansion,
* IASTNodeLocation [] result will have one element in it, and it will be an * IASTNodeLocation[] result will have one element in it, and it will be an
* {@link IASTMacroExpansionLocation}. * {@link IASTMacroExpansionLocation}.
* *
* Nodes that span file context into a macro expansion (and potentially out * Nodes that span file context into a macro expansion (and potentially out
* of the macro expansion again) result in an IASTNodeLocation [] result * of the macro expansion again) result in an IASTNodeLocation[] result
* that is of length > 1. * that is of length > 1.
* *
* We do not provide meaningful node locations for nested macro references * We do not provide meaningful node locations for nested macro references

View file

@ -55,7 +55,7 @@ public interface IASTTranslationUnit extends IASTNode, IASTDeclarationListOwner,
public IASTDeclaration[] getDeclarations(); public IASTDeclaration[] getDeclarations();
/** /**
* Add declaration to translation unit. * Adds declaration to translation unit.
* *
* @param declaration <code>IASTDeclaration</code> * @param declaration <code>IASTDeclaration</code>
*/ */
@ -137,7 +137,7 @@ public interface IASTTranslationUnit extends IASTNode, IASTDeclarationListOwner,
public IASTNode selectNodeForLocation(String path, int offset, int length); public IASTNode selectNodeForLocation(String path, int offset, int length);
/** /**
* Get the macro definitions encountered in parsing this translation unit. The result will not contain * Returns the macro definitions encountered in parsing this translation unit. The result will not contain
* definitions for built-in macros. * definitions for built-in macros.
* <p> * <p>
* In case the information for a header-file is pulled in from the index, * In case the information for a header-file is pulled in from the index,
@ -146,13 +146,13 @@ public interface IASTTranslationUnit extends IASTNode, IASTDeclarationListOwner,
public IASTPreprocessorMacroDefinition[] getMacroDefinitions(); public IASTPreprocessorMacroDefinition[] getMacroDefinitions();
/** /**
* Get built-in macro definitions used when parsing this translation unit. * Returns built-in macro definitions used when parsing this translation unit.
* This includes macros obtained from the index. * This includes macros obtained from the index.
*/ */
public IASTPreprocessorMacroDefinition[] getBuiltinMacroDefinitions(); public IASTPreprocessorMacroDefinition[] getBuiltinMacroDefinitions();
/** /**
* Get the include directives encountered in parsing this translation unit. This will also contain directives * Returns the include directives encountered in parsing this translation unit. This will also contain directives
* used for handling the gcc-options -imacros and -include. * used for handling the gcc-options -imacros and -include.
* <p> * <p>
* In case the information for a header-file is pulled in from the index, * In case the information for a header-file is pulled in from the index,
@ -161,7 +161,7 @@ public interface IASTTranslationUnit extends IASTNode, IASTDeclarationListOwner,
public IASTPreprocessorIncludeStatement[] getIncludeDirectives(); public IASTPreprocessorIncludeStatement[] getIncludeDirectives();
/** /**
* Get all preprocessor statements. * Returns all preprocessor statements.
* In case the information for a header-file is pulled in from the index, * In case the information for a header-file is pulled in from the index,
* preprocessing statements contained therein are not returned. * preprocessing statements contained therein are not returned.
*/ */
@ -173,7 +173,7 @@ public interface IASTTranslationUnit extends IASTNode, IASTDeclarationListOwner,
public IASTPreprocessorMacroExpansion[] getMacroExpansions(); public IASTPreprocessorMacroExpansion[] getMacroExpansions();
/** /**
* Get all preprocessor and scanner problems. * Returns all preprocessor and scanner problems.
* @return <code>IASTProblem[]</code> * @return <code>IASTProblem[]</code>
*/ */
public IASTProblem[] getPreprocessorProblems(); public IASTProblem[] getPreprocessorProblems();
@ -184,45 +184,42 @@ public interface IASTTranslationUnit extends IASTNode, IASTDeclarationListOwner,
public int getPreprocessorProblemsCount(); public int getPreprocessorProblemsCount();
/** /**
* Get the translation unit's full path. * Returns the translation unit's full path.
* @return String representation of path. * @return String representation of path.
*/ */
public String getFilePath(); public String getFilePath();
/** /**
* Flatten the node locations provided into a single file location. * Flattens the node locations provided into a single file location.
* *
* @param nodeLocations <code>IASTNodeLocation</code>s to flatten * @param nodeLocations <code>IASTNodeLocation</code>s to flatten
* @return null if not possible, otherwise, a file location representing where the macros are. * @return null if not possible, otherwise, a file location representing where the macros are.
*/ */
public IASTFileLocation flattenLocationsToFile( IASTNodeLocation [] nodeLocations ); public IASTFileLocation flattenLocationsToFile(IASTNodeLocation[] nodeLocations);
/** /**
* @deprecated names for macro expansions are nested inside of {@link IASTPreprocessorMacroExpansion}. * @deprecated names for macro expansions are nested inside of {@link IASTPreprocessorMacroExpansion}.
*/ */
@Deprecated @Deprecated
public static final ASTNodeProperty EXPANSION_NAME = new ASTNodeProperty( public static final ASTNodeProperty EXPANSION_NAME = new ASTNodeProperty(
"IASTTranslationUnit.EXPANSION_NAME - IASTName generated for macro expansions."); //$NON-NLS-1$ "IASTTranslationUnit.EXPANSION_NAME - IASTName generated for macro expansions."); //$NON-NLS-1$
public static final ASTNodeProperty MACRO_EXPANSION = new ASTNodeProperty( public static final ASTNodeProperty MACRO_EXPANSION = new ASTNodeProperty(
"IASTTranslationUnit.MACRO_EXPANSION - IASTPreprocessorMacroExpansion node for macro expansions."); //$NON-NLS-1$ "IASTTranslationUnit.MACRO_EXPANSION - IASTPreprocessorMacroExpansion node for macro expansions."); //$NON-NLS-1$
public static interface IDependencyTree {
public static interface IDependencyTree
{
public String getTranslationUnitPath(); public String getTranslationUnitPath();
public static interface IASTInclusionNode public static interface IASTInclusionNode {
{
public IASTPreprocessorIncludeStatement getIncludeDirective(); public IASTPreprocessorIncludeStatement getIncludeDirective();
public IASTInclusionNode [] getNestedInclusions(); public IASTInclusionNode[] getNestedInclusions();
} }
public IASTInclusionNode [] getInclusions(); public IASTInclusionNode[] getInclusions();
} }
/** /**
* Return the dependency tree for the translation unit. * Returns the dependency tree for the translation unit.
* <p> * <p>
* In case the information for a header-file is pulled in from the index, * In case the information for a header-file is pulled in from the index,
* dependencies contained therein are not part of the dependency tree. * dependencies contained therein are not part of the dependency tree.
@ -234,13 +231,12 @@ public interface IASTTranslationUnit extends IASTNode, IASTDeclarationListOwner,
*/ */
public String getContainingFilename(int offset); public String getContainingFilename(int offset);
public ParserLanguage getParserLanguage(); public ParserLanguage getParserLanguage();
/** /**
* Return the Index associated with this translation unit. * Returns the Index associated with this translation unit.
* *
* @return the Index for this translation unit * @return the Index for this translation unit.
*/ */
public IIndex getIndex(); public IIndex getIndex();
@ -254,7 +250,7 @@ public interface IASTTranslationUnit extends IASTNode, IASTDeclarationListOwner,
IIndexFileSet getIndexFileSet(); IIndexFileSet getIndexFileSet();
/** /**
* In case the ast was created in a way that supports comment parsing, * In case the AST was created in a way that supports comment parsing,
* all comments of the translation unit are returned. Otherwise an * all comments of the translation unit are returned. Otherwise an
* empty array will be supplied. * empty array will be supplied.
* *
@ -263,14 +259,13 @@ public interface IASTTranslationUnit extends IASTNode, IASTDeclarationListOwner,
*/ */
public IASTComment[] getComments(); public IASTComment[] getComments();
/** /**
* Returns the linkage this ast was parsed in * Returns the linkage this AST was parsed in.
*/ */
public ILinkage getLinkage(); public ILinkage getLinkage();
/** /**
* Returns whether this ast represents a header file. * Returns whether this AST represents a header file.
*/ */
public boolean isHeaderUnit(); public boolean isHeaderUnit();
@ -283,17 +278,17 @@ public interface IASTTranslationUnit extends IASTNode, IASTDeclarationListOwner,
public INodeFactory getASTNodeFactory(); public INodeFactory getASTNodeFactory();
/** /**
* Set the Index to be used for this translation unit. * Sets the Index to be used for this translation unit.
* @noreference This method is not intended to be referenced by clients. * @noreference This method is not intended to be referenced by clients.
*/ */
public void setIndex(IIndex index); public void setIndex(IIndex index);
/** /**
* Sets whether this ast represents a header file. * Sets whether this AST represents a header file.
* @noreference This method is not intended to be referenced by clients. * @noreference This method is not intended to be referenced by clients.
*/ */
public void setIsHeaderUnit(boolean headerUnit); public void setIsHeaderUnit(boolean headerUnit);
/** /**
* Causes this node and all the nodes rooted at this node to become immutable. * Causes this node and all the nodes rooted at this node to become immutable.
* Once the AST is frozen any calls to set or add methods on any of the nodes * Once the AST is frozen any calls to set or add methods on any of the nodes
@ -303,8 +298,7 @@ public interface IASTTranslationUnit extends IASTNode, IASTDeclarationListOwner,
* @since 5.1 * @since 5.1
*/ */
public void freeze(); public void freeze();
/** /**
* Returns a copy of the AST, however the ILocationResolver * Returns a copy of the AST, however the ILocationResolver
* and the preprocessor nodes are not copied. * and the preprocessor nodes are not copied.