mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-06 07:45:50 +02:00
Bug Fixing
This commit is contained in:
parent
3fd15075c3
commit
7b219f7c9b
11 changed files with 142 additions and 73 deletions
|
@ -1,35 +1,41 @@
|
||||||
|
/**********************************************************************
|
||||||
|
Copyright (c) 2002, 2004 IBM Rational Software and others.
|
||||||
|
All rights reserved. This program and the accompanying materials
|
||||||
|
are made available under the terms of the Common Public License v1.0
|
||||||
|
which accompanies this distribution, and is available at
|
||||||
|
http://www.eclipse.org/legal/cpl-v10.html
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
IBM Rational Software - Initial API and implementation
|
||||||
|
**********************************************************************/
|
||||||
package org.eclipse.cdt.core.model;
|
package org.eclipse.cdt.core.model;
|
||||||
|
|
||||||
/**********************************************************************
|
/**
|
||||||
* Copyright (c) 2002,2003 Rational Software Corporation and others.
|
* IDeclaration is a base interface for any C Model element that could be
|
||||||
* All rights reserved. This program and the accompanying materials
|
* considered a declaration.
|
||||||
* are made available under the terms of the Common Public License v0.5
|
*/
|
||||||
* which accompanies this distribution, and is available at
|
|
||||||
* http://www.eclipse.org/legal/cpl-v05.html
|
|
||||||
*
|
|
||||||
* Contributors:
|
|
||||||
* Rational Software - Initial API and implementation
|
|
||||||
***********************************************************************/
|
|
||||||
|
|
||||||
public interface IDeclaration extends ICElement, ISourceManipulation, ISourceReference {
|
public interface IDeclaration extends ICElement, ISourceManipulation, ISourceReference {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Checks if the declaration is static
|
||||||
* @return
|
* Returns true if the declaration is static, false otherwise.
|
||||||
|
* @return boolean
|
||||||
* @throws CModelException
|
* @throws CModelException
|
||||||
*/
|
*/
|
||||||
boolean isStatic() throws CModelException;
|
boolean isStatic() throws CModelException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Checks if the declaration is constant.
|
||||||
* @return
|
* Returns true if the decalration is constant, false otherwise.
|
||||||
|
* @return boolean
|
||||||
* @throws CModelException
|
* @throws CModelException
|
||||||
*/
|
*/
|
||||||
boolean isConst() throws CModelException;
|
boolean isConst() throws CModelException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Checks if the declaration is volatile.
|
||||||
* @return
|
* Returns true if the declaration is volatile, false otherwise.
|
||||||
|
* @return boolean
|
||||||
* @throws CModelException
|
* @throws CModelException
|
||||||
*/
|
*/
|
||||||
boolean isVolatile() throws CModelException;
|
boolean isVolatile() throws CModelException;
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package org.eclipse.cdt.core.model;
|
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* Copyright (c) 2002,2003 Rational Software Corporation and others.
|
* Copyright (c) 2002,2004 Rational Software Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Common Public License v0.5
|
* are made available under the terms of the Common Public License v0.5
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -10,10 +8,12 @@ package org.eclipse.cdt.core.model;
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Rational Software - Initial API and implementation
|
* Rational Software - Initial API and implementation
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
|
package org.eclipse.cdt.core.model;
|
||||||
|
|
||||||
public interface IEnumerator extends ICElement, ISourceManipulation{
|
public interface IEnumerator extends ICElement, ISourceManipulation{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the enumerator constant expression if any.
|
* Returns the enumerator's constant expression if any.
|
||||||
* Returns null otherwise.
|
* Returns null otherwise.
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -6,7 +6,7 @@ package org.eclipse.cdt.core.model;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a function.
|
* Represents a function definition.
|
||||||
*/
|
*/
|
||||||
public interface IFunction extends IFunctionDeclaration {
|
public interface IFunction extends IFunctionDeclaration {
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,27 @@
|
||||||
|
/**********************************************************************
|
||||||
|
Copyright (c) 2002, 2004 IBM Rational Software and others.
|
||||||
|
All rights reserved. This program and the accompanying materials
|
||||||
|
are made available under the terms of the Common Public License v1.0
|
||||||
|
which accompanies this distribution, and is available at
|
||||||
|
http://www.eclipse.org/legal/cpl-v10.html
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
IBM Rational Software - Initial API and implementation
|
||||||
|
**********************************************************************/
|
||||||
package org.eclipse.cdt.core.model;
|
package org.eclipse.cdt.core.model;
|
||||||
|
|
||||||
/*
|
|
||||||
* (c) Copyright IBM Corp. 2000, 2001.
|
|
||||||
* All Rights Reserved.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a field declared in a type.
|
* Represents a field declared in a type.
|
||||||
*/
|
*/
|
||||||
public interface IMacro extends ICElement, ISourceManipulation, ISourceReference {
|
public interface IMacro extends ICElement, ISourceManipulation, ISourceReference {
|
||||||
|
/**
|
||||||
|
* Returns the Identifier List.
|
||||||
|
* @return String
|
||||||
|
*/
|
||||||
String getIdentifierList();
|
String getIdentifierList();
|
||||||
|
/**
|
||||||
|
* Returns the Token Sequence.
|
||||||
|
* @return String
|
||||||
|
*/
|
||||||
String getTokenSequence();
|
String getTokenSequence();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,17 @@
|
||||||
|
/**********************************************************************
|
||||||
|
Copyright (c) 2002, 2004 IBM Rational Software and others.
|
||||||
|
All rights reserved. This program and the accompanying materials
|
||||||
|
are made available under the terms of the Common Public License v1.0
|
||||||
|
which accompanies this distribution, and is available at
|
||||||
|
http://www.eclipse.org/legal/cpl-v10.html
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
IBM Rational Software - Initial API and implementation
|
||||||
|
**********************************************************************/
|
||||||
package org.eclipse.cdt.core.model;
|
package org.eclipse.cdt.core.model;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.parser.ast.ASTAccessVisibility;
|
import org.eclipse.cdt.core.parser.ast.ASTAccessVisibility;
|
||||||
|
|
||||||
/*
|
|
||||||
* (c) Copyright IBM Corp. 2000, 2001.
|
|
||||||
* All Rights Reserved.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Common protocol for C elements that can be members of types.
|
* Common protocol for C elements that can be members of types.
|
||||||
* This set consists of <code>IType</code>, <code>IMethod</code>,
|
* This set consists of <code>IType</code>, <code>IMethod</code>,
|
||||||
|
|
|
@ -1,10 +1,15 @@
|
||||||
|
/**********************************************************************
|
||||||
|
Copyright (c) 2002, 2004 IBM Rational Software and others.
|
||||||
|
All rights reserved. This program and the accompanying materials
|
||||||
|
are made available under the terms of the Common Public License v1.0
|
||||||
|
which accompanies this distribution, and is available at
|
||||||
|
http://www.eclipse.org/legal/cpl-v10.html
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
IBM Rational Software - Initial API and implementation
|
||||||
|
**********************************************************************/
|
||||||
package org.eclipse.cdt.core.model;
|
package org.eclipse.cdt.core.model;
|
||||||
|
|
||||||
/*
|
|
||||||
* (c) Copyright QNX Software Systems Ltd. 2002.
|
|
||||||
* All Rights Reserved.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents the definition method of a class.
|
* Represents the definition method of a class.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,13 +1,22 @@
|
||||||
|
/**********************************************************************
|
||||||
|
Copyright (c) 2002, 2004 IBM Rational Software and others.
|
||||||
|
All rights reserved. This program and the accompanying materials
|
||||||
|
are made available under the terms of the Common Public License v1.0
|
||||||
|
which accompanies this distribution, and is available at
|
||||||
|
http://www.eclipse.org/legal/cpl-v10.html
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
IBM Rational Software - Initial API and implementation
|
||||||
|
**********************************************************************/
|
||||||
package org.eclipse.cdt.core.model;
|
package org.eclipse.cdt.core.model;
|
||||||
/*
|
|
||||||
* (c) Copyright IBM Corp. 2000, 2001.
|
|
||||||
* All Rights Reserved.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a package declaration in a C translation unit.
|
* Represents a package declaration in a C translation unit.
|
||||||
*/
|
*/
|
||||||
public interface INamespace extends ICElement, IParent, ISourceManipulation, ISourceReference {
|
public interface INamespace extends ICElement, IParent, ISourceManipulation, ISourceReference {
|
||||||
|
/**
|
||||||
|
* Returns the typename of a namespace.
|
||||||
|
* @return String
|
||||||
|
*/
|
||||||
String getTypeName();
|
String getTypeName();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,16 @@
|
||||||
|
/**********************************************************************
|
||||||
|
Copyright (c) 2002, 2004 IBM Rational Software and others.
|
||||||
|
All rights reserved. This program and the accompanying materials
|
||||||
|
are made available under the terms of the Common Public License v1.0
|
||||||
|
which accompanies this distribution, and is available at
|
||||||
|
http://www.eclipse.org/legal/cpl-v10.html
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
IBM Rational Software - Initial API and implementation
|
||||||
|
**********************************************************************/
|
||||||
|
|
||||||
package org.eclipse.cdt.core.model;
|
package org.eclipse.cdt.core.model;
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* (c) Copyright QNX Software Systems Ltd. 2002.
|
|
||||||
* All Rights Reserved.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represent struct(ure), class or union.
|
* Represent struct(ure), class or union.
|
||||||
*/
|
*/
|
||||||
|
@ -13,45 +18,51 @@ public interface IStructure extends IInheritance, IParent, IVariableDeclaration
|
||||||
public IField getField(String name);
|
public IField getField(String name);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Returns the fields of a structure.
|
||||||
* @return
|
* @return an array of IField elements
|
||||||
* @throws CModelException
|
* @throws CModelException
|
||||||
*/
|
*/
|
||||||
public IField[] getFields() throws CModelException;
|
public IField[] getFields() throws CModelException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the specific method with the given name within the structure.
|
||||||
|
* Returns the first occurance more than one method has the same name.
|
||||||
|
* @param name
|
||||||
|
* @return IMethodDeclaration
|
||||||
|
*/
|
||||||
public IMethodDeclaration getMethod(String name);
|
public IMethodDeclaration getMethod(String name);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Returns all methods within the structure.
|
||||||
* @return
|
* @return array of IMethodDeclaration.
|
||||||
* @throws CModelException
|
* @throws CModelException
|
||||||
*/
|
*/
|
||||||
public IMethodDeclaration [] getMethods() throws CModelException;
|
public IMethodDeclaration [] getMethods() throws CModelException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Checks if the structure is a Union
|
||||||
* @return
|
* @return boolean
|
||||||
* @throws CModelException
|
* @throws CModelException
|
||||||
*/
|
*/
|
||||||
public boolean isUnion() throws CModelException;
|
public boolean isUnion() throws CModelException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Checks if the structure is a class
|
||||||
* @return
|
* @return boolean
|
||||||
* @throws CModelException
|
* @throws CModelException
|
||||||
*/
|
*/
|
||||||
public boolean isClass() throws CModelException;
|
public boolean isClass() throws CModelException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Checks if the structure is a struct
|
||||||
* @return
|
* @return boolean
|
||||||
* @throws CModelException
|
* @throws CModelException
|
||||||
*/
|
*/
|
||||||
public boolean isStruct() throws CModelException;
|
public boolean isStruct() throws CModelException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Checks if the structure is abstract
|
||||||
* @return
|
* @return boolean
|
||||||
* @throws CModelException
|
* @throws CModelException
|
||||||
*/
|
*/
|
||||||
public boolean isAbstract() throws CModelException;
|
public boolean isAbstract() throws CModelException;
|
||||||
|
|
|
@ -22,9 +22,15 @@ public interface ITemplate extends IDeclaration {
|
||||||
void setTemplateParameterTypes(String[] templateParameterTypes);
|
void setTemplateParameterTypes(String[] templateParameterTypes);
|
||||||
/**
|
/**
|
||||||
* Returns the template signature
|
* Returns the template signature
|
||||||
|
* The signature depends on the type of template.
|
||||||
|
* If it is a template of a structure or a variable, it will include the structure name
|
||||||
|
* and the list of parameters. If it is a template of a method or a function, it might
|
||||||
|
* include the class name with its template parameters (if any), as well as the function/method
|
||||||
|
* name, its template parameters, followed by its normal parameters.
|
||||||
* @return String
|
* @return String
|
||||||
* @throws CModelException
|
* @throws CModelException
|
||||||
*/
|
*/
|
||||||
|
|
||||||
String getTemplateSignature() throws CModelException;
|
String getTemplateSignature() throws CModelException;
|
||||||
/**
|
/**
|
||||||
* Returns the number of template parameters
|
* Returns the number of template parameters
|
||||||
|
|
|
@ -1,13 +1,22 @@
|
||||||
|
/**********************************************************************
|
||||||
|
Copyright (c) 2002, 2004 IBM Rational Software and others.
|
||||||
|
All rights reserved. This program and the accompanying materials
|
||||||
|
are made available under the terms of the Common Public License v1.0
|
||||||
|
which accompanies this distribution, and is available at
|
||||||
|
http://www.eclipse.org/legal/cpl-v10.html
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
IBM Rational Software - Initial API and implementation
|
||||||
|
**********************************************************************/
|
||||||
package org.eclipse.cdt.core.model;
|
package org.eclipse.cdt.core.model;
|
||||||
|
|
||||||
/*
|
|
||||||
* (c) Copyright IBM Corp. 2000, 2001.
|
|
||||||
* All Rights Reserved.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a global variable.
|
* Represents a global variable.
|
||||||
*/
|
*/
|
||||||
public interface IVariable extends IVariableDeclaration {
|
public interface IVariable extends IVariableDeclaration {
|
||||||
|
/**
|
||||||
|
* Returns the initializer of a variable.
|
||||||
|
* @return String
|
||||||
|
*/
|
||||||
public String getInitializer();
|
public String getInitializer();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,23 +1,28 @@
|
||||||
|
/**********************************************************************
|
||||||
|
Copyright (c) 2002, 2004 IBM Rational Software and others.
|
||||||
|
All rights reserved. This program and the accompanying materials
|
||||||
|
are made available under the terms of the Common Public License v1.0
|
||||||
|
which accompanies this distribution, and is available at
|
||||||
|
http://www.eclipse.org/legal/cpl-v10.html
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
IBM Rational Software - Initial API and implementation
|
||||||
|
**********************************************************************/
|
||||||
package org.eclipse.cdt.core.model;
|
package org.eclipse.cdt.core.model;
|
||||||
|
|
||||||
/*
|
|
||||||
* (c) Copyright IBM Corp. 2000, 2001.
|
|
||||||
* All Rights Reserved.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents the declaration of a variable.
|
* Represents the declaration of a variable.
|
||||||
*/
|
*/
|
||||||
public interface IVariableDeclaration extends IDeclaration {
|
public interface IVariableDeclaration extends IDeclaration {
|
||||||
/**
|
/**
|
||||||
*
|
* Returns the variable declaration type name.
|
||||||
* @return
|
* @return String
|
||||||
* @throws CModelException
|
* @throws CModelException
|
||||||
*/
|
*/
|
||||||
public String getTypeName() throws CModelException;
|
public String getTypeName() throws CModelException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Sets the variable declaration type name.
|
||||||
* @param type
|
* @param type
|
||||||
* @throws CModelException
|
* @throws CModelException
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Reference in a new issue