1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-09 09:15:38 +02:00

cleaning up some warnings

This commit is contained in:
Mike Kucera 2008-04-09 19:19:13 +00:00
parent 1138185abe
commit 76beb6c750
54 changed files with 153 additions and 925 deletions

View file

@ -66,7 +66,6 @@ public class ASTSignatureUtil {
* TODO Remove this function when done testing if it is no longer needed
*
* @param node
* @return
*/
public static String getNodeSignature(IASTNode node) {
if (node instanceof IASTDeclarator)
@ -1082,9 +1081,7 @@ public class ASTSignatureUtil {
return result;
}
/**
* Returns the same message as {@link IASTProblem#getMessageWithoutLocation()}.
*/
public static String getProblemMessage(int problemID, String detail) {
return ASTProblem.getMessage(problemID, detail);
}

View file

@ -552,7 +552,6 @@ public class ASTTypeUtil {
* Note: false is returned if no isConst() method is found
*
* @param type
* @return
*/
public static boolean isConst(IType type) {
if (type instanceof IQualifierType) {

View file

@ -24,9 +24,6 @@ public interface IASTBuiltinSymbolProvider {
/**
* Returns all of the IBindings corresponding to the IASTBuiltinSymbolProvider.
*
* @param symbol
* @return
*/
public IBinding[] getBuiltinBindings();

View file

@ -21,7 +21,6 @@ public interface IEnumeration extends IBinding, IType {
/**
* returns an array of the IEnumerators declared in this enumeration
* @return
* @throws DOMException
*/
IEnumerator [] getEnumerators() throws DOMException;

View file

@ -19,16 +19,12 @@ import org.eclipse.cdt.core.dom.ast.ASTVisitor;
*/
public abstract class CASTVisitor extends ASTVisitor implements ICASTVisitor {
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.c.ICASTVisitor#visit(org.eclipse.cdt.core.dom.ast.c.ICASTDesignator)
*/
public int visit(ICASTDesignator designator) {
return PROCESS_CONTINUE;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.c.ICASTVisitor#leave(org.eclipse.cdt.core.dom.ast.c.ICASTDesignator)
*/
public int leave(ICASTDesignator designator) {
return PROCESS_CONTINUE;
}

View file

@ -21,44 +21,26 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompositeTypeSpecifier.ICPPASTBas
*/
public abstract class CPPASTVisitor extends ASTVisitor implements ICPPASTVisitor {
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPASTVisitor#visit(org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompositeTypeSpecifier.ICPPASTBaseSpecifier)
*/
public int visit(ICPPASTBaseSpecifier baseSpecifier) {
return PROCESS_CONTINUE;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPASTVisitor#visit(org.eclipse.cdt.core.dom.ast.cpp.ICPPASTNamespaceDefinition)
*/
public int visit(ICPPASTNamespaceDefinition namespaceDefinition) {
return PROCESS_CONTINUE;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPASTVisitor#visit(org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTemplateParameter)
*/
public int visit(ICPPASTTemplateParameter templateParameter) {
return PROCESS_CONTINUE;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPASTVisitor#leave(org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompositeTypeSpecifier.ICPPASTBaseSpecifier)
*/
public int leave(ICPPASTBaseSpecifier baseSpecifier) {
return PROCESS_CONTINUE;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPASTVisitor#leave(org.eclipse.cdt.core.dom.ast.cpp.ICPPASTNamespaceDefinition)
*/
public int leave(ICPPASTNamespaceDefinition namespaceDefinition) {
return PROCESS_CONTINUE;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPASTVisitor#leave(org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTemplateParameter)
*/
public int leave(ICPPASTTemplateParameter templateParameter) {
return PROCESS_CONTINUE;
}

View file

@ -47,9 +47,10 @@ import org.eclipse.core.runtime.CoreException;
* for the DOM parser framework.
*
* This class uses the template method pattern, derived classes need only implement
* {@link getScannerExtensionConfiguration()},
* {@link getParserLanguage()} and
* {@link createParser()}.
* {@link AbstractCLikeLanguage#getScannerExtensionConfiguration()},
* {@link AbstractCLikeLanguage#getParserLanguage()} and
* {@link AbstractCLikeLanguage#createParser(IScanner scanner, ParserMode parserMode,
* IParserLogService logService, IIndex index)}.
*
* <p>
* <strong>EXPERIMENTAL</strong>. This class or interface has been added as

View file

@ -104,7 +104,6 @@ public abstract class AbstractScannerExtensionConfiguration implements IScannerE
/**
* Helper method to add a function style macro to the given map.
*
* @param macros the macro map
* @param name the macro name
* @param value the macro value
* @param arguments the macro arguments

View file

@ -45,7 +45,7 @@ public interface IScannerExtensionConfiguration {
/**
* Support for GNU extension "Dollar Signs in Identifier Names".
*
* @see http://gcc.gnu.org/onlinedocs/gcc/Dollar-Signs.html
* @see "http://gcc.gnu.org/onlinedocs/gcc/Dollar-Signs.html"
* @return <code>true</code>, if $ should be supported in identifiers
*/
public boolean support$InIdentifiers();
@ -54,7 +54,7 @@ public interface IScannerExtensionConfiguration {
* Support for (deprecated) GNU minimum and maximum operators (<code>&lt;?</code>
* and <code>&gt;?</code>).
*
* @see http://gcc.gnu.org/onlinedocs/gcc/Deprecated-Features.html
* @see "http://gcc.gnu.org/onlinedocs/gcc/Deprecated-Features.html"
* @return <code>true</code> if support for the extension should be
* enabled
*/
@ -64,7 +64,7 @@ public interface IScannerExtensionConfiguration {
* Support for additional numeric literal suffix characters, like e.g. 'i'
* and 'j' for GNU Complex number literals.
*
* @see http://gcc.gnu.org/onlinedocs/gcc/Complex.html
* @see "http://gcc.gnu.org/onlinedocs/gcc/Complex.html"
* @return an array of chars or <code>null</code>, if no additional
* suffixes should be allowed
*/

View file

@ -28,7 +28,7 @@ import org.eclipse.cdt.core.dom.parser.IBuiltinBindingsProvider;
* with the CDT team.
* </p>
*
* @see http://gcc.gnu.org/onlinedocs/gcc/C-Extensions.html
* @see "http://gcc.gnu.org/onlinedocs/gcc/C-Extensions.html"
*
* @author jcamelon
* @since 4.0
@ -38,7 +38,7 @@ public interface ICParserExtensionConfiguration {
/**
* Support for GNU extension "Statements and Declarations in Expressions".
*
* @see http://gcc.gnu.org/onlinedocs/gcc/Statement-Exprs.html
* @see "http://gcc.gnu.org/onlinedocs/gcc/Statement-Exprs.html"
* @return <code>true</code> if support for the extension should be
* enabled
*/
@ -47,7 +47,7 @@ public interface ICParserExtensionConfiguration {
/**
* Support for GNU extension "Designated Initializers".
*
* @see http://gcc.gnu.org/onlinedocs/gcc/Designated-Inits.html
* @see "http://gcc.gnu.org/onlinedocs/gcc/Designated-Inits.html"
* @return <code>true</code> if support for the extension should be
* enabled
*/
@ -56,7 +56,7 @@ public interface ICParserExtensionConfiguration {
/**
* Support for GNU extension "Referring to a Type with typeof".
*
* @see http://gcc.gnu.org/onlinedocs/gcc/Typeof.html
* @see "http://gcc.gnu.org/onlinedocs/gcc/Typeof.html"
* @return <code>true</code> if support for the extension should be
* enabled
*/
@ -65,7 +65,7 @@ public interface ICParserExtensionConfiguration {
/**
* Support for GNU extension "Inquiring on Alignment of Types or Variables".
*
* @see http://gcc.gnu.org/onlinedocs/gcc/Alignment.html
* @see "http://gcc.gnu.org/onlinedocs/gcc/Alignment.html"
* @return <code>true</code> if support for the extension should be
* enabled
*/

View file

@ -29,8 +29,8 @@ import org.eclipse.cdt.core.dom.parser.IScannerExtensionConfiguration;
* with the CDT team.
* </p>
*
* @see http://gcc.gnu.org/onlinedocs/gcc/C-Extensions.html
* @see http://gcc.gnu.org/onlinedocs/gcc/C_002b_002b-Extensions.html
* @see "http://gcc.gnu.org/onlinedocs/gcc/C-Extensions.html"
* @see "http://gcc.gnu.org/onlinedocs/gcc/C_002b_002b-Extensions.html"
*
* @author jcamelon
* @since 4.0
@ -40,7 +40,7 @@ public interface ICPPParserExtensionConfiguration {
/**
* Support for GNU extension "Restricting Pointer Aliasing".
*
* @see http://gcc.gnu.org/onlinedocs/gcc/Restricted-Pointers.html
* @see "http://gcc.gnu.org/onlinedocs/gcc/Restricted-Pointers.html"
* @return <code>true</code> if support for the extension should be
* enabled
*/
@ -49,7 +49,7 @@ public interface ICPPParserExtensionConfiguration {
/**
* Support for GNU extension "Extended Syntax for Template Instantiation".
*
* @see http://gcc.gnu.org/onlinedocs/gcc/Template-Instantiation.html
* @see "http://gcc.gnu.org/onlinedocs/gcc/Template-Instantiation.html"
* @return <code>true</code> if support for the extension should be
* enabled
*/
@ -61,7 +61,7 @@ public interface ICPPParserExtensionConfiguration {
* also be enabled.
*
* @see IScannerExtensionConfiguration
* @see http://gcc.gnu.org/onlinedocs/gcc/Deprecated-Features.html
* @see "http://gcc.gnu.org/onlinedocs/gcc/Deprecated-Features.html"
* @return <code>true</code> if support for the extension should be
* enabled
*/
@ -70,7 +70,7 @@ public interface ICPPParserExtensionConfiguration {
/**
* Support for GNU extension "Data types for complex numbers".
*
* @see http://gcc.gnu.org/onlinedocs/gcc/Complex.html#Complex
* @see "http://gcc.gnu.org/onlinedocs/gcc/Complex.html#Complex"
* @return <code>true</code> if support for the extension should be
* enabled
*/
@ -87,7 +87,7 @@ public interface ICPPParserExtensionConfiguration {
/**
* Support for GNU long long types.
*
* @see http://gcc.gnu.org/onlinedocs/gcc/Long-Long.html
* @see "http://gcc.gnu.org/onlinedocs/gcc/Long-Long.html"
* @return <code>true</code> if support for the extension should be
* enabled
*/
@ -96,7 +96,7 @@ public interface ICPPParserExtensionConfiguration {
/**
* Support for GNU extension "Statements and Declarations in Expressions".
*
* @see http://gcc.gnu.org/onlinedocs/gcc/Statement-Exprs.html
* @see "http://gcc.gnu.org/onlinedocs/gcc/Statement-Exprs.html"
* @return <code>true</code> if support for the extension should be
* enabled
*/
@ -105,7 +105,7 @@ public interface ICPPParserExtensionConfiguration {
/**
* Support for GNU extension "Referring to a Type with typeof".
*
* @see http://gcc.gnu.org/onlinedocs/gcc/Typeof.html
* @see "http://gcc.gnu.org/onlinedocs/gcc/Typeof.html"
* @return <code>true</code> if support for the extension should be
* enabled
*/
@ -114,7 +114,7 @@ public interface ICPPParserExtensionConfiguration {
/**
* Support for GNU extension "Inquiring on Alignment of Types or Variables".
*
* @see http://gcc.gnu.org/onlinedocs/gcc/Alignment.html
* @see "http://gcc.gnu.org/onlinedocs/gcc/Alignment.html"
* @return <code>true</code> if support for the extension should be
* enabled
*/
@ -131,9 +131,8 @@ public interface ICPPParserExtensionConfiguration {
* See http://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html for more
* information on GCC's Other Built-in Symbols.
*
* @return <code>true</code> if support for the extension should be
* enabled
* @deprecated use {@link #getBuiltinSymbolProvider(IScope)} instead.
* @return <code>true</code> if support for the extension should be enabled
* @deprecated use {@link #getBuiltinBindingsProvider()} instead.
*/
@Deprecated
public boolean supportGCCOtherBuiltinSymbols();

View file

@ -180,7 +180,6 @@ public interface IIndexManager extends IPDOMManager {
/**
* Clears the entire index of the project and schedules the indexer.
* @throws CoreException
* @since 4.0
*/
public void reindex(ICProject project);

View file

@ -57,7 +57,6 @@ public class IndexLocationFactory {
/**
* Returns the absolute file path of an URI or null if the
* URI is not a filesystem path.
* @param uri
* @return the absolute file path of an URI or null if the
* URI is not a filesystem path.
*/
@ -92,12 +91,11 @@ public class IndexLocationFactory {
IFile[] files = ResourcesPlugin.getWorkspace().getRoot().findFilesForLocation(new Path(absolutePath));
if(files.length==1) {
return getWorkspaceIFL(files[0]);
} else {
if(cproject!=null) {
for(int i=0; i<files.length; i++) {
if(files[i].getProject().equals(cproject.getProject()))
return getWorkspaceIFL(files[i]);
}
}
if(cproject!=null) {
for(int i=0; i<files.length; i++) {
if(files[i].getProject().equals(cproject.getProject()))
return getWorkspaceIFL(files[i]);
}
}
return new IndexFileLocation(URIUtil.toURI(absolutePath), null);
@ -148,13 +146,11 @@ public class IndexLocationFactory {
IResource res = tu.getResource();
if(res instanceof IFile) {
return getWorkspaceIFL((IFile)res);
} else {
IPath location = tu.getLocation();
if(location!=null) {
return getExternalIFL(location);
} else {
return null;
}
}
IPath location = tu.getLocation();
if(location!=null) {
return getExternalIFL(location);
}
return null;
}
}

View file

@ -79,7 +79,6 @@ public abstract class AbstractExportProjectProvider implements IExportProjectPro
/**
* @param option
* @return the list of parameters given with this option
* @throws CoreException
*/
public List<String> getParameters(String option) {
return arguments.get(option);
@ -100,7 +99,6 @@ public abstract class AbstractExportProjectProvider implements IExportProjectPro
* user.
* @param option
* @param expected the number of parameters expected
* @return
* @throws CoreException
*/
public List<String> getParameters(String option, int expected) throws CoreException {

View file

@ -54,7 +54,7 @@ import org.eclipse.core.runtime.Path;
* <li>-id the id to write to the produce fragment
* </ul>
*/
public class ExternalExportProjectProvider extends AbstractExportProjectProvider implements IExportProjectProvider {
public class ExternalExportProjectProvider extends AbstractExportProjectProvider {
private static final String PREBUILT_PROJECT_OWNER = "org.eclipse.cdt.core.index.export.prebuiltOwner"; //$NON-NLS-1$
private static final String ORG_ECLIPSE_CDT_CORE_INDEX_EXPORT_DATESTAMP = "org.eclipse.cdt.core.index.export.datestamp"; //$NON-NLS-1$
private static final String CONTENT = "content"; //$NON-NLS-1$

View file

@ -44,7 +44,6 @@ public interface IExportProjectProvider {
* Creates, configures and returns a project for the indexer to index. This routine should
* not itself index the project, as a reindex will be performed by the framework.
* May not return null.
* @return
*/
public ICProject createProject() throws CoreException;
@ -52,7 +51,6 @@ public interface IExportProjectProvider {
* The location converter to use on export. This converter will be called to convert
* IIndexFileLocation's to an external form. The external form is implementation dependent.
* @param cproject
* @return
* @see URIRelativeLocationConverter
* @see ResourceContainerRelativeLocationConverter
*/

View file

@ -27,7 +27,6 @@ public interface IIndexProvider {
* The method will only be called once per project per eclipse session. This method will be called when a project is deleted
* and a new project of the same name added. It also may be called lazily (at the point of first logical index use).
* @param project
* @return
*/
public boolean providesFor(ICProject project) throws CoreException;
}

View file

@ -13,6 +13,7 @@ package org.eclipse.cdt.core.parser;
import java.util.Map;
import org.eclipse.cdt.core.dom.ast.IASTName;
import org.eclipse.cdt.core.dom.ast.IMacroBinding;
import org.eclipse.cdt.internal.core.parser.scanner.ILocationResolver;
import org.eclipse.cdt.internal.core.parser.scanner.Lexer;
@ -41,7 +42,7 @@ public interface IScanner {
/**
* Turns on/off creation of image locations.
* @see IASTName#getImageLocation().
* @see IASTName#getImageLocation()
* @since 5.0
*/
public void setComputeImageLocations(boolean val);

View file

@ -21,13 +21,8 @@ import org.eclipse.cdt.core.dom.ast.IASTNode;
* @author jcamelon
*/
public interface ITokenDuple {
/**
* @return
*/
public abstract IToken getFirstToken();
/**
* @return
*/
public abstract IToken getLastToken();
public List<IASTNode>[] getTemplateIdArgLists();

View file

@ -18,7 +18,7 @@ package org.eclipse.cdt.core.parser;
* <p>
* {@link #ORIGIN_LEXER}: char-literal, string-literal, number-literal, header-name.
* <p>
* {@link #ORIGIN_PREPROCESSOR}: preprocessor-directive.
* {@link #ORIGIN_PREPROCESSOR_DIRECTIVE}: preprocessor-directive.
* <p>
* {@link #ORIGIN_INACTIVE_CODE}: within an inactive branch of conditional compilation.
* <p>

View file

@ -332,14 +332,6 @@ public class ASTPrinter {
ASTPrinter.print(out, indentLevel, binding);
}
@Override
public int visit(IASTComment comment) {
print(comment);
indentLevel++;
return super.visit(comment);
}
@Override
public int visit(ICASTDesignator designator) {
print(designator);
@ -450,11 +442,6 @@ public class ASTPrinter {
return super.visit(typeId);
}
@Override
public int leave(IASTComment comment) {
indentLevel--;
return super.leave(comment);
}
@Override
public int leave(ICASTDesignator designator) {

View file

@ -26,7 +26,7 @@ public class ArrayUtil {
* If the array is null or not large enough, a larger one is allocated, using
* the given class object.
*/
static public Object [] append( Class c, Object[] array, Object obj ){
static public Object [] append( Class<?> c, Object[] array, Object obj ){
if( obj == null )
return array;
if( array == null || array.length == 0){
@ -74,7 +74,7 @@ public class ArrayUtil {
* Appends object using the current length of the array.
* @since 4.0
*/
static public Object [] append(Class c, Object[] array, int currentLength, Object obj ){
static public Object [] append(Class<?> c, Object[] array, int currentLength, Object obj ){
if( obj == null )
return array;
if( array == null || array.length == 0){
@ -108,12 +108,11 @@ public class ArrayUtil {
* if forceNew == false, a new array will only be created if the original array
* contained null entries.
*
* @param Class c: the type of the new array
* @param Object [] array, the array to be trimmed
* @param c the type of the new array
* @param array the array to be trimmed
* @param forceNew
* @return
*/
static public Object [] trim( Class c, Object [] array, boolean forceNew ){
static public Object [] trim( Class<?> c, Object [] array, boolean forceNew ){
if( array == null )
return (Object[]) Array.newInstance( c, 0 );
@ -133,19 +132,15 @@ public class ArrayUtil {
return temp;
}
/**
* @param class1
* @param fields
* @return
*/
public static Object[] trim( Class c, Object[] array ) {
public static Object[] trim( Class<?> c, Object[] array ) {
return trim( c, array, false );
}
/**
* Assumes that both arrays contain nulls at the end, only.
*/
public static Object[] addAll( Class c, Object[] dest, Object[] source ) {
public static Object[] addAll( Class<?> c, Object[] dest, Object[] source ) {
if( source == null || source.length == 0 )
return dest;
@ -224,8 +219,8 @@ public class ArrayUtil {
* Assumes that array contains nulls at the end, only.
* Returns the index into the specified array of the specified object, or -1 if the array does not
* contain the object, or if the array is null. Comparison is by equals().
* @param array the array to search
* @param obj the object to search for
* @param comments the array to search
* @param comment the object to search for
* @return the index into the specified array of the specified object, or -1 if the array does not
* contain an equal object, or if the array is null
*/
@ -251,7 +246,7 @@ public class ArrayUtil {
* If there are no nulls in the original array then the original
* array is returned.
*/
public static Object[] removeNulls(Class c, Object[] array) {
public static Object[] removeNulls(Class<?> c, Object[] array) {
if( array == null )
return (Object[]) Array.newInstance( c, 0 );
@ -279,9 +274,8 @@ public class ArrayUtil {
* and all of the nulls are at the end of the array.
* The position of the last non-null element in the array must also be known.
*
* @return
*/
public static Object[] removeNullsAfter(Class c, Object[] array, int index) {
public static Object[] removeNullsAfter(Class<?> c, Object[] array, int index) {
if( array == null || index < 0)
return (Object[]) Array.newInstance( c, 0 );
@ -299,7 +293,7 @@ public class ArrayUtil {
* Insert the obj at the beginning of the array, shifting the whole thing one index
* Assumes that array contains nulls at the end, only.
*/
public static Object[] prepend(Class c, Object[] array, Object obj) {
public static Object[] prepend(Class<?> c, Object[] array, Object obj) {
if( obj == null )
return array;
if( array == null || array.length == 0){

View file

@ -42,11 +42,6 @@ public class BacktrackException extends Exception {
return problem;
}
/**
* @param startingOffset
* @param endingOffset
* @param f TODO
*/
public void initialize(int start, int l ) {
reset();
offset = start;

View file

@ -35,14 +35,13 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTFunctionDeclarator;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTFunctionTryBlockDeclarator;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTNamespaceDefinition;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTemplateParameter;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTVisitor;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompositeTypeSpecifier.ICPPASTBaseSpecifier;
/**
* Visitor to search for nodes by file offsets.
* @since 5.0
*/
public class FindNodeForOffsetAction extends CPPASTVisitor implements ICASTVisitor, ICPPASTVisitor {
public class FindNodeForOffsetAction extends CPPASTVisitor implements ICASTVisitor {
private final ASTNodeSpecification<?> fNodeSpec;
public FindNodeForOffsetAction(ASTNodeSpecification<?> nodeSpec) {
@ -180,16 +179,10 @@ public class FindNodeForOffsetAction extends CPPASTVisitor implements ICASTVisit
return processNode(problem);
}
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.dom.parser.c.CVisitor.CBaseVisitorAction#processDesignator(org.eclipse.cdt.core.dom.ast.c.ICASTDesignator)
*/
public int visit(ICASTDesignator designator) {
return processNode(designator);
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.c.ICASTVisitor#leave(org.eclipse.cdt.core.dom.ast.c.ICASTDesignator)
*/
public int leave(ICASTDesignator designator) {
return PROCESS_CONTINUE;
}

View file

@ -124,9 +124,6 @@ public class CArrayType implements ICArrayType, ITypeContainer {
return t;
}
/**
* @return
*/
public ICASTArrayModifier getModifier() {
return mod;
}

View file

@ -16,7 +16,6 @@ package org.eclipse.cdt.internal.core.dom.parser.c;
import org.eclipse.cdt.core.dom.ast.IASTName;
import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
import org.eclipse.cdt.core.dom.ast.IFunction;
import org.eclipse.cdt.core.dom.ast.IFunctionType;
import org.eclipse.cdt.core.dom.ast.IScope;
import org.eclipse.cdt.core.dom.ast.IType;
@ -27,7 +26,7 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPSemantics;
/**
* @author aniefer
*/
public class CExternalFunction extends CFunction implements IFunction, ICExternalBinding {
public class CExternalFunction extends CFunction implements ICExternalBinding {
private IASTName name = null;
private IASTTranslationUnit tu = null;
@ -37,9 +36,7 @@ public class CExternalFunction extends CFunction implements IFunction, ICExterna
this.tu = tu;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IFunction#getType()
*/
@Override
public IFunctionType getType() {
IFunctionType t = super.getType();
@ -54,33 +51,21 @@ public class CExternalFunction extends CFunction implements IFunction, ICExterna
return tu;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getName()
*/
@Override
public String getName() {
return name.toString();
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getNameCharArray()
*/
@Override
public char[] getNameCharArray() {
return name.toCharArray();
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getScope()
*/
@Override
public IScope getScope() {
return tu.getScope();
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IFunction#isExtern()
*/
@Override
public boolean isExtern() {
return true;

View file

@ -77,23 +77,22 @@ public class CFunction extends PlatformObject implements IFunction, ICInternalFu
updateParameterBindings( fnDeclarator );
definition = fnDeclarator;
return;
} else {
updateParameterBindings( fnDeclarator );
if( declarators == null ){
declarators = new IASTStandardFunctionDeclarator[] { (IASTStandardFunctionDeclarator) fnDeclarator };
return;
}
for( int i = 0; i < declarators.length; i++ ){
if( declarators[i] == null ){
declarators[i] = (IASTStandardFunctionDeclarator) fnDeclarator;
return;
}
}
IASTStandardFunctionDeclarator tmp [] = new IASTStandardFunctionDeclarator [ declarators.length * 2 ];
System.arraycopy( declarators, 0, tmp, 0, declarators.length );
tmp[ declarators.length ] = (IASTStandardFunctionDeclarator) fnDeclarator;
declarators = tmp;
}
updateParameterBindings( fnDeclarator );
if( declarators == null ){
declarators = new IASTStandardFunctionDeclarator[] { (IASTStandardFunctionDeclarator) fnDeclarator };
return;
}
for( int i = 0; i < declarators.length; i++ ){
if( declarators[i] == null ){
declarators[i] = (IASTStandardFunctionDeclarator) fnDeclarator;
return;
}
}
IASTStandardFunctionDeclarator tmp [] = new IASTStandardFunctionDeclarator [ declarators.length * 2 ];
System.arraycopy( declarators, 0, tmp, 0, declarators.length );
tmp[ declarators.length ] = (IASTStandardFunctionDeclarator) fnDeclarator;
declarators = tmp;
}
protected IASTTranslationUnit getTranslationUnit() {
@ -374,9 +373,7 @@ public class CFunction extends PlatformObject implements IFunction, ICInternalFu
return false;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IFunction#isExtern()
*/
public boolean isExtern() {
return isExtern(true);
}
@ -388,9 +385,7 @@ public class CFunction extends PlatformObject implements IFunction, ICInternalFu
return hasStorageClass( IASTDeclSpecifier.sc_extern);
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IFunction#isAuto()
*/
public boolean isAuto() {
if( (bits & FULLY_RESOLVED) == 0 ){
resolveAllDeclarations();
@ -398,9 +393,7 @@ public class CFunction extends PlatformObject implements IFunction, ICInternalFu
return hasStorageClass( IASTDeclSpecifier.sc_auto);
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IFunction#isRegister()
*/
public boolean isRegister() {
if( (bits & FULLY_RESOLVED) == 0 ){
resolveAllDeclarations();
@ -408,9 +401,7 @@ public class CFunction extends PlatformObject implements IFunction, ICInternalFu
return hasStorageClass( IASTDeclSpecifier.sc_register);
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IFunction#isInline()
*/
public boolean isInline() {
if( (bits & FULLY_RESOLVED) == 0 ){
resolveAllDeclarations();
@ -442,9 +433,7 @@ public class CFunction extends PlatformObject implements IFunction, ICInternalFu
return false;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IFunction#takesVarArgs()
*/
public boolean takesVarArgs() {
if( (bits & FULLY_RESOLVED) == 0 ){
resolveAllDeclarations();

View file

@ -10,7 +10,6 @@
*******************************************************************************/
package org.eclipse.cdt.internal.core.dom.parser.c;
import org.eclipse.cdt.core.dom.ast.IFunction;
import org.eclipse.cdt.core.dom.ast.IFunctionType;
import org.eclipse.cdt.core.dom.ast.IParameter;
import org.eclipse.cdt.core.dom.ast.IScope;
@ -23,7 +22,7 @@ import org.eclipse.cdt.core.dom.ast.IScope;
*
* @author dsteffle
*/
public class CImplicitFunction extends CExternalFunction implements IFunction, ICInternalBinding {
public class CImplicitFunction extends CExternalFunction {
private IParameter[] parms=null;
private IScope scope=null;
@ -39,55 +38,32 @@ public class CImplicitFunction extends CExternalFunction implements IFunction, I
this.takesVarArgs=takesVarArgs;
}
/*
* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IFunction#getParameters()
*/
@Override
public IParameter[] getParameters() {
return parms;
}
/*
* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IFunction#getType()
*/
@Override
public IFunctionType getType() {
return type;
}
/*
* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IFunction#takesVarArgs()
*/
@Override
public boolean takesVarArgs() {
return takesVarArgs;
}
/*
* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getName()
*/
@Override
public String getName() {
return String.valueOf(name);
}
/*
* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getNameCharArray()
*/
@Override
public char[] getNameCharArray() {
return name;
}
/*
* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getScope()
*/
@Override
public IScope getScope() {
return scope;

View file

@ -13,7 +13,6 @@ package org.eclipse.cdt.internal.core.dom.parser.c;
import org.eclipse.cdt.core.dom.ast.IASTNode;
import org.eclipse.cdt.core.dom.ast.IScope;
import org.eclipse.cdt.core.dom.ast.IType;
import org.eclipse.cdt.core.dom.ast.ITypedef;
/**
* The CImplicitTypedef is used to represent implicit typedefs that exist on the translation
@ -23,7 +22,7 @@ import org.eclipse.cdt.core.dom.ast.ITypedef;
*
* @author dsteffle
*/
public class CImplicitTypedef extends CTypedef implements ITypedef, ICInternalBinding {
public class CImplicitTypedef extends CTypedef {
private IType type=null;
private char[] name=null;
private IScope scope=null;
@ -35,33 +34,21 @@ public class CImplicitTypedef extends CTypedef implements ITypedef, ICInternalBi
this.scope = scope;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.ITypedef#getType()
*/
@Override
public IType getType() {
return type;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getName()
*/
@Override
public String getName() {
return String.valueOf(name);
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getNameCharArray()
*/
@Override
public char[] getNameCharArray() {
return name;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getScope()
*/
@Override
public IScope getScope() {
return scope;
@ -100,10 +87,6 @@ public class CImplicitTypedef extends CTypedef implements ITypedef, ICInternalBi
// return t;
// }
/**
* returns null
* @return
*/
@Override
public IASTNode getPhysicalNode() {
return null;

View file

@ -34,8 +34,6 @@ public class CQualifierType implements ICQualifierType, ITypeContainer {
/**
* CQualifierType has an IBasicType to keep track of the basic type information.
*
* @param type the CQualifierType's IBasicType
*/
public CQualifierType(ICASTDeclSpecifier declSpec) {
this.type = resolveType( declSpec );

View file

@ -289,7 +289,7 @@ public class CVisitor {
parent = parent.getParent();
if ( parent instanceof IASTDeclaration ) {
if ( parent != null && parent instanceof IASTFunctionDefinition ) {
if ( parent instanceof IASTFunctionDefinition ) {
if ( declarator.getName() != null && declarator.getName().resolveBinding() == binding ) {
addName(declarator.getName());
}
@ -895,7 +895,6 @@ public class CVisitor {
try {
binding = ( scope != null ) ? scope.getBinding( name, false ) : null;
} catch ( DOMException e1 ) {
binding = null;
}
if( parent instanceof IASTParameterDeclaration || parent.getPropertyInParent() == ICASTKnRFunctionDeclarator.FUNCTION_PARAMETER ){
@ -1030,8 +1029,7 @@ public class CVisitor {
return new ProblemBinding( node, IProblemBinding.SEMANTIC_NAME_NOT_FOUND, name.toCharArray());
if( binding instanceof IType )
return binding;
else if( binding != null )
return new ProblemBinding( node, IProblemBinding.SEMANTIC_INVALID_TYPE, binding.getNameCharArray() );
return new ProblemBinding( node, IProblemBinding.SEMANTIC_INVALID_TYPE, binding.getNameCharArray() );
} catch ( DOMException e ) {
return null;
}
@ -1272,7 +1270,6 @@ public class CVisitor {
// The index will be search later, still we need to look at the declarations found in
// the AST, bug 180883
nodes = translation.getDeclarations();
scope = null;
}
} else if( parent instanceof IASTStandardFunctionDeclarator ){
IASTStandardFunctionDeclarator dtor = (IASTStandardFunctionDeclarator) parent;
@ -1314,7 +1311,7 @@ public class CVisitor {
boolean reachedBlockItem = false;
if( nodes != null ){
int idx = -1;
IASTNode node = ( nodes != null ? (nodes.length > 0 ? nodes[++idx] : null ) : parent );
IASTNode node = nodes.length > 0 ? nodes[++idx] : null;
while( node != null ) {
Object candidate = null;
try {
@ -1418,8 +1415,7 @@ public class CVisitor {
if( blockItem != null) {
if (binding == null)
return externalBinding( (IASTTranslationUnit) blockItem, name );
else
return binding;
return binding;
}
return null;
}
@ -1785,11 +1781,10 @@ public class CVisitor {
* behaviour and is used as the foundation of the ITypes being created.
* The parameter isParm is used to specify whether the declarator is a parameter or not.
*
* @param declarator the IASTDeclarator whose base IType will be created
* @param declSpec the IASTDeclSpecifier used to determine if the base type is a CQualifierType or not
* @param isParm is used to specify whether the IASTDeclarator is a parameter of a declaration
* @return the base IType
*/
@SuppressWarnings("null")
public static IType createBaseType( IASTDeclSpecifier declSpec ) {
if( declSpec instanceof IGCCASTSimpleDeclSpecifier ){
IASTExpression exp = ((IGCCASTSimpleDeclSpecifier)declSpec).getTypeofExpression();
@ -1968,23 +1963,14 @@ public class CVisitor {
return action.getDeclarationNames();
}
/**
* @param unit
* @param binding
* @return
*/
public static IASTName[] getReferences(IASTTranslationUnit tu, IBinding binding) {
CollectReferencesAction action = new CollectReferencesAction( binding );
tu.accept(action);
return action.getReferences();
}
/**
* @param startingPoint
* @param name
* @return
* @throws DOMException
*/
public static IBinding findTypeBinding(IASTNode startingPoint, IASTName name) throws DOMException {
if( startingPoint instanceof IASTTranslationUnit )
{
@ -2084,7 +2070,7 @@ public class CVisitor {
scope = scope.getParent();
} while( scope != null );
int c = (b1 == null ? 0 : b1.length) + (b2 == null ? 0 :b2.length) + (b3 == null ? 0 : b3.size());
int c = (b1 == null ? 0 : b1.length) + (b2 == null ? 0 : b2.length) + b3.size();
IBinding [] result = new IBinding [c];
@ -2094,8 +2080,7 @@ public class CVisitor {
if (b2 != null)
ArrayUtil.addAll(IBinding.class, result, b2);
if (b3 != null)
ArrayUtil.addAll(IBinding.class, result, b3.toArray(new IBinding[b3.size()]));
ArrayUtil.addAll(IBinding.class, result, b3.toArray(new IBinding[b3.size()]));
return result;
}

View file

@ -13,14 +13,13 @@ package org.eclipse.cdt.internal.core.dom.parser.cpp;
import org.eclipse.cdt.core.dom.ast.ASTVisitor;
import org.eclipse.cdt.core.dom.ast.IASTEnumerationSpecifier;
import org.eclipse.cdt.core.dom.ast.IASTName;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTDeclSpecifier;
import org.eclipse.cdt.core.parser.util.ArrayUtil;
/**
* @author jcamelon
*/
public class CPPASTEnumerationSpecifier extends CPPASTBaseDeclSpecifier
implements IASTEnumerationSpecifier, ICPPASTDeclSpecifier {
implements IASTEnumerationSpecifier {
private IASTName name;

View file

@ -37,21 +37,15 @@ import org.eclipse.cdt.internal.core.index.IIndexType;
/**
* @author aniefer
*/
public class CPPClassInstance extends CPPInstance implements ICPPClassType, ICPPInternalBinding {
public class CPPClassInstance extends CPPInstance implements ICPPClassType {
private CPPClassSpecializationScope instanceScope;
/**
* @param decl
* @param args
* @param arguments
*/
public CPPClassInstance(ICPPScope scope, IBinding decl, ObjectMap argMap, IType[] args) {
super(scope, decl, argMap, args);
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType#getBases()
*/
public ICPPBase[] getBases() throws DOMException {
ICPPClassType cls = (ICPPClassType) getSpecializedBinding();
if (cls != null) {
@ -74,44 +68,26 @@ public class CPPClassInstance extends CPPInstance implements ICPPClassType, ICPP
return ICPPBase.EMPTY_BASE_ARRAY;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.ICompositeType#getFields()
*/
public IField[] getFields() throws DOMException {
return null;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.ICompositeType#findField(java.lang.String)
*/
public IField findField(String name) throws DOMException {
return null;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType#getDeclaredFields()
*/
public ICPPField[] getDeclaredFields() throws DOMException {
return null;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType#getMethods()
*/
public ICPPMethod[] getMethods() throws DOMException {
return null;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType#getAllDeclaredMethods()
*/
public ICPPMethod[] getAllDeclaredMethods() throws DOMException {
return null;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType#getDeclaredMethods()
*/
public ICPPMethod[] getDeclaredMethods() throws DOMException {
CPPClassSpecializationScope scope = (CPPClassSpecializationScope) getCompositeScope();
if (scope.isFullyCached())
@ -119,9 +95,6 @@ public class CPPClassInstance extends CPPInstance implements ICPPClassType, ICPP
return ICPPMethod.EMPTY_CPPMETHOD_ARRAY;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType#getConstructors()
*/
public ICPPConstructor[] getConstructors() throws DOMException {
CPPClassSpecializationScope scope = (CPPClassSpecializationScope) getCompositeScope();
if (scope.isFullyCached())
@ -129,23 +102,14 @@ public class CPPClassInstance extends CPPInstance implements ICPPClassType, ICPP
return ICPPConstructor.EMPTY_CONSTRUCTOR_ARRAY;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType#getFriends()
*/
public IBinding[] getFriends() throws DOMException {
return null;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.ICompositeType#getKey()
*/
public int getKey() throws DOMException {
return ((ICPPClassType) getSpecializedBinding()).getKey();
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.ICompositeType#getCompositeScope()
*/
public IScope getCompositeScope() {
if (instanceScope == null) {
instanceScope = new CPPClassSpecializationScope(this);
@ -153,17 +117,11 @@ public class CPPClassInstance extends CPPInstance implements ICPPClassType, ICPP
return instanceScope;
}
/* (non-Javadoc)
* @see java.lang.Object#clone()
*/
@Override
public Object clone() {
return this;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IType#isSameType(org.eclipse.cdt.core.dom.ast.IType)
*/
public boolean isSameType(IType type) {
if (type == this)
return true;

View file

@ -43,9 +43,7 @@ public class CPPClassSpecializationScope implements ICPPClassScope, IASTInternal
private ObjectMap instanceMap = ObjectMap.EMPTY_MAP;
final private ICPPSpecialization specialization;
/**
* @param instance
*/
public CPPClassSpecializationScope(ICPPSpecialization specialization) {
this.specialization = specialization;
}
@ -122,24 +120,15 @@ public class CPPClassSpecializationScope implements ICPPClassScope, IASTInternal
return (IBinding[]) ArrayUtil.trim(IBinding.class, result);
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPClassScope#getClassType()
*/
public ICPPClassType getClassType() {
return (ICPPClassType) specialization;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPClassScope#getImplicitMethods()
*/
public ICPPMethod[] getImplicitMethods() {
// Implicit methods shouldn't have implicit specializations
return ICPPMethod.EMPTY_CPPMETHOD_ARRAY;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPScope#getScopeName()
*/
public IName getScopeName() {
if (specialization instanceof ICPPInternalBinding)
return (IASTName) ((ICPPInternalBinding)specialization).getDefinition();
@ -173,9 +162,6 @@ public class CPPClassSpecializationScope implements ICPPClassScope, IASTInternal
return (ICPPMethod[]) ArrayUtil.trim(ICPPMethod.class, specs);
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IScope#getParent()
*/
public IScope getParent() throws DOMException {
ICPPClassType cls = getOriginalClass();
ICPPClassScope scope = (ICPPClassScope)cls.getCompositeScope();
@ -189,16 +175,10 @@ public class CPPClassSpecializationScope implements ICPPClassScope, IASTInternal
return null;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IScope#find(java.lang.String)
*/
public IBinding[] find(String name) throws DOMException {
return CPPSemantics.findBindings(this, name, false);
}
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.dom.parser.IASTInternalScope#isFullyCached()
*/
public boolean isFullyCached() throws DOMException {
ICPPScope origScope = (ICPPScope) getOriginalClass().getCompositeScope();
if (!ASTInternal.isFullyCached(origScope)) {

View file

@ -51,7 +51,7 @@ import org.eclipse.cdt.internal.core.index.IIndexType;
* @author aniefer
*/
public class CPPClassTemplate extends CPPTemplateDefinition implements
ICPPClassTemplate, ICPPClassType, ICPPInternalBinding, ICPPInternalClassTemplate,
ICPPClassTemplate, ICPPClassType, ICPPInternalClassTemplate,
ICPPInternalClassTypeMixinHost {
private class FindDefinitionAction extends CPPASTVisitor {

View file

@ -40,79 +40,46 @@ public class CPPDeferredClassInstance extends CPPInstance
super(null, orig, argMap, arguments);
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType#getBases()
*/
public ICPPBase[] getBases() throws DOMException {
return ((ICPPClassType) getClassTemplate()).getBases();
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.ICompositeType#getFields()
*/
public IField[] getFields() {
return null;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.ICompositeType#findField(java.lang.String)
*/
public IField findField(String name) {
return null;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType#getDeclaredFields()
*/
public ICPPField[] getDeclaredFields() {
return null;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType#getMethods()
*/
public ICPPMethod[] getMethods() {
return null;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType#getAllDeclaredMethods()
*/
public ICPPMethod[] getAllDeclaredMethods() {
return null;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType#getDeclaredMethods()
*/
public ICPPMethod[] getDeclaredMethods() {
return null;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType#getConstructors()
*/
public ICPPConstructor[] getConstructors() {
return ICPPConstructor.EMPTY_CONSTRUCTOR_ARRAY;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType#getFriends()
*/
public IBinding[] getFriends() {
return null;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.ICompositeType#getKey()
*/
public int getKey() throws DOMException {
return ((ICPPClassType) getClassTemplate()).getKey();
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.ICompositeType#getCompositeScope()
*/
public IScope getCompositeScope() throws DOMException {
if (getArgumentMap() != null) {
return new CPPClassSpecializationScope(this);
@ -120,18 +87,11 @@ public class CPPDeferredClassInstance extends CPPInstance
return ((ICPPClassType) getClassTemplate()).getCompositeScope();
}
/* (non-Javadoc)
* @see java.lang.Object#clone()
*/
@Override
public Object clone() {
return this;
}
/**
* @param argMap
* @return
*/
public IType instantiate(ObjectMap argMap) {
IType[] arguments = getArguments();
IType[] newArgs = new IType[arguments.length];
@ -148,9 +108,6 @@ public class CPPDeferredClassInstance extends CPPInstance
return (IType) ((ICPPInternalTemplateInstantiator) classTemplate).instantiate(newArgs);
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IType#isSameType(org.eclipse.cdt.core.dom.ast.IType)
*/
public boolean isSameType(IType type) {
if (type == this)
return true;

View file

@ -38,11 +38,7 @@ public class CPPDeferredFunctionInstance extends CPPInstance implements ICPPFunc
private IType[] arguments;
private IFunctionType functionType;
/**
* @param scope
* @param orig
* @param argMap
*/
public CPPDeferredFunctionInstance( ICPPFunctionTemplate template, IType[] arguments ) {
super( null, template, null, arguments );
this.arguments = arguments;
@ -65,17 +61,12 @@ public class CPPDeferredFunctionInstance extends CPPInstance implements ICPPFunc
return map;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateInstance#getArguments()
*/
@Override
public IType[] getArguments() {
return arguments;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IFunction#getParameters()
*/
public IParameter[] getParameters() throws DOMException {
if( getArgumentMap() == null )
return ((ICPPFunction)getTemplateDefinition()).getParameters();
@ -91,17 +82,13 @@ public class CPPDeferredFunctionInstance extends CPPInstance implements ICPPFunc
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IFunction#getFunctionScope()
*/
public IScope getFunctionScope() {
// TODO Auto-generated method stub
return null;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IFunction#getType()
*/
public IFunctionType getType() throws DOMException {
if( functionType == null ){
IFunctionType ft = ((ICPPFunction)getTemplateDefinition()).getType();
@ -113,65 +100,39 @@ public class CPPDeferredFunctionInstance extends CPPInstance implements ICPPFunc
return functionType;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IFunction#isStatic()
*/
public boolean isStatic() throws DOMException {
return ((ICPPFunction)getTemplateDefinition()).isStatic();
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPFunction#isMutable()
*/
public boolean isMutable() throws DOMException {
return ((ICPPFunction)getTemplateDefinition()).isMutable();
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPFunction#isInline()
*/
public boolean isInline() throws DOMException {
return ((ICPPFunction)getTemplateDefinition()).isInline();
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPFunction#isInline()
*/
public boolean isExternC() throws DOMException {
return ((ICPPFunction)getTemplateDefinition()).isExternC();
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IFunction#isExtern()
*/
public boolean isExtern() throws DOMException {
return ((ICPPFunction)getTemplateDefinition()).isExtern();
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IFunction#isAuto()
*/
public boolean isAuto() throws DOMException {
return ((ICPPFunction)getTemplateDefinition()).isAuto();
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IFunction#isRegister()
*/
public boolean isRegister() throws DOMException {
return ((ICPPFunction)getTemplateDefinition()).isRegister();
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IFunction#takesVarArgs()
*/
public boolean takesVarArgs() throws DOMException {
return ((ICPPFunction)getTemplateDefinition()).takesVarArgs();
}
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalFunction#isStatic(boolean)
*/
public boolean isStatic( boolean resolveAll) {
try {
return ASTInternal.isStatic((IFunction) getTemplateDefinition(), resolveAll);
@ -180,9 +141,6 @@ public class CPPDeferredFunctionInstance extends CPPInstance implements ICPPFunc
}
}
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalFunction#resolveParameter(org.eclipse.cdt.core.dom.ast.IASTParameterDeclaration)
*/
public IBinding resolveParameter( IASTParameterDeclaration param ) {
// TODO Auto-generated method stub
return null;

View file

@ -33,52 +33,32 @@ import org.eclipse.core.runtime.PlatformObject;
*/
public class CPPEnumeration extends PlatformObject implements IEnumeration, ICPPInternalBinding {
private IASTName enumName;
/**
* @param specifier
*/
public CPPEnumeration( IASTName name ) {
this.enumName = name;
name.setBinding( this );
}
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPBinding#getDeclarations()
*/
public IASTNode[] getDeclarations() {
return null;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPBinding#getDefinition()
*/
public IASTNode getDefinition() {
return enumName;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getName()
*/
public String getName() {
return enumName.toString();
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getNameCharArray()
*/
public char[] getNameCharArray() {
return enumName.toCharArray();
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getScope()
*/
public IScope getScope() {
return CPPVisitor.getContainingScope( enumName );
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getPhysicalNode()
*/
public IASTNode getPhysicalNode() {
return enumName;
}
@ -94,9 +74,6 @@ public class CPPEnumeration extends PlatformObject implements IEnumeration, ICPP
return t;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IEnumeration#getEnumerators()
*/
public IEnumerator[] getEnumerators() {
IASTEnumerationSpecifier.IASTEnumerator[] enums = ((IASTEnumerationSpecifier)enumName.getParent()).getEnumerators();
IEnumerator [] bindings = new IEnumerator [ enums.length ];
@ -107,23 +84,14 @@ public class CPPEnumeration extends PlatformObject implements IEnumeration, ICPP
return bindings;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getFullyQualifiedName()
*/
public String[] getQualifiedName() {
return CPPVisitor.getQualifiedName( this );
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getFullyQualifiedNameCharArray()
*/
public char[][] getQualifiedNameCharArray() {
return CPPVisitor.getQualifiedNameCharArray( this );
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPBinding#isGloballyQualified()
*/
public boolean isGloballyQualified() throws DOMException {
IScope scope = getScope();
while( scope != null ){
@ -134,17 +102,11 @@ public class CPPEnumeration extends PlatformObject implements IEnumeration, ICPP
return true;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalBinding#addDefinition(org.eclipse.cdt.core.dom.ast.IASTNode)
*/
public void addDefinition(IASTNode node) {
// TODO Auto-generated method stub
}
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalBinding#addDeclaration(org.eclipse.cdt.core.dom.ast.IASTNode)
*/
public void addDeclaration(IASTNode node) {
// TODO Auto-generated method stub
@ -154,9 +116,6 @@ public class CPPEnumeration extends PlatformObject implements IEnumeration, ICPP
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IType#isSameType(org.eclipse.cdt.core.dom.ast.IType)
*/
public boolean isSameType( IType type ) {
if( type == this )
return true;

View file

@ -98,9 +98,7 @@ public class CPPField extends CPPVariable implements ICPPField {
}
return null;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPMember#getVisibility()
*/
public int getVisibility() throws DOMException {
ICPPASTVisiblityLabel vis = null;
IASTDeclaration decl = getPrimaryDeclaration();
@ -141,9 +139,7 @@ public class CPPField extends CPPVariable implements ICPPField {
return super.isStatic();
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPVariable#isMutable()
*/
@Override
public boolean isMutable() {
return hasStorageClass( ICPPASTDeclSpecifier.sc_mutable);

View file

@ -149,16 +149,12 @@ public class CPPFunction extends PlatformObject implements ICPPFunction, ICPPInt
}
}
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPBinding#getDeclarations()
*/
public IASTNode[] getDeclarations() {
return declarations;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPBinding#getDefinition()
*/
public IASTNode getDefinition() {
return definition;
}
@ -209,9 +205,7 @@ public class CPPFunction extends PlatformObject implements ICPPFunction, ICPPInt
}
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IFunction#getParameters()
*/
public IParameter[] getParameters() {
IASTStandardFunctionDeclarator dtor = (definition != null) ? definition : declarations[0];
IASTParameterDeclaration[] params = dtor.getParameters();
@ -234,9 +228,7 @@ public class CPPFunction extends PlatformObject implements ICPPFunction, ICPPInt
return result;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IFunction#getFunctionScope()
*/
public IScope getFunctionScope() {
resolveAllDeclarations();
if (definition != null) {
@ -246,16 +238,12 @@ public class CPPFunction extends PlatformObject implements ICPPFunction, ICPPInt
return declarations[0].getFunctionScope();
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getName()
*/
public String getName() {
return getASTName().toString();
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getNameCharArray()
*/
public char[] getNameCharArray() {
return getASTName().toCharArray();
}
@ -276,9 +264,7 @@ public class CPPFunction extends PlatformObject implements ICPPFunction, ICPPInt
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getScope()
*/
public IScope getScope() {
IASTName n = getASTName();
IScope scope = CPPVisitor.getContainingScope(n);
@ -309,9 +295,7 @@ public class CPPFunction extends PlatformObject implements ICPPFunction, ICPPInt
return scope;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IFunction#getType()
*/
public IFunctionType getType() {
if (type == null)
type = (IFunctionType) CPPVisitor.createType((definition != null) ? definition : declarations[0]);
@ -383,15 +367,11 @@ public class CPPFunction extends PlatformObject implements ICPPFunction, ICPPInt
}
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IFunction#isStatic()
*/
public boolean isStatic() {
return isStatic(true);
}
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalFunction#isStatic(boolean)
*/
public boolean isStatic(boolean resolveAll) {
if (resolveAll && (bits & FULLY_RESOLVED) == 0) {
resolveAllDeclarations();
@ -430,23 +410,17 @@ public class CPPFunction extends PlatformObject implements ICPPFunction, ICPPInt
// return false;
// }
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getFullyQualifiedName()
*/
public String[] getQualifiedName() {
return CPPVisitor.getQualifiedName(this);
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getFullyQualifiedNameCharArray()
*/
public char[][] getQualifiedNameCharArray() {
return CPPVisitor.getQualifiedNameCharArray(this);
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPBinding#isGloballyQualified()
*/
public boolean isGloballyQualified() throws DOMException {
IScope scope = getScope();
while (scope != null) {
@ -487,16 +461,10 @@ public class CPPFunction extends PlatformObject implements ICPPFunction, ICPPInt
return false;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPFunction#isMutable()
*/
public boolean isMutable() {
return false;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPFunction#isInline()
*/
public boolean isInline() throws DOMException {
ICPPASTFunctionDeclarator dtor = (ICPPASTFunctionDeclarator) getDefinition();
ICPPASTFunctionDeclarator[] ds = (ICPPASTFunctionDeclarator[]) getDeclarations();
@ -524,9 +492,6 @@ public class CPPFunction extends PlatformObject implements ICPPFunction, ICPPInt
return false;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPFunction#isInline()
*/
public boolean isExternC() throws DOMException {
if (CPPVisitor.isExternC(getDefinition())) {
return true;
@ -542,30 +507,18 @@ public class CPPFunction extends PlatformObject implements ICPPFunction, ICPPInt
return false;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IFunction#isExtern()
*/
public boolean isExtern() {
return hasStorageClass(this, IASTDeclSpecifier.sc_extern);
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IFunction#isAuto()
*/
public boolean isAuto() {
return hasStorageClass(this, IASTDeclSpecifier.sc_auto);
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IFunction#isRegister()
*/
public boolean isRegister() {
return hasStorageClass(this, IASTDeclSpecifier.sc_register);
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IFunction#takesVarArgs()
*/
public boolean takesVarArgs() {
ICPPASTFunctionDeclarator dtor = (ICPPASTFunctionDeclarator) getDefinition();
if (dtor != null) {

View file

@ -96,9 +96,7 @@ public class CPPFunctionTemplate extends CPPTemplateDefinition implements ICPPFu
}
protected IFunctionType type = null;
/**
* @param decl
*/
public CPPFunctionTemplate(IASTName name) {
super(name);
}
@ -111,9 +109,7 @@ public class CPPFunctionTemplate extends CPPTemplateDefinition implements ICPPFu
super.addDefinition( node );
}
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalBinding#addDeclaration(org.eclipse.cdt.core.dom.ast.IASTNode)
*/
@Override
public void addDeclaration(IASTNode node) {
if( !(node instanceof IASTName) )
@ -140,17 +136,7 @@ public class CPPFunctionTemplate extends CPPTemplateDefinition implements ICPPFu
}
}
/**
* @param templateParameter
* @return
*/
// public IBinding resolveParameter(ICPPASTTemplateParameter templateParameter) {
// return null;
// }
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IFunction#getParameters()
*/
public IParameter[] getParameters() {
IASTName name = getTemplateName();
ICPPASTFunctionDeclarator fdecl= getDeclaratorByName(name);
@ -176,17 +162,12 @@ public class CPPFunctionTemplate extends CPPTemplateDefinition implements ICPPFu
return null;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IFunction#getFunctionScope()
*/
public IScope getFunctionScope() {
// TODO Auto-generated method stub
return null;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IFunction#getType()
*/
public IFunctionType getType() {
if( type == null ) {
IASTName name = getTemplateName();
@ -228,10 +209,7 @@ public class CPPFunctionTemplate extends CPPTemplateDefinition implements ICPPFu
return false;
}
/**
* @param param
* @return
*/
public IBinding resolveParameter(IASTParameterDeclaration param) {
IASTName name = param.getDeclarator().getName();
IBinding binding = name.getBinding();
@ -276,9 +254,7 @@ public class CPPFunctionTemplate extends CPPTemplateDefinition implements ICPPFu
return binding;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.dom.parser.cpp.CPPTemplateDefinition#deferredInstance(org.eclipse.cdt.core.dom.ast.IType[])
*/
@Override
public ICPPSpecialization deferredInstance(ObjectMap argMap, IType[] arguments) {
ICPPSpecialization instance = getInstance( arguments );
@ -288,22 +264,16 @@ public class CPPFunctionTemplate extends CPPTemplateDefinition implements ICPPFu
}
return instance;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IFunction#isStatic()
*/
public boolean isStatic() {
return hasStorageClass( IASTDeclSpecifier.sc_static);
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPFunction#isMutable()
*/
public boolean isMutable() {
return hasStorageClass( ICPPASTDeclSpecifier.sc_mutable);
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPFunction#isInline()
*/
public boolean isInline() throws DOMException {
IASTName name = (IASTName) getDefinition();
IASTNode[] ns = getDeclarations();
@ -346,30 +316,19 @@ public class CPPFunctionTemplate extends CPPTemplateDefinition implements ICPPFu
return false;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IFunction#isExtern()
*/
public boolean isExtern() {
return hasStorageClass( IASTDeclSpecifier.sc_extern);
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IFunction#isAuto()
*/
public boolean isAuto() {
return hasStorageClass( IASTDeclSpecifier.sc_auto );
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IFunction#isRegister()
*/
public boolean isRegister() {
return hasStorageClass( IASTDeclSpecifier.sc_register);
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IFunction#takesVarArgs()
*/
public boolean takesVarArgs() {
ICPPASTFunctionDeclarator fdecl= getDeclaratorByName(getDefinition());
if (fdecl == null) {
@ -398,9 +357,6 @@ public class CPPFunctionTemplate extends CPPTemplateDefinition implements ICPPFu
return null;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalFunction#isStatic(boolean)
*/
public boolean isStatic( boolean resolveAll ) {
return hasStorageClass( IASTDeclSpecifier.sc_static );
}

View file

@ -19,7 +19,6 @@ import org.eclipse.cdt.core.dom.ast.IParameter;
import org.eclipse.cdt.core.dom.ast.IScope;
import org.eclipse.cdt.core.dom.ast.IType;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTFunctionDeclarator;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunction;
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisitor;
/**
@ -30,7 +29,7 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisitor;
*
* @author dsteffle
*/
public class CPPImplicitFunction extends CPPFunction implements ICPPFunction, ICPPInternalBinding {
public class CPPImplicitFunction extends CPPFunction {
private IParameter[] parms=null;
private IScope scope=null;

View file

@ -24,7 +24,7 @@ import org.eclipse.cdt.core.dom.ast.ITypedef;
*
* @author dsteffle
*/
public class CPPImplicitTypedef extends CPPTypedef implements ITypedef, ICPPInternalBinding {
public class CPPImplicitTypedef extends CPPTypedef {
private IType type=null;
private char[] name=null;
private IScope scope=null;
@ -36,41 +36,26 @@ public class CPPImplicitTypedef extends CPPTypedef implements ITypedef, ICPPInte
this.scope = scope;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.ITypedef#getType()
*/
@Override
public IType getType() {
return type;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getName()
*/
@Override
public String getName() {
return String.valueOf(name);
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getNameCharArray()
*/
@Override
public char[] getNameCharArray() {
return name;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getScope()
*/
@Override
public IScope getScope() {
return scope;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IType#isSameType(org.eclipse.cdt.core.dom.ast.IType)
*/
@Override
public boolean isSameType(IType t) {
if( t == this )
@ -91,9 +76,6 @@ public class CPPImplicitTypedef extends CPPTypedef implements ITypedef, ICPPInte
return false;
}
/* (non-Javadoc)
* @see java.lang.Object#clone()
*/
@Override
public Object clone(){
IType t = null;
@ -141,9 +123,7 @@ public class CPPImplicitTypedef extends CPPTypedef implements ITypedef, ICPPInte
// do nothing
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getFullyQualifiedName()
*/
@Override
public String[] getQualifiedName() {
String[] temp = new String[1];
@ -152,9 +132,7 @@ public class CPPImplicitTypedef extends CPPTypedef implements ITypedef, ICPPInte
return temp;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getFullyQualifiedNameCharArray()
*/
@Override
public char[][] getQualifiedNameCharArray() {
char[][] temp = new char[1][];

View file

@ -26,31 +26,20 @@ import org.eclipse.core.runtime.PlatformObject;
*/
public class CPPLabel extends PlatformObject implements ILabel, ICPPInternalBinding {
private IASTName statement;
/**
* @param gotoStatement
*/
public CPPLabel( IASTName statement ) {
this.statement = statement;
statement.setBinding( this );
}
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPBinding#getDeclarations()
*/
public IASTNode[] getDeclarations() {
return null;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPBinding#getDefinition()
*/
public IASTNode getDefinition() {
return statement;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.ILabel#getLabelStatement()
*/
public IASTLabelStatement getLabelStatement() {
if( statement instanceof IASTLabelStatement )
return (IASTLabelStatement) statement;
@ -59,73 +48,44 @@ public class CPPLabel extends PlatformObject implements ILabel, ICPPInternalBind
return null;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getName()
*/
public String getName() {
return statement.toString();
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getNameCharArray()
*/
public char[] getNameCharArray() {
return statement.toCharArray();
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getScope()
*/
public IScope getScope() {
return CPPVisitor.getContainingScope( statement );
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getPhysicalNode()
*/
public IASTNode getPhysicalNode() {
return statement;
}
/**
* @param labelStatement
*/
public void setLabelStatement( IASTName labelStatement ) {
statement = labelStatement;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getFullyQualifiedName()
*/
public String[] getQualifiedName() {
return new String[] { getName() };
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getFullyQualifiedNameCharArray()
*/
public char[][] getQualifiedNameCharArray() {
return new char [] [] { getNameCharArray() };
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPBinding#isGloballyQualified()
*/
public boolean isGloballyQualified() {
return false;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalBinding#addDefinition(org.eclipse.cdt.core.dom.ast.IASTNode)
*/
public void addDefinition(IASTNode node) {
// TODO Auto-generated method stub
}
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalBinding#addDeclaration(org.eclipse.cdt.core.dom.ast.IASTNode)
*/
public void addDeclaration(IASTNode node) {
// TODO Auto-generated method stub

View file

@ -41,58 +41,34 @@ public class CPPNamespaceAlias extends PlatformObject implements ICPPNamespaceAl
this.alias = aliasName;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPNamespace#getNamespaceScope()
*/
public ICPPNamespaceScope getNamespaceScope() throws DOMException {
return namespace.getNamespaceScope();
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPDelegate#getBinding()
*/
public IBinding getBinding() {
return namespace;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getName()
*/
public String getName() {
return alias.toString();
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getNameCharArray()
*/
public char[] getNameCharArray() {
return alias.toCharArray();
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getFullyQualifiedName()
*/
public String[] getQualifiedName() {
return CPPVisitor.getQualifiedName( this );
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getFullyQualifiedNameCharArray()
*/
public char[][] getQualifiedNameCharArray() {
return CPPVisitor.getQualifiedNameCharArray( this );
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getScope()
*/
public IScope getScope() {
return CPPVisitor.getContainingScope( alias );
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPBinding#isGloballyQualified()
*/
public boolean isGloballyQualified() throws DOMException {
IScope scope = getScope();
while( scope != null ){
@ -103,29 +79,17 @@ public class CPPNamespaceAlias extends PlatformObject implements ICPPNamespaceAl
return true;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalBinding#getDeclarations()
*/
public IASTNode[] getDeclarations() {
return null;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalBinding#getDefinition()
*/
public IASTNode getDefinition() {
return alias;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalBinding#addDefinition(org.eclipse.cdt.core.dom.ast.IASTNode)
*/
public void addDefinition(IASTNode node) {
}
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalBinding#addDeclaration(org.eclipse.cdt.core.dom.ast.IASTNode)
*/
public void addDeclaration(IASTNode node) {
}
public void removeDeclaration(IASTNode node) {

View file

@ -29,19 +29,15 @@ public class CPPPointerType implements IPointerType, ITypeContainer {
protected IType type = null;
private boolean isConst = false;
private boolean isVolatile = false;
/**
* @param type
* @param operator
*/
public CPPPointerType(IType type, IASTPointer operator) {
this.type = type;
this.isConst = operator.isConst();
this.isVolatile = operator.isVolatile();
}
/**
* @param type2
*/
public CPPPointerType(IType type, boolean isConst, boolean isVolatile ) {
this.type = type;
this.isConst = isConst;
@ -80,9 +76,6 @@ public class CPPPointerType implements IPointerType, ITypeContainer {
return false;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IPointerType#getType()
*/
public IType getType() {
return type;
}
@ -91,16 +84,10 @@ public class CPPPointerType implements IPointerType, ITypeContainer {
type = t;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IPointerType#isConst()
*/
public boolean isConst() {
return isConst;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IPointerType#isVolatile()
*/
public boolean isVolatile() {
return isVolatile;
}

View file

@ -27,16 +27,11 @@ import org.eclipse.cdt.internal.core.dom.parser.ITypeContainer;
public class CPPReferenceType implements ICPPReferenceType, ITypeContainer {
IType type = null;
/**
* @param type
* @param operator
*/
public CPPReferenceType(IType type) {
this.type = type;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPReferenceType#getType()
*/
public IType getType() {
return type;
}

View file

@ -36,9 +36,6 @@ public class CPPTemplateNonTypeParameter extends CPPTemplateParameter implements
super(name);
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateNonTypeParameter#getDefault()
*/
public IASTExpression getDefault() {
IASTName name = getPrimaryDeclaration();
IASTDeclarator dtor = (IASTDeclarator) name.getParent();
@ -49,9 +46,6 @@ public class CPPTemplateNonTypeParameter extends CPPTemplateParameter implements
return null;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IVariable#getType()
*/
public IType getType() {
if( type == null ){
IASTName name = getPrimaryDeclaration();
@ -61,50 +55,32 @@ public class CPPTemplateNonTypeParameter extends CPPTemplateParameter implements
return type;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IVariable#isStatic()
*/
public boolean isStatic() throws DOMException {
// TODO Auto-generated method stub
return false;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IVariable#isExtern()
*/
public boolean isExtern() throws DOMException {
// TODO Auto-generated method stub
return false;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IVariable#isAuto()
*/
public boolean isAuto() throws DOMException {
// TODO Auto-generated method stub
return false;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IVariable#isRegister()
*/
public boolean isRegister() throws DOMException {
// TODO Auto-generated method stub
return false;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalBinding#addDefinition(org.eclipse.cdt.core.dom.ast.IASTNode)
*/
@Override
public void addDefinition(IASTNode node) {
// TODO Auto-generated method stub
}
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalBinding#addDeclaration(org.eclipse.cdt.core.dom.ast.IASTNode)
*/
@Override
public void addDeclaration(IASTNode node) {
// TODO Auto-generated method stub

View file

@ -40,7 +40,7 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPTemplates;
* @author aniefer
*/
public class CPPTemplateTemplateParameter extends CPPTemplateParameter implements
ICPPTemplateTemplateParameter, ICPPClassType, ICPPInternalBinding, ICPPInternalTemplate, ICPPInternalUnknown {
ICPPTemplateTemplateParameter, ICPPClassType, ICPPInternalTemplate, ICPPInternalUnknown {
private ICPPTemplateParameter[] templateParameters = null;
private ObjectMap instances = null;
@ -64,9 +64,7 @@ public class CPPTemplateTemplateParameter extends CPPTemplateParameter implement
return unknownScope;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateTemplateParameter#getTemplateParameters()
*/
public ICPPTemplateParameter[] getTemplateParameters() {
if (templateParameters == null) {
ICPPASTTemplatedTypeTemplateParameter template = (ICPPASTTemplatedTypeTemplateParameter) getPrimaryDeclaration().getParent();
@ -91,10 +89,7 @@ public class CPPTemplateTemplateParameter extends CPPTemplateParameter implement
return templateParameters;
}
/**
* @param templateParameter
* @return
*/
public IBinding resolveTemplateParameter(ICPPASTTemplateParameter templateParameter) {
IASTName name = CPPTemplates.getTemplateParameterName(templateParameter);
@ -112,114 +107,67 @@ public class CPPTemplateTemplateParameter extends CPPTemplateParameter implement
return binding;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateDefinition#getTemplateSpecializations()
*/
public ICPPClassTemplatePartialSpecialization[] getTemplateSpecializations() throws DOMException {
return ICPPClassTemplatePartialSpecialization.EMPTY_PARTIAL_SPECIALIZATION_ARRAY;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateTemplateParameter#getDefault()
*/
public IType getDefault() throws DOMException {
return null;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType#getBases()
*/
public ICPPBase[] getBases() {
return ICPPBase.EMPTY_BASE_ARRAY;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType#getFields()
*/
public IField[] getFields() throws DOMException {
return null;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType#findField(java.lang.String)
*/
public IField findField(String name) throws DOMException {
return null;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType#getDeclaredFields()
*/
public ICPPField[] getDeclaredFields() throws DOMException {
return null;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType#getMethods()
*/
public ICPPMethod[] getMethods() throws DOMException {
return null;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType#getAllDeclaredMethods()
*/
public ICPPMethod[] getAllDeclaredMethods() throws DOMException {
return null;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType#getDeclaredMethods()
*/
public ICPPMethod[] getDeclaredMethods() throws DOMException {
return null;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType#getConstructors()
*/
public ICPPConstructor[] getConstructors() {
return ICPPConstructor.EMPTY_CONSTRUCTOR_ARRAY;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType#getFriends()
*/
public IBinding[] getFriends() throws DOMException {
return null;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.ICompositeType#getKey()
*/
public int getKey() throws DOMException {
return 0;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.ICompositeType#getCompositeScope()
*/
public IScope getCompositeScope() throws DOMException {
return null;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalBinding#addDefinition(org.eclipse.cdt.core.dom.ast.IASTNode)
*/
@Override
public void addDefinition(IASTNode node) {
}
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalBinding#addDeclaration(org.eclipse.cdt.core.dom.ast.IASTNode)
*/
@Override
public void addDeclaration(IASTNode node) {
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IType#isSameType(org.eclipse.cdt.core.dom.ast.IType)
*/
public boolean isSameType(IType type) {
if (type == this)
return true;
@ -276,9 +224,7 @@ public class CPPTemplateTemplateParameter extends CPPTemplateParameter implement
instances.put(types, spec);
}
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalUnknown#resolveUnknown(org.eclipse.cdt.core.parser.util.ObjectMap)
*/
public IBinding resolveUnknown(ObjectMap argMap) {
return null;
}

View file

@ -30,9 +30,7 @@ public class CPPTemplateTypeParameter extends CPPTemplateParameter implements
ICPPTemplateTypeParameter, IType, ICPPInternalUnknown {
private ICPPScope unknownScope = null;
/**
* @param name
*/
public CPPTemplateTypeParameter(IASTName name) {
super(name);
}
@ -48,9 +46,6 @@ public class CPPTemplateTypeParameter extends CPPTemplateParameter implements
return unknownScope;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateTypeParameter#getDefault()
*/
public IType getDefault() {
IASTNode[] nds = getDeclarations();
if (nds == null || nds.length == 0)
@ -63,9 +58,7 @@ public class CPPTemplateTypeParameter extends CPPTemplateParameter implements
return null;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IType#isSameType(org.eclipse.cdt.core.dom.ast.IType)
*/
public boolean isSameType(IType type) {
if (type == this)
return true;
@ -74,9 +67,7 @@ public class CPPTemplateTypeParameter extends CPPTemplateParameter implements
return false;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalUnknown#resolveUnknown(org.eclipse.cdt.core.parser.util.ObjectMap)
*/
public IBinding resolveUnknown(ObjectMap argMap) {
// Cannot do resolution here since the result is not necessarily a binding.
return null;

View file

@ -45,83 +45,47 @@ public abstract class CPPUnknownBinding extends PlatformObject
this.scopeBinding = scopeBinding;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalBinding#getDeclarations()
*/
public IASTNode[] getDeclarations() {
return null;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalBinding#getDefinition()
*/
public IASTNode getDefinition() {
return null;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalBinding#addDefinition(org.eclipse.cdt.core.dom.ast.IASTNode)
*/
public void addDefinition(IASTNode node) {
}
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalBinding#addDeclaration(org.eclipse.cdt.core.dom.ast.IASTNode)
*/
public void addDeclaration(IASTNode node) {
}
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalBinding#removeDeclaration(org.eclipse.cdt.core.dom.ast.IASTNode)
*/
public void removeDeclaration(IASTNode node) {
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPBinding#getQualifiedName()
*/
public String[] getQualifiedName() {
return CPPVisitor.getQualifiedName(this);
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPBinding#getQualifiedNameCharArray()
*/
public char[][] getQualifiedNameCharArray() {
return CPPVisitor.getQualifiedNameCharArray(this);
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPBinding#isGloballyQualified()
*/
public boolean isGloballyQualified() {
return false;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getName()
*/
public String getName() {
return name.toString();
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getNameCharArray()
*/
public char[] getNameCharArray() {
return name.toCharArray();
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getScope()
*/
public IScope getScope() {
return scopeBinding.getUnknownScope();
}
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalUnknown#getUnknownScope()
*/
public ICPPScope getUnknownScope() {
if (unknownScope == null) {
unknownScope = new CPPUnknownScope(this, name);
@ -129,9 +93,6 @@ public abstract class CPPUnknownBinding extends PlatformObject
return unknownScope;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalUnknown#resolveUnknown(org.eclipse.cdt.core.parser.util.ObjectMap)
*/
public IBinding resolveUnknown(ObjectMap argMap) throws DOMException {
IBinding result = this;
IType t = null;
@ -156,9 +117,7 @@ public abstract class CPPUnknownBinding extends PlatformObject
return result;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalUnknownClassType#resolvePartially(org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalUnknown, org.eclipse.cdt.core.parser.util.ObjectMap)
*/
protected abstract IBinding resolvePartially(ICPPInternalUnknown parentBinding, ObjectMap argMap);
public ILinkage getLinkage() {
@ -174,9 +133,6 @@ public abstract class CPPUnknownBinding extends PlatformObject
}
}
/* (non-Javadoc)
* For debug purposes only
*/
@Override
public String toString() {
return getName();

View file

@ -31,93 +31,55 @@ import org.eclipse.cdt.core.parser.util.ObjectMap;
*/
public class CPPUnknownClass extends CPPUnknownBinding implements ICPPInternalUnknownClassType {
/**
* @param name
*/
public CPPUnknownClass(ICPPInternalUnknown scopeBinding, IASTName name) {
super(scopeBinding, name);
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType#getBases()
*/
public ICPPBase[] getBases() {
return ICPPBase.EMPTY_BASE_ARRAY;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.ICompositeType#getFields()
*/
public IField[] getFields() {
return IField.EMPTY_FIELD_ARRAY;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.ICompositeType#findField(java.lang.String)
*/
public IField findField(String name) {
return null;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType#getDeclaredFields()
*/
public ICPPField[] getDeclaredFields() {
return ICPPField.EMPTY_CPPFIELD_ARRAY;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType#getMethods()
*/
public ICPPMethod[] getMethods() {
return ICPPMethod.EMPTY_CPPMETHOD_ARRAY;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType#getAllDeclaredMethods()
*/
public ICPPMethod[] getAllDeclaredMethods() {
return ICPPMethod.EMPTY_CPPMETHOD_ARRAY;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType#getDeclaredMethods()
*/
public ICPPMethod[] getDeclaredMethods() {
return ICPPMethod.EMPTY_CPPMETHOD_ARRAY;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType#getConstructors()
*/
public ICPPConstructor[] getConstructors() {
return ICPPConstructor.EMPTY_CONSTRUCTOR_ARRAY;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType#getFriends()
*/
public IBinding[] getFriends() {
return IBinding.EMPTY_BINDING_ARRAY;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.ICompositeType#getKey()
*/
public int getKey() {
return 0;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.ICompositeType#getCompositeScope()
*/
public IScope getCompositeScope() {
return getUnknownScope();
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IType#isSameType(org.eclipse.cdt.core.dom.ast.IType)
*/
public boolean isSameType(IType type) {
return type == this;
}
@ -126,9 +88,6 @@ public class CPPUnknownClass extends CPPUnknownBinding implements ICPPInternalUn
return ICPPClassType.EMPTY_CLASS_ARRAY;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalUnknownClassType#resolvePartially(org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalUnknown, org.eclipse.cdt.core.parser.util.ObjectMap)
*/
@Override
public IBinding resolvePartially(ICPPInternalUnknown parentBinding, ObjectMap argMap) {
if (parentBinding == this.scopeBinding) {

View file

@ -41,30 +41,18 @@ public class CPPUsingDeclaration extends PlatformObject implements ICPPUsingDecl
this.delegates= bindings;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPUsingDeclaration#getDelegates()
*/
public IBinding[] getDelegates() {
return delegates;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPBinding#getQualifiedName()
*/
public String[] getQualifiedName() {
return CPPVisitor.getQualifiedName( this );
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPBinding#getQualifiedNameCharArray()
*/
public char[][] getQualifiedNameCharArray() {
return CPPVisitor.getQualifiedNameCharArray( this );
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPBinding#isGloballyQualified()
*/
public boolean isGloballyQualified() throws DOMException {
IScope scope = getScope();
while( scope != null ){
@ -75,37 +63,22 @@ public class CPPUsingDeclaration extends PlatformObject implements ICPPUsingDecl
return true;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getName()
*/
public String getName() {
return name.toString();
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getNameCharArray()
*/
public char[] getNameCharArray() {
return name.toCharArray();
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getScope()
*/
public IScope getScope() {
return CPPVisitor.getContainingScope( name.getParent() );
}
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalBinding#getDeclarations()
*/
public IASTNode[] getDeclarations() {
return null;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalBinding#getDefinition()
*/
public IASTNode getDefinition() {
IASTNode n = name.getParent();
if( n instanceof ICPPASTTemplateId )
@ -114,21 +87,12 @@ public class CPPUsingDeclaration extends PlatformObject implements ICPPUsingDecl
return n;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalBinding#addDefinition(org.eclipse.cdt.core.dom.ast.IASTNode)
*/
public void addDefinition( IASTNode node ) {
}
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalBinding#addDeclaration(org.eclipse.cdt.core.dom.ast.IASTNode)
*/
public void addDeclaration( IASTNode node ) {
}
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalBinding#removeDeclaration(org.eclipse.cdt.core.dom.ast.IASTNode)
*/
public void removeDeclaration( IASTNode node ) {
}