diff options
Diffstat (limited to 'core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core')
31 files changed, 96 insertions, 804 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/BacktrackException.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/BacktrackException.java index 9bee10bc65c..ffce607c816 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/BacktrackException.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/BacktrackException.java @@ -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; diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/FindNodeForOffsetAction.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/FindNodeForOffsetAction.java index 49eff99d944..5c6d0b8f8c4 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/FindNodeForOffsetAction.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/FindNodeForOffsetAction.java @@ -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; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CArrayType.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CArrayType.java index c721d469a32..63dd96879b4 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CArrayType.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CArrayType.java @@ -124,9 +124,6 @@ public class CArrayType implements ICArrayType, ITypeContainer { return t; } - /** - * @return - */ public ICASTArrayModifier getModifier() { return mod; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CExternalFunction.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CExternalFunction.java index 1020cb7b526..b97371d94ed 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CExternalFunction.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CExternalFunction.java @@ -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; diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CFunction.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CFunction.java index d8a30194904..47067672ed5 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CFunction.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CFunction.java @@ -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(); diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CImplicitFunction.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CImplicitFunction.java index 7a05cfb9699..4d8babd4aba 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CImplicitFunction.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CImplicitFunction.java @@ -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; diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CImplicitTypedef.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CImplicitTypedef.java index 945a14559d7..25f7fb4a0ec 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CImplicitTypedef.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CImplicitTypedef.java @@ -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; diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CQualifierType.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CQualifierType.java index 1aa3488d623..83b5442c1d3 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CQualifierType.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CQualifierType.java @@ -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 ); diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CVisitor.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CVisitor.java index c8be960dcd0..19067ffb96e 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CVisitor.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CVisitor.java @@ -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; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTEnumerationSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTEnumerationSpecifier.java index 4fc4ef783b9..b9b301e7493 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTEnumerationSpecifier.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTEnumerationSpecifier.java @@ -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; diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassInstance.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassInstance.java index 1cb82293225..f8aa1db3ee1 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassInstance.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassInstance.java @@ -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; diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassSpecializationScope.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassSpecializationScope.java index 6632148b0cb..eb7c9aceba8 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassSpecializationScope.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassSpecializationScope.java @@ -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)) { diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassTemplate.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassTemplate.java index ce661a52814..40cda105219 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassTemplate.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassTemplate.java @@ -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 { diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPDeferredClassInstance.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPDeferredClassInstance.java index db363f1d07d..9f07844f7f9 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPDeferredClassInstance.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPDeferredClassInstance.java @@ -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; diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPDeferredFunctionInstance.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPDeferredFunctionInstance.java index 896f36c9821..31dfa2f473f 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPDeferredFunctionInstance.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPDeferredFunctionInstance.java @@ -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; diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPEnumeration.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPEnumeration.java index 43b7bd29945..af07dd64c39 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPEnumeration.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPEnumeration.java @@ -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; diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPField.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPField.java index 48fb9ba8288..aaad0dbf835 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPField.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPField.java @@ -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); diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPFunction.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPFunction.java index 58b68bad84c..386b460040b 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPFunction.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPFunction.java @@ -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) { diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPFunctionTemplate.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPFunctionTemplate.java index f0915f5f313..e4e44e1a2d9 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPFunctionTemplate.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPFunctionTemplate.java @@ -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 ); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPImplicitFunction.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPImplicitFunction.java index a0f1ac71933..d71416ec72f 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPImplicitFunction.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPImplicitFunction.java @@ -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; diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPImplicitTypedef.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPImplicitTypedef.java index 49a7af5f0d3..bce587a4feb 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPImplicitTypedef.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPImplicitTypedef.java @@ -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][]; diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPLabel.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPLabel.java index 17a9411dc6c..3649315bc29 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPLabel.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPLabel.java @@ -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 diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPNamespaceAlias.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPNamespaceAlias.java index 415fc3a1ed1..6d16d498cb6 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPNamespaceAlias.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPNamespaceAlias.java @@ -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) { diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPPointerType.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPPointerType.java index 31cfd804452..0eba779f1db 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPPointerType.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPPointerType.java @@ -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; @@ -79,10 +75,7 @@ public class CPPPointerType implements IPointerType, ITypeContainer { return type.isSameType( pt.getType() ); 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; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPReferenceType.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPReferenceType.java index b58c6443b19..7fde5b22e27 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPReferenceType.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPReferenceType.java @@ -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; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateNonTypeParameter.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateNonTypeParameter.java index 263004934f5..bfdbcb73e38 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateNonTypeParameter.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateNonTypeParameter.java @@ -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 diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateTemplateParameter.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateTemplateParameter.java index b716d61c5e7..d80e95c6897 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateTemplateParameter.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateTemplateParameter.java @@ -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; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateTypeParameter.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateTypeParameter.java index fc01b08f2f8..df39f07cb71 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateTypeParameter.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateTypeParameter.java @@ -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; diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownBinding.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownBinding.java index a9cbe97f392..6811fd941d3 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownBinding.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownBinding.java @@ -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(); diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownClass.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownClass.java index 7e8c5a341ef..c642e35b35f 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownClass.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownClass.java @@ -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) { diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUsingDeclaration.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUsingDeclaration.java index b1235088cda..c371127dff7 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUsingDeclaration.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUsingDeclaration.java @@ -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 ) { } |