diff options
author | Markus Schorn | 2007-10-19 12:30:52 +0000 |
---|---|---|
committer | Markus Schorn | 2007-10-19 12:30:52 +0000 |
commit | 3381fad4e42665468292fca7bb2c9c6e211b92bf (patch) | |
tree | ef6fe172abf1627ddcf0640ee214d3fb68ee74de /core | |
parent | e27f022a1f67eb8103961372e44c56ac5ed31c33 (diff) | |
download | org.eclipse.cdt-3381fad4e42665468292fca7bb2c9c6e211b92bf.tar.gz org.eclipse.cdt-3381fad4e42665468292fca7bb2c9c6e211b92bf.tar.xz org.eclipse.cdt-3381fad4e42665468292fca7bb2c9c6e211b92bf.zip |
Extends IMacroBinding and the CharArrayUtils, also adding java-doc for some of the API.
Diffstat (limited to 'core')
3 files changed, 54 insertions, 12 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTTranslationUnit.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTTranslationUnit.java index 4d1b0a093eb..e96bd84df13 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTTranslationUnit.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTTranslationUnit.java @@ -132,30 +132,33 @@ public interface IASTTranslationUnit extends IASTNode { public IASTNode selectNodeForLocation(String path, int offset, int length); /** - * Get the macro definitions encountered in parsing this translation unit. - * - * @return <code>IASTPreprocessorMacroDefinition[]</code> + * Get the macro definitions encountered in parsing this translation unit. The result will not contain + * definitions for built-in macros. + * <p> + * In case the information for a header-file is pulled in from the index, + * macro definitions contained therein are not returned. */ public IASTPreprocessorMacroDefinition[] getMacroDefinitions(); /** - * Get builtin macro definitions used when parsing this translation unit. + * Get built-in macro definitions used when parsing this translation unit. * This includes macros obtained from the index. - * - * @return <code>IASTPreprocessorMacroDefinition[]</code> */ public IASTPreprocessorMacroDefinition[] getBuiltinMacroDefinitions(); /** - * Get the #include directives encountered in parsing this translation unit. - * @return <code>IASTPreprocessorIncludeStatement[]</code> + * Get the include directives encountered in parsing this translation unit. This will also contain directives + * used for handling the gcc-options -imacros and -include. + * <p> + * In case the information for a header-file is pulled in from the index, + * include directives contained therein are not returned. */ public IASTPreprocessorIncludeStatement[] getIncludeDirectives(); /** - * Get all preprocessor statements. - * - * @return <code>IASTPreprocessorStatement[]</code> + * Get all preprocessor statements. + * In case the information for a header-file is pulled in from the index, + * preprocessing statements contained therein are not returned. */ public IASTPreprocessorStatement[] getAllPreprocessorStatements(); @@ -205,7 +208,10 @@ public interface IASTTranslationUnit extends IASTNode { } /** - * @return + * Return the dependency tree for the translation unit. + * <p> + * In case the information for a header-file is pulled in from the index, + * dependencies contained therein are not part of the dependency tree. */ public IDependencyTree getDependencyTree(); diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IMacroBinding.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IMacroBinding.java index 38050ee9f4c..07107db4303 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IMacroBinding.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IMacroBinding.java @@ -10,6 +10,22 @@ *******************************************************************************/ package org.eclipse.cdt.core.dom.ast; +/** + * Models bindings for macro names. + * + * <p> This interface is not intended to be implemented by clients. </p> + */ public interface IMacroBinding extends IBinding { + /** + * Returns the expansion of this macro definition. + * @since 5.0 + */ + char[] getExpansion(); + + /** + * Returns <code>true</code> if this is a function-style macro. + * @since 5.0 + */ + boolean isFunctionStyle(); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/CompletionInPreprocessorException.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/CompletionInPreprocessorException.java new file mode 100644 index 00000000000..a8283c6df2c --- /dev/null +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/CompletionInPreprocessorException.java @@ -0,0 +1,20 @@ +/******************************************************************************* + * Copyright (c) 2007 Wind River Systems, Inc. and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Markus Schorn - initial API and implementation + *******************************************************************************/ +package org.eclipse.cdt.core.parser; + +/** + * The exception is thrown when a completion is requested within one of the following constructs: + * <p> character-literal, string-literal, comment, preprocessing directive, macro-expansion. + * @since 5.0 + */ +public class CompletionInPreprocessorException extends Exception { + +} |