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 * TODO Remove this function when done testing if it is no longer needed
* *
* @param node * @param node
* @return
*/ */
public static String getNodeSignature(IASTNode node) { public static String getNodeSignature(IASTNode node) {
if (node instanceof IASTDeclarator) if (node instanceof IASTDeclarator)
@ -1082,9 +1081,7 @@ public class ASTSignatureUtil {
return result; return result;
} }
/**
* Returns the same message as {@link IASTProblem#getMessageWithoutLocation()}.
*/
public static String getProblemMessage(int problemID, String detail) { public static String getProblemMessage(int problemID, String detail) {
return ASTProblem.getMessage(problemID, 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 * Note: false is returned if no isConst() method is found
* *
* @param type * @param type
* @return
*/ */
public static boolean isConst(IType type) { public static boolean isConst(IType type) {
if (type instanceof IQualifierType) { if (type instanceof IQualifierType) {

View file

@ -24,9 +24,6 @@ public interface IASTBuiltinSymbolProvider {
/** /**
* Returns all of the IBindings corresponding to the IASTBuiltinSymbolProvider. * Returns all of the IBindings corresponding to the IASTBuiltinSymbolProvider.
*
* @param symbol
* @return
*/ */
public IBinding[] getBuiltinBindings(); 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 * returns an array of the IEnumerators declared in this enumeration
* @return
* @throws DOMException * @throws DOMException
*/ */
IEnumerator [] getEnumerators() 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 { 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) { public int visit(ICASTDesignator designator) {
return PROCESS_CONTINUE; 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) { public int leave(ICASTDesignator designator) {
return PROCESS_CONTINUE; return PROCESS_CONTINUE;
} }

View file

@ -20,45 +20,27 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompositeTypeSpecifier.ICPPASTBas
* and the leave() methods implement a bottom-up traversal. * and the leave() methods implement a bottom-up traversal.
*/ */
public abstract class CPPASTVisitor extends ASTVisitor implements ICPPASTVisitor { 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) { public int visit(ICPPASTBaseSpecifier baseSpecifier) {
return PROCESS_CONTINUE; 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) { public int visit(ICPPASTNamespaceDefinition namespaceDefinition) {
return PROCESS_CONTINUE; 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) { public int visit(ICPPASTTemplateParameter templateParameter) {
return PROCESS_CONTINUE; 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) { public int leave(ICPPASTBaseSpecifier baseSpecifier) {
return PROCESS_CONTINUE; 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) { public int leave(ICPPASTNamespaceDefinition namespaceDefinition) {
return PROCESS_CONTINUE; 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) { public int leave(ICPPASTTemplateParameter templateParameter) {
return PROCESS_CONTINUE; return PROCESS_CONTINUE;
} }

View file

@ -47,9 +47,10 @@ import org.eclipse.core.runtime.CoreException;
* for the DOM parser framework. * for the DOM parser framework.
* *
* This class uses the template method pattern, derived classes need only implement * This class uses the template method pattern, derived classes need only implement
* {@link getScannerExtensionConfiguration()}, * {@link AbstractCLikeLanguage#getScannerExtensionConfiguration()},
* {@link getParserLanguage()} and * {@link AbstractCLikeLanguage#getParserLanguage()} and
* {@link createParser()}. * {@link AbstractCLikeLanguage#createParser(IScanner scanner, ParserMode parserMode,
* IParserLogService logService, IIndex index)}.
* *
* <p> * <p>
* <strong>EXPERIMENTAL</strong>. This class or interface has been added as * <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. * Helper method to add a function style macro to the given map.
* *
* @param macros the macro map
* @param name the macro name * @param name the macro name
* @param value the macro value * @param value the macro value
* @param arguments the macro arguments * @param arguments the macro arguments

View file

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

View file

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

View file

@ -29,8 +29,8 @@ import org.eclipse.cdt.core.dom.parser.IScannerExtensionConfiguration;
* with the CDT team. * with the CDT team.
* </p> * </p>
* *
* @see http://gcc.gnu.org/onlinedocs/gcc/C-Extensions.html * @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_002b_002b-Extensions.html"
* *
* @author jcamelon * @author jcamelon
* @since 4.0 * @since 4.0
@ -40,7 +40,7 @@ public interface ICPPParserExtensionConfiguration {
/** /**
* Support for GNU extension "Restricting Pointer Aliasing". * 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 * @return <code>true</code> if support for the extension should be
* enabled * enabled
*/ */
@ -49,7 +49,7 @@ public interface ICPPParserExtensionConfiguration {
/** /**
* Support for GNU extension "Extended Syntax for Template Instantiation". * 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 * @return <code>true</code> if support for the extension should be
* enabled * enabled
*/ */
@ -61,7 +61,7 @@ public interface ICPPParserExtensionConfiguration {
* also be enabled. * also be enabled.
* *
* @see IScannerExtensionConfiguration * @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 * @return <code>true</code> if support for the extension should be
* enabled * enabled
*/ */
@ -70,7 +70,7 @@ public interface ICPPParserExtensionConfiguration {
/** /**
* Support for GNU extension "Data types for complex numbers". * 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 * @return <code>true</code> if support for the extension should be
* enabled * enabled
*/ */
@ -87,7 +87,7 @@ public interface ICPPParserExtensionConfiguration {
/** /**
* Support for GNU long long types. * 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 * @return <code>true</code> if support for the extension should be
* enabled * enabled
*/ */
@ -96,7 +96,7 @@ public interface ICPPParserExtensionConfiguration {
/** /**
* Support for GNU extension "Statements and Declarations in Expressions". * 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 * @return <code>true</code> if support for the extension should be
* enabled * enabled
*/ */
@ -105,7 +105,7 @@ public interface ICPPParserExtensionConfiguration {
/** /**
* Support for GNU extension "Referring to a Type with typeof". * 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 * @return <code>true</code> if support for the extension should be
* enabled * enabled
*/ */
@ -114,7 +114,7 @@ public interface ICPPParserExtensionConfiguration {
/** /**
* Support for GNU extension "Inquiring on Alignment of Types or Variables". * 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 * @return <code>true</code> if support for the extension should be
* enabled * enabled
*/ */
@ -131,9 +131,8 @@ public interface ICPPParserExtensionConfiguration {
* See http://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html for more * See http://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html for more
* information on GCC's Other Built-in Symbols. * information on GCC's Other Built-in Symbols.
* *
* @return <code>true</code> if support for the extension should be * @return <code>true</code> if support for the extension should be enabled
* enabled * @deprecated use {@link #getBuiltinBindingsProvider()} instead.
* @deprecated use {@link #getBuiltinSymbolProvider(IScope)} instead.
*/ */
@Deprecated @Deprecated
public boolean supportGCCOtherBuiltinSymbols(); 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. * Clears the entire index of the project and schedules the indexer.
* @throws CoreException
* @since 4.0 * @since 4.0
*/ */
public void reindex(ICProject project); 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 * Returns the absolute file path of an URI or null if the
* URI is not a filesystem path. * URI is not a filesystem path.
* @param uri
* @return the absolute file path of an URI or null if the * @return the absolute file path of an URI or null if the
* URI is not a filesystem path. * URI is not a filesystem path.
*/ */
@ -92,12 +91,11 @@ public class IndexLocationFactory {
IFile[] files = ResourcesPlugin.getWorkspace().getRoot().findFilesForLocation(new Path(absolutePath)); IFile[] files = ResourcesPlugin.getWorkspace().getRoot().findFilesForLocation(new Path(absolutePath));
if(files.length==1) { if(files.length==1) {
return getWorkspaceIFL(files[0]); return getWorkspaceIFL(files[0]);
} else { }
if(cproject!=null) { if(cproject!=null) {
for(int i=0; i<files.length; i++) { for(int i=0; i<files.length; i++) {
if(files[i].getProject().equals(cproject.getProject())) if(files[i].getProject().equals(cproject.getProject()))
return getWorkspaceIFL(files[i]); return getWorkspaceIFL(files[i]);
}
} }
} }
return new IndexFileLocation(URIUtil.toURI(absolutePath), null); return new IndexFileLocation(URIUtil.toURI(absolutePath), null);
@ -148,13 +146,11 @@ public class IndexLocationFactory {
IResource res = tu.getResource(); IResource res = tu.getResource();
if(res instanceof IFile) { if(res instanceof IFile) {
return getWorkspaceIFL((IFile)res); 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 * @param option
* @return the list of parameters given with this option * @return the list of parameters given with this option
* @throws CoreException
*/ */
public List<String> getParameters(String option) { public List<String> getParameters(String option) {
return arguments.get(option); return arguments.get(option);
@ -100,7 +99,6 @@ public abstract class AbstractExportProjectProvider implements IExportProjectPro
* user. * user.
* @param option * @param option
* @param expected the number of parameters expected * @param expected the number of parameters expected
* @return
* @throws CoreException * @throws CoreException
*/ */
public List<String> getParameters(String option, int expected) 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 * <li>-id the id to write to the produce fragment
* </ul> * </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 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 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$ 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 * 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. * not itself index the project, as a reindex will be performed by the framework.
* May not return null. * May not return null.
* @return
*/ */
public ICProject createProject() throws CoreException; 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 * 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. * IIndexFileLocation's to an external form. The external form is implementation dependent.
* @param cproject * @param cproject
* @return
* @see URIRelativeLocationConverter * @see URIRelativeLocationConverter
* @see ResourceContainerRelativeLocationConverter * @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 * 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). * 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 * @param project
* @return
*/ */
public boolean providesFor(ICProject project) throws CoreException; public boolean providesFor(ICProject project) throws CoreException;
} }

View file

@ -10,7 +10,7 @@
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.core.parser; package org.eclipse.cdt.core.parser;
public abstract class AbstractParserLogService implements IParserLogService { public abstract class AbstractParserLogService implements IParserLogService {
public void traceLog(String message) { public void traceLog(String message) {

View file

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

View file

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

View file

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

View file

@ -331,14 +331,6 @@ public class ASTPrinter {
private void print(IBinding binding) { private void print(IBinding binding) {
ASTPrinter.print(out, indentLevel, binding); ASTPrinter.print(out, indentLevel, binding);
} }
@Override
public int visit(IASTComment comment) {
print(comment);
indentLevel++;
return super.visit(comment);
}
@Override @Override
public int visit(ICASTDesignator designator) { public int visit(ICASTDesignator designator) {
@ -450,11 +442,6 @@ public class ASTPrinter {
return super.visit(typeId); return super.visit(typeId);
} }
@Override
public int leave(IASTComment comment) {
indentLevel--;
return super.leave(comment);
}
@Override @Override
public int leave(ICASTDesignator designator) { 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 * If the array is null or not large enough, a larger one is allocated, using
* the given class object. * 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 ) if( obj == null )
return array; return array;
if( array == null || array.length == 0){ if( array == null || array.length == 0){
@ -74,7 +74,7 @@ public class ArrayUtil {
* Appends object using the current length of the array. * Appends object using the current length of the array.
* @since 4.0 * @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 ) if( obj == null )
return array; return array;
if( array == null || array.length == 0){ 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 * if forceNew == false, a new array will only be created if the original array
* contained null entries. * contained null entries.
* *
* @param Class c: the type of the new array * @param c the type of the new array
* @param Object [] array, the array to be trimmed * @param array the array to be trimmed
* @param forceNew * @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 ) if( array == null )
return (Object[]) Array.newInstance( c, 0 ); return (Object[]) Array.newInstance( c, 0 );
@ -133,19 +132,15 @@ public class ArrayUtil {
return temp; return temp;
} }
/**
* @param class1 public static Object[] trim( Class<?> c, Object[] array ) {
* @param fields
* @return
*/
public static Object[] trim( Class c, Object[] array ) {
return trim( c, array, false ); return trim( c, array, false );
} }
/** /**
* Assumes that both arrays contain nulls at the end, only. * 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 ) if( source == null || source.length == 0 )
return dest; return dest;
@ -224,8 +219,8 @@ public class ArrayUtil {
* Assumes that array contains nulls at the end, only. * 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 * 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(). * contain the object, or if the array is null. Comparison is by equals().
* @param array the array to search * @param comments the array to search
* @param obj the object to search for * @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 * @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 * 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 * If there are no nulls in the original array then the original
* array is returned. * array is returned.
*/ */
public static Object[] removeNulls(Class c, Object[] array) { public static Object[] removeNulls(Class<?> c, Object[] array) {
if( array == null ) if( array == null )
return (Object[]) Array.newInstance( c, 0 ); 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. * 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. * 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) if( array == null || index < 0)
return (Object[]) Array.newInstance( c, 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 * Insert the obj at the beginning of the array, shifting the whole thing one index
* Assumes that array contains nulls at the end, only. * 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 ) if( obj == null )
return array; return array;
if( array == null || array.length == 0){ if( array == null || array.length == 0){

View file

@ -42,11 +42,6 @@ public class BacktrackException extends Exception {
return problem; return problem;
} }
/**
* @param startingOffset
* @param endingOffset
* @param f TODO
*/
public void initialize(int start, int l ) { public void initialize(int start, int l ) {
reset(); reset();
offset = start; 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.ICPPASTFunctionTryBlockDeclarator;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTNamespaceDefinition; 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.ICPPASTTemplateParameter;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTVisitor;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompositeTypeSpecifier.ICPPASTBaseSpecifier; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompositeTypeSpecifier.ICPPASTBaseSpecifier;
/** /**
* Visitor to search for nodes by file offsets. * Visitor to search for nodes by file offsets.
* @since 5.0 * @since 5.0
*/ */
public class FindNodeForOffsetAction extends CPPASTVisitor implements ICASTVisitor, ICPPASTVisitor { public class FindNodeForOffsetAction extends CPPASTVisitor implements ICASTVisitor {
private final ASTNodeSpecification<?> fNodeSpec; private final ASTNodeSpecification<?> fNodeSpec;
public FindNodeForOffsetAction(ASTNodeSpecification<?> nodeSpec) { public FindNodeForOffsetAction(ASTNodeSpecification<?> nodeSpec) {
@ -180,16 +179,10 @@ public class FindNodeForOffsetAction extends CPPASTVisitor implements ICASTVisit
return processNode(problem); 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) { public int visit(ICASTDesignator designator) {
return processNode(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) { public int leave(ICASTDesignator designator) {
return PROCESS_CONTINUE; return PROCESS_CONTINUE;
} }

View file

@ -124,9 +124,6 @@ public class CArrayType implements ICArrayType, ITypeContainer {
return t; return t;
} }
/**
* @return
*/
public ICASTArrayModifier getModifier() { public ICASTArrayModifier getModifier() {
return mod; 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.IASTName;
import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit; 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.IFunctionType;
import org.eclipse.cdt.core.dom.ast.IScope; import org.eclipse.cdt.core.dom.ast.IScope;
import org.eclipse.cdt.core.dom.ast.IType; 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 * @author aniefer
*/ */
public class CExternalFunction extends CFunction implements IFunction, ICExternalBinding { public class CExternalFunction extends CFunction implements ICExternalBinding {
private IASTName name = null; private IASTName name = null;
private IASTTranslationUnit tu = null; private IASTTranslationUnit tu = null;
@ -37,9 +36,7 @@ public class CExternalFunction extends CFunction implements IFunction, ICExterna
this.tu = tu; this.tu = tu;
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IFunction#getType()
*/
@Override @Override
public IFunctionType getType() { public IFunctionType getType() {
IFunctionType t = super.getType(); IFunctionType t = super.getType();
@ -54,33 +51,21 @@ public class CExternalFunction extends CFunction implements IFunction, ICExterna
return tu; return tu;
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getName()
*/
@Override @Override
public String getName() { public String getName() {
return name.toString(); return name.toString();
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getNameCharArray()
*/
@Override @Override
public char[] getNameCharArray() { public char[] getNameCharArray() {
return name.toCharArray(); return name.toCharArray();
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getScope()
*/
@Override @Override
public IScope getScope() { public IScope getScope() {
return tu.getScope(); return tu.getScope();
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IFunction#isExtern()
*/
@Override @Override
public boolean isExtern() { public boolean isExtern() {
return true; return true;

View file

@ -77,23 +77,22 @@ public class CFunction extends PlatformObject implements IFunction, ICInternalFu
updateParameterBindings( fnDeclarator ); updateParameterBindings( fnDeclarator );
definition = fnDeclarator; definition = fnDeclarator;
return; 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() { protected IASTTranslationUnit getTranslationUnit() {
@ -374,9 +373,7 @@ public class CFunction extends PlatformObject implements IFunction, ICInternalFu
return false; return false;
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IFunction#isExtern()
*/
public boolean isExtern() { public boolean isExtern() {
return isExtern(true); return isExtern(true);
} }
@ -388,9 +385,7 @@ public class CFunction extends PlatformObject implements IFunction, ICInternalFu
return hasStorageClass( IASTDeclSpecifier.sc_extern); return hasStorageClass( IASTDeclSpecifier.sc_extern);
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IFunction#isAuto()
*/
public boolean isAuto() { public boolean isAuto() {
if( (bits & FULLY_RESOLVED) == 0 ){ if( (bits & FULLY_RESOLVED) == 0 ){
resolveAllDeclarations(); resolveAllDeclarations();
@ -398,9 +393,7 @@ public class CFunction extends PlatformObject implements IFunction, ICInternalFu
return hasStorageClass( IASTDeclSpecifier.sc_auto); return hasStorageClass( IASTDeclSpecifier.sc_auto);
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IFunction#isRegister()
*/
public boolean isRegister() { public boolean isRegister() {
if( (bits & FULLY_RESOLVED) == 0 ){ if( (bits & FULLY_RESOLVED) == 0 ){
resolveAllDeclarations(); resolveAllDeclarations();
@ -408,9 +401,7 @@ public class CFunction extends PlatformObject implements IFunction, ICInternalFu
return hasStorageClass( IASTDeclSpecifier.sc_register); return hasStorageClass( IASTDeclSpecifier.sc_register);
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IFunction#isInline()
*/
public boolean isInline() { public boolean isInline() {
if( (bits & FULLY_RESOLVED) == 0 ){ if( (bits & FULLY_RESOLVED) == 0 ){
resolveAllDeclarations(); resolveAllDeclarations();
@ -442,9 +433,7 @@ public class CFunction extends PlatformObject implements IFunction, ICInternalFu
return false; return false;
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IFunction#takesVarArgs()
*/
public boolean takesVarArgs() { public boolean takesVarArgs() {
if( (bits & FULLY_RESOLVED) == 0 ){ if( (bits & FULLY_RESOLVED) == 0 ){
resolveAllDeclarations(); resolveAllDeclarations();

View file

@ -10,7 +10,6 @@
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.internal.core.dom.parser.c; 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.IFunctionType;
import org.eclipse.cdt.core.dom.ast.IParameter; import org.eclipse.cdt.core.dom.ast.IParameter;
import org.eclipse.cdt.core.dom.ast.IScope; import org.eclipse.cdt.core.dom.ast.IScope;
@ -23,7 +22,7 @@ import org.eclipse.cdt.core.dom.ast.IScope;
* *
* @author dsteffle * @author dsteffle
*/ */
public class CImplicitFunction extends CExternalFunction implements IFunction, ICInternalBinding { public class CImplicitFunction extends CExternalFunction {
private IParameter[] parms=null; private IParameter[] parms=null;
private IScope scope=null; private IScope scope=null;
@ -39,55 +38,32 @@ public class CImplicitFunction extends CExternalFunction implements IFunction, I
this.takesVarArgs=takesVarArgs; this.takesVarArgs=takesVarArgs;
} }
/*
* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IFunction#getParameters()
*/
@Override @Override
public IParameter[] getParameters() { public IParameter[] getParameters() {
return parms; return parms;
} }
/*
* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IFunction#getType()
*/
@Override @Override
public IFunctionType getType() { public IFunctionType getType() {
return type; return type;
} }
/*
* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IFunction#takesVarArgs()
*/
@Override @Override
public boolean takesVarArgs() { public boolean takesVarArgs() {
return takesVarArgs; return takesVarArgs;
} }
/*
* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getName()
*/
@Override @Override
public String getName() { public String getName() {
return String.valueOf(name); return String.valueOf(name);
} }
/*
* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getNameCharArray()
*/
@Override @Override
public char[] getNameCharArray() { public char[] getNameCharArray() {
return name; return name;
} }
/*
* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getScope()
*/
@Override @Override
public IScope getScope() { public IScope getScope() {
return scope; 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.IASTNode;
import org.eclipse.cdt.core.dom.ast.IScope; import org.eclipse.cdt.core.dom.ast.IScope;
import org.eclipse.cdt.core.dom.ast.IType; 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 * 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 * @author dsteffle
*/ */
public class CImplicitTypedef extends CTypedef implements ITypedef, ICInternalBinding { public class CImplicitTypedef extends CTypedef {
private IType type=null; private IType type=null;
private char[] name=null; private char[] name=null;
private IScope scope=null; private IScope scope=null;
@ -35,33 +34,21 @@ public class CImplicitTypedef extends CTypedef implements ITypedef, ICInternalBi
this.scope = scope; this.scope = scope;
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.ITypedef#getType()
*/
@Override @Override
public IType getType() { public IType getType() {
return type; return type;
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getName()
*/
@Override @Override
public String getName() { public String getName() {
return String.valueOf(name); return String.valueOf(name);
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getNameCharArray()
*/
@Override @Override
public char[] getNameCharArray() { public char[] getNameCharArray() {
return name; return name;
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getScope()
*/
@Override @Override
public IScope getScope() { public IScope getScope() {
return scope; return scope;
@ -100,10 +87,6 @@ public class CImplicitTypedef extends CTypedef implements ITypedef, ICInternalBi
// return t; // return t;
// } // }
/**
* returns null
* @return
*/
@Override @Override
public IASTNode getPhysicalNode() { public IASTNode getPhysicalNode() {
return null; 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. * CQualifierType has an IBasicType to keep track of the basic type information.
*
* @param type the CQualifierType's IBasicType
*/ */
public CQualifierType(ICASTDeclSpecifier declSpec) { public CQualifierType(ICASTDeclSpecifier declSpec) {
this.type = resolveType( declSpec ); this.type = resolveType( declSpec );

View file

@ -289,7 +289,7 @@ public class CVisitor {
parent = parent.getParent(); parent = parent.getParent();
if ( parent instanceof IASTDeclaration ) { if ( parent instanceof IASTDeclaration ) {
if ( parent != null && parent instanceof IASTFunctionDefinition ) { if ( parent instanceof IASTFunctionDefinition ) {
if ( declarator.getName() != null && declarator.getName().resolveBinding() == binding ) { if ( declarator.getName() != null && declarator.getName().resolveBinding() == binding ) {
addName(declarator.getName()); addName(declarator.getName());
} }
@ -895,7 +895,6 @@ public class CVisitor {
try { try {
binding = ( scope != null ) ? scope.getBinding( name, false ) : null; binding = ( scope != null ) ? scope.getBinding( name, false ) : null;
} catch ( DOMException e1 ) { } catch ( DOMException e1 ) {
binding = null;
} }
if( parent instanceof IASTParameterDeclaration || parent.getPropertyInParent() == ICASTKnRFunctionDeclarator.FUNCTION_PARAMETER ){ 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()); return new ProblemBinding( node, IProblemBinding.SEMANTIC_NAME_NOT_FOUND, name.toCharArray());
if( binding instanceof IType ) if( binding instanceof IType )
return binding; 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 ) { } catch ( DOMException e ) {
return null; 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 index will be search later, still we need to look at the declarations found in
// the AST, bug 180883 // the AST, bug 180883
nodes = translation.getDeclarations(); nodes = translation.getDeclarations();
scope = null;
} }
} else if( parent instanceof IASTStandardFunctionDeclarator ){ } else if( parent instanceof IASTStandardFunctionDeclarator ){
IASTStandardFunctionDeclarator dtor = (IASTStandardFunctionDeclarator) parent; IASTStandardFunctionDeclarator dtor = (IASTStandardFunctionDeclarator) parent;
@ -1314,7 +1311,7 @@ public class CVisitor {
boolean reachedBlockItem = false; boolean reachedBlockItem = false;
if( nodes != null ){ if( nodes != null ){
int idx = -1; 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 ) { while( node != null ) {
Object candidate = null; Object candidate = null;
try { try {
@ -1418,8 +1415,7 @@ public class CVisitor {
if( blockItem != null) { if( blockItem != null) {
if (binding == null) if (binding == null)
return externalBinding( (IASTTranslationUnit) blockItem, name ); return externalBinding( (IASTTranslationUnit) blockItem, name );
else return binding;
return binding;
} }
return null; return null;
} }
@ -1785,11 +1781,10 @@ public class CVisitor {
* behaviour and is used as the foundation of the ITypes being created. * 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. * 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 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 * @return the base IType
*/ */
@SuppressWarnings("null")
public static IType createBaseType( IASTDeclSpecifier declSpec ) { public static IType createBaseType( IASTDeclSpecifier declSpec ) {
if( declSpec instanceof IGCCASTSimpleDeclSpecifier ){ if( declSpec instanceof IGCCASTSimpleDeclSpecifier ){
IASTExpression exp = ((IGCCASTSimpleDeclSpecifier)declSpec).getTypeofExpression(); IASTExpression exp = ((IGCCASTSimpleDeclSpecifier)declSpec).getTypeofExpression();
@ -1968,23 +1963,14 @@ public class CVisitor {
return action.getDeclarationNames(); return action.getDeclarationNames();
} }
/**
* @param unit
* @param binding
* @return
*/
public static IASTName[] getReferences(IASTTranslationUnit tu, IBinding binding) { public static IASTName[] getReferences(IASTTranslationUnit tu, IBinding binding) {
CollectReferencesAction action = new CollectReferencesAction( binding ); CollectReferencesAction action = new CollectReferencesAction( binding );
tu.accept(action); tu.accept(action);
return action.getReferences(); return action.getReferences();
} }
/**
* @param startingPoint
* @param name
* @return
* @throws DOMException
*/
public static IBinding findTypeBinding(IASTNode startingPoint, IASTName name) throws DOMException { public static IBinding findTypeBinding(IASTNode startingPoint, IASTName name) throws DOMException {
if( startingPoint instanceof IASTTranslationUnit ) if( startingPoint instanceof IASTTranslationUnit )
{ {
@ -2084,7 +2070,7 @@ public class CVisitor {
scope = scope.getParent(); scope = scope.getParent();
} while( scope != null ); } 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]; IBinding [] result = new IBinding [c];
@ -2094,8 +2080,7 @@ public class CVisitor {
if (b2 != null) if (b2 != null)
ArrayUtil.addAll(IBinding.class, result, b2); 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; 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.ASTVisitor;
import org.eclipse.cdt.core.dom.ast.IASTEnumerationSpecifier; import org.eclipse.cdt.core.dom.ast.IASTEnumerationSpecifier;
import org.eclipse.cdt.core.dom.ast.IASTName; 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; import org.eclipse.cdt.core.parser.util.ArrayUtil;
/** /**
* @author jcamelon * @author jcamelon
*/ */
public class CPPASTEnumerationSpecifier extends CPPASTBaseDeclSpecifier public class CPPASTEnumerationSpecifier extends CPPASTBaseDeclSpecifier
implements IASTEnumerationSpecifier, ICPPASTDeclSpecifier { implements IASTEnumerationSpecifier {
private IASTName name; private IASTName name;

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -98,9 +98,7 @@ public class CPPField extends CPPVariable implements ICPPField {
} }
return null; return null;
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPMember#getVisibility()
*/
public int getVisibility() throws DOMException { public int getVisibility() throws DOMException {
ICPPASTVisiblityLabel vis = null; ICPPASTVisiblityLabel vis = null;
IASTDeclaration decl = getPrimaryDeclaration(); IASTDeclaration decl = getPrimaryDeclaration();
@ -141,9 +139,7 @@ public class CPPField extends CPPVariable implements ICPPField {
return super.isStatic(); return super.isStatic();
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPVariable#isMutable()
*/
@Override @Override
public boolean isMutable() { public boolean isMutable() {
return hasStorageClass( ICPPASTDeclSpecifier.sc_mutable); 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() { public IASTNode[] getDeclarations() {
return declarations; return declarations;
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPBinding#getDefinition()
*/
public IASTNode getDefinition() { public IASTNode getDefinition() {
return definition; 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() { public IParameter[] getParameters() {
IASTStandardFunctionDeclarator dtor = (definition != null) ? definition : declarations[0]; IASTStandardFunctionDeclarator dtor = (definition != null) ? definition : declarations[0];
IASTParameterDeclaration[] params = dtor.getParameters(); IASTParameterDeclaration[] params = dtor.getParameters();
@ -234,9 +228,7 @@ public class CPPFunction extends PlatformObject implements ICPPFunction, ICPPInt
return result; return result;
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IFunction#getFunctionScope()
*/
public IScope getFunctionScope() { public IScope getFunctionScope() {
resolveAllDeclarations(); resolveAllDeclarations();
if (definition != null) { if (definition != null) {
@ -246,16 +238,12 @@ public class CPPFunction extends PlatformObject implements ICPPFunction, ICPPInt
return declarations[0].getFunctionScope(); return declarations[0].getFunctionScope();
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getName()
*/
public String getName() { public String getName() {
return getASTName().toString(); return getASTName().toString();
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getNameCharArray()
*/
public char[] getNameCharArray() { public char[] getNameCharArray() {
return getASTName().toCharArray(); 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() { public IScope getScope() {
IASTName n = getASTName(); IASTName n = getASTName();
IScope scope = CPPVisitor.getContainingScope(n); IScope scope = CPPVisitor.getContainingScope(n);
@ -309,9 +295,7 @@ public class CPPFunction extends PlatformObject implements ICPPFunction, ICPPInt
return scope; return scope;
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IFunction#getType()
*/
public IFunctionType getType() { public IFunctionType getType() {
if (type == null) if (type == null)
type = (IFunctionType) CPPVisitor.createType((definition != null) ? definition : declarations[0]); 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() { public boolean isStatic() {
return isStatic(true); return isStatic(true);
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalFunction#isStatic(boolean)
*/
public boolean isStatic(boolean resolveAll) { public boolean isStatic(boolean resolveAll) {
if (resolveAll && (bits & FULLY_RESOLVED) == 0) { if (resolveAll && (bits & FULLY_RESOLVED) == 0) {
resolveAllDeclarations(); resolveAllDeclarations();
@ -430,23 +410,17 @@ public class CPPFunction extends PlatformObject implements ICPPFunction, ICPPInt
// return false; // return false;
// } // }
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getFullyQualifiedName()
*/
public String[] getQualifiedName() { public String[] getQualifiedName() {
return CPPVisitor.getQualifiedName(this); return CPPVisitor.getQualifiedName(this);
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getFullyQualifiedNameCharArray()
*/
public char[][] getQualifiedNameCharArray() { public char[][] getQualifiedNameCharArray() {
return CPPVisitor.getQualifiedNameCharArray(this); return CPPVisitor.getQualifiedNameCharArray(this);
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPBinding#isGloballyQualified()
*/
public boolean isGloballyQualified() throws DOMException { public boolean isGloballyQualified() throws DOMException {
IScope scope = getScope(); IScope scope = getScope();
while (scope != null) { while (scope != null) {
@ -487,16 +461,10 @@ public class CPPFunction extends PlatformObject implements ICPPFunction, ICPPInt
return false; return false;
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPFunction#isMutable()
*/
public boolean isMutable() { public boolean isMutable() {
return false; return false;
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPFunction#isInline()
*/
public boolean isInline() throws DOMException { public boolean isInline() throws DOMException {
ICPPASTFunctionDeclarator dtor = (ICPPASTFunctionDeclarator) getDefinition(); ICPPASTFunctionDeclarator dtor = (ICPPASTFunctionDeclarator) getDefinition();
ICPPASTFunctionDeclarator[] ds = (ICPPASTFunctionDeclarator[]) getDeclarations(); ICPPASTFunctionDeclarator[] ds = (ICPPASTFunctionDeclarator[]) getDeclarations();
@ -524,9 +492,6 @@ public class CPPFunction extends PlatformObject implements ICPPFunction, ICPPInt
return false; return false;
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPFunction#isInline()
*/
public boolean isExternC() throws DOMException { public boolean isExternC() throws DOMException {
if (CPPVisitor.isExternC(getDefinition())) { if (CPPVisitor.isExternC(getDefinition())) {
return true; return true;
@ -542,30 +507,18 @@ public class CPPFunction extends PlatformObject implements ICPPFunction, ICPPInt
return false; return false;
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IFunction#isExtern()
*/
public boolean isExtern() { public boolean isExtern() {
return hasStorageClass(this, IASTDeclSpecifier.sc_extern); return hasStorageClass(this, IASTDeclSpecifier.sc_extern);
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IFunction#isAuto()
*/
public boolean isAuto() { public boolean isAuto() {
return hasStorageClass(this, IASTDeclSpecifier.sc_auto); return hasStorageClass(this, IASTDeclSpecifier.sc_auto);
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IFunction#isRegister()
*/
public boolean isRegister() { public boolean isRegister() {
return hasStorageClass(this, IASTDeclSpecifier.sc_register); return hasStorageClass(this, IASTDeclSpecifier.sc_register);
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IFunction#takesVarArgs()
*/
public boolean takesVarArgs() { public boolean takesVarArgs() {
ICPPASTFunctionDeclarator dtor = (ICPPASTFunctionDeclarator) getDefinition(); ICPPASTFunctionDeclarator dtor = (ICPPASTFunctionDeclarator) getDefinition();
if (dtor != null) { if (dtor != null) {

View file

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

View file

@ -24,7 +24,7 @@ import org.eclipse.cdt.core.dom.ast.ITypedef;
* *
* @author dsteffle * @author dsteffle
*/ */
public class CPPImplicitTypedef extends CPPTypedef implements ITypedef, ICPPInternalBinding { public class CPPImplicitTypedef extends CPPTypedef {
private IType type=null; private IType type=null;
private char[] name=null; private char[] name=null;
private IScope scope=null; private IScope scope=null;
@ -36,41 +36,26 @@ public class CPPImplicitTypedef extends CPPTypedef implements ITypedef, ICPPInte
this.scope = scope; this.scope = scope;
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.ITypedef#getType()
*/
@Override @Override
public IType getType() { public IType getType() {
return type; return type;
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getName()
*/
@Override @Override
public String getName() { public String getName() {
return String.valueOf(name); return String.valueOf(name);
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getNameCharArray()
*/
@Override @Override
public char[] getNameCharArray() { public char[] getNameCharArray() {
return name; return name;
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getScope()
*/
@Override @Override
public IScope getScope() { public IScope getScope() {
return scope; return scope;
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IType#isSameType(org.eclipse.cdt.core.dom.ast.IType)
*/
@Override @Override
public boolean isSameType(IType t) { public boolean isSameType(IType t) {
if( t == this ) if( t == this )
@ -91,9 +76,6 @@ public class CPPImplicitTypedef extends CPPTypedef implements ITypedef, ICPPInte
return false; return false;
} }
/* (non-Javadoc)
* @see java.lang.Object#clone()
*/
@Override @Override
public Object clone(){ public Object clone(){
IType t = null; IType t = null;
@ -141,9 +123,7 @@ public class CPPImplicitTypedef extends CPPTypedef implements ITypedef, ICPPInte
// do nothing // do nothing
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getFullyQualifiedName()
*/
@Override @Override
public String[] getQualifiedName() { public String[] getQualifiedName() {
String[] temp = new String[1]; String[] temp = new String[1];
@ -152,9 +132,7 @@ public class CPPImplicitTypedef extends CPPTypedef implements ITypedef, ICPPInte
return temp; return temp;
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getFullyQualifiedNameCharArray()
*/
@Override @Override
public char[][] getQualifiedNameCharArray() { public char[][] getQualifiedNameCharArray() {
char[][] temp = new char[1][]; 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 { public class CPPLabel extends PlatformObject implements ILabel, ICPPInternalBinding {
private IASTName statement; private IASTName statement;
/**
* @param gotoStatement
*/
public CPPLabel( IASTName statement ) { public CPPLabel( IASTName statement ) {
this.statement = statement; this.statement = statement;
statement.setBinding( this ); statement.setBinding( this );
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPBinding#getDeclarations()
*/
public IASTNode[] getDeclarations() { public IASTNode[] getDeclarations() {
return null; return null;
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPBinding#getDefinition()
*/
public IASTNode getDefinition() { public IASTNode getDefinition() {
return statement; return statement;
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.ILabel#getLabelStatement()
*/
public IASTLabelStatement getLabelStatement() { public IASTLabelStatement getLabelStatement() {
if( statement instanceof IASTLabelStatement ) if( statement instanceof IASTLabelStatement )
return (IASTLabelStatement) statement; return (IASTLabelStatement) statement;
@ -59,73 +48,44 @@ public class CPPLabel extends PlatformObject implements ILabel, ICPPInternalBind
return null; return null;
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getName()
*/
public String getName() { public String getName() {
return statement.toString(); return statement.toString();
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getNameCharArray()
*/
public char[] getNameCharArray() { public char[] getNameCharArray() {
return statement.toCharArray(); return statement.toCharArray();
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getScope()
*/
public IScope getScope() { public IScope getScope() {
return CPPVisitor.getContainingScope( statement ); return CPPVisitor.getContainingScope( statement );
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getPhysicalNode()
*/
public IASTNode getPhysicalNode() { public IASTNode getPhysicalNode() {
return statement; return statement;
} }
/**
* @param labelStatement
*/
public void setLabelStatement( IASTName labelStatement ) { public void setLabelStatement( IASTName labelStatement ) {
statement = labelStatement; statement = labelStatement;
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getFullyQualifiedName()
*/
public String[] getQualifiedName() { public String[] getQualifiedName() {
return new String[] { getName() }; return new String[] { getName() };
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IBinding#getFullyQualifiedNameCharArray()
*/
public char[][] getQualifiedNameCharArray() { public char[][] getQualifiedNameCharArray() {
return new char [] [] { getNameCharArray() }; return new char [] [] { getNameCharArray() };
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPBinding#isGloballyQualified()
*/
public boolean isGloballyQualified() { public boolean isGloballyQualified() {
return false; 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) { public void addDefinition(IASTNode node) {
// TODO Auto-generated method stub // 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) { public void addDeclaration(IASTNode node) {
// TODO Auto-generated method stub // TODO Auto-generated method stub

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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