1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-08 10:16:03 +02:00

Cosmetics.

This commit is contained in:
Sergey Prigogin 2012-05-15 19:01:08 -07:00
parent e02293b2fe
commit a37a37d4c1
15 changed files with 493 additions and 552 deletions

View file

@ -376,7 +376,6 @@ public class CoreModel {
return null; return null;
} }
/** /**
* Return true if project has C nature. * Return true if project has C nature.
*/ */

View file

@ -17,7 +17,6 @@ package org.eclipse.cdt.core.dom.ast;
* @noimplement This interface is not intended to be implemented by clients. * @noimplement This interface is not intended to be implemented by clients.
*/ */
public interface IASTCompositeTypeSpecifier extends IASTDeclSpecifier, IASTNameOwner, IASTDeclarationListOwner { public interface IASTCompositeTypeSpecifier extends IASTDeclSpecifier, IASTNameOwner, IASTDeclarationListOwner {
/** /**
* <code>TYPE_NAME</code> represents the relationship between an * <code>TYPE_NAME</code> represents the relationship between an
* <code>IASTCompositeTypeSpecifier</code> and its <code>IASTName</code>. * <code>IASTCompositeTypeSpecifier</code> and its <code>IASTName</code>.

View file

@ -17,7 +17,6 @@ package org.eclipse.cdt.core.dom.ast;
* @noimplement This interface is not intended to be implemented by clients. * @noimplement This interface is not intended to be implemented by clients.
*/ */
public interface IASTElaboratedTypeSpecifier extends IASTDeclSpecifier, IASTNameOwner { public interface IASTElaboratedTypeSpecifier extends IASTDeclSpecifier, IASTNameOwner {
/** /**
* Enumeration. * Enumeration.
*/ */
@ -39,17 +38,16 @@ public interface IASTElaboratedTypeSpecifier extends IASTDeclSpecifier, IASTName
public static final int k_last = k_union; public static final int k_last = k_union;
/** /**
* Get the kind. * Returns the kind.
* *
* @return int (kind). * @return int (kind).
*/ */
public int getKind(); public int getKind();
/** /**
* Set the kind. * Sets the kind.
* *
* @param value * @param value int (kind)
* int (kind)
*/ */
public void setKind(int value); public void setKind(int value);
@ -61,14 +59,14 @@ public interface IASTElaboratedTypeSpecifier extends IASTDeclSpecifier, IASTName
"IASTElaboratedTypeSpecifier.TYPE_NAME - IASTName for IASTElaboratedTypeSpecifier"); //$NON-NLS-1$ "IASTElaboratedTypeSpecifier.TYPE_NAME - IASTName for IASTElaboratedTypeSpecifier"); //$NON-NLS-1$
/** /**
* Get the name. * Returns the name.
* *
* @return <code>IASTName</code> * @return <code>IASTName</code>
*/ */
public IASTName getName(); public IASTName getName();
/** /**
* Set the name. * Sets the name.
* *
* @param name * @param name
* <code>IASTName</code> * <code>IASTName</code>

View file

@ -6,7 +6,7 @@
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* John Camelon (IBM Rational Software) - Initial API and implementation * John Camelon (IBM Rational Software) - Initial API and implementation
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.core.dom.ast; package org.eclipse.cdt.core.dom.ast;
@ -17,7 +17,6 @@ package org.eclipse.cdt.core.dom.ast;
* @noimplement This interface is not intended to be implemented by clients. * @noimplement This interface is not intended to be implemented by clients.
*/ */
public interface IASTEnumerationSpecifier extends IASTDeclSpecifier, IASTNameOwner { public interface IASTEnumerationSpecifier extends IASTDeclSpecifier, IASTNameOwner {
/** /**
* This interface represents an enumerator member of an enum specifier. * This interface represents an enumerator member of an enum specifier.
* *
@ -59,14 +58,14 @@ public interface IASTEnumerationSpecifier extends IASTDeclSpecifier, IASTNameOwn
"IASTEnumerator.ENUMERATOR_VALUE - IASTExpression (value) for IASTEnumerator"); //$NON-NLS-1$ "IASTEnumerator.ENUMERATOR_VALUE - IASTExpression (value) for IASTEnumerator"); //$NON-NLS-1$
/** /**
* Set enumerator value. * Sets enumerator value.
* *
* @param expression * @param expression
*/ */
public void setValue(IASTExpression expression); public void setValue(IASTExpression expression);
/** /**
* Get enumerator value. * Returns enumerator value.
* *
* @return <code>IASTExpression</code> value * @return <code>IASTExpression</code> value
*/ */
@ -95,7 +94,7 @@ public interface IASTEnumerationSpecifier extends IASTDeclSpecifier, IASTNameOwn
"IASTEnumerationSpecifier.ENUMERATOR - nested IASTEnumerator for IASTEnumerationSpecifier"); //$NON-NLS-1$ "IASTEnumerationSpecifier.ENUMERATOR - nested IASTEnumerator for IASTEnumerationSpecifier"); //$NON-NLS-1$
/** /**
* Add an enumerator. * Adds an enumerator.
* *
* @param enumerator * @param enumerator
* <code>IASTEnumerator</code> * <code>IASTEnumerator</code>
@ -103,7 +102,7 @@ public interface IASTEnumerationSpecifier extends IASTDeclSpecifier, IASTNameOwn
public void addEnumerator(IASTEnumerator enumerator); public void addEnumerator(IASTEnumerator enumerator);
/** /**
* Get enumerators. * Returns enumerators.
* *
* @return <code>IASTEnumerator []</code> array * @return <code>IASTEnumerator []</code> array
*/ */
@ -117,7 +116,7 @@ public interface IASTEnumerationSpecifier extends IASTDeclSpecifier, IASTNameOwn
"IASTEnumerationSpecifier.ENUMERATION_NAME - IASTName for IASTEnumerationSpecifier"); //$NON-NLS-1$ "IASTEnumerationSpecifier.ENUMERATION_NAME - IASTName for IASTEnumerationSpecifier"); //$NON-NLS-1$
/** /**
* Set the enum's name. * Sets the enum's name.
* *
* @param name * @param name
*/ */

View file

@ -6,7 +6,7 @@
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* Doug Schaefer (IBM) - Initial API and implementation * Doug Schaefer (IBM) - Initial API and implementation
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.core.dom.ast; package org.eclipse.cdt.core.dom.ast;
@ -18,11 +18,9 @@ package org.eclipse.cdt.core.dom.ast;
* @noimplement This interface is not intended to be implemented by clients. * @noimplement This interface is not intended to be implemented by clients.
*/ */
public interface IASTNamedTypeSpecifier extends IASTDeclSpecifier, IASTNameOwner { public interface IASTNamedTypeSpecifier extends IASTDeclSpecifier, IASTNameOwner {
/** /**
* <code>NAME</code> describes the relationship between an * <code>NAME</code> describes the relationship between an
* <code>IASTNamedTypeSpecifier</code> and its nested * <code>IASTNamedTypeSpecifier</code> and its nested <code>IASTName</code>.
* <code>IASTName</code>.
*/ */
public static final ASTNodeProperty NAME = new ASTNodeProperty("IASTNamedTypeSpecifier.NAME - IASTName for IASTNamedTypeSpecifier"); //$NON-NLS-1$ public static final ASTNodeProperty NAME = new ASTNodeProperty("IASTNamedTypeSpecifier.NAME - IASTName for IASTNamedTypeSpecifier"); //$NON-NLS-1$

View file

@ -6,9 +6,9 @@
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* Doug Schaefer (IBM) - Initial API and implementation * Doug Schaefer (IBM) - Initial API and implementation
* Markus Schorn (Wind River Systems) * Markus Schorn (Wind River Systems)
* Sergey Prigogin (Google) * Sergey Prigogin (Google)
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.core.dom.ast; package org.eclipse.cdt.core.dom.ast;
@ -27,7 +27,6 @@ public interface IASTSimpleDeclSpecifier extends IASTDeclSpecifier {
public static final ASTNodeProperty DECLTYPE_EXPRESSION = new ASTNodeProperty( public static final ASTNodeProperty DECLTYPE_EXPRESSION = new ASTNodeProperty(
"IASTSimpleDeclSpecifier.EXPRESSION [IASTExpression]"); //$NON-NLS-1$ "IASTSimpleDeclSpecifier.EXPRESSION [IASTExpression]"); //$NON-NLS-1$
/** /**
* Used for omitted declaration specifiers. E.g. for declaration of constructors, * Used for omitted declaration specifiers. E.g. for declaration of constructors,
* or in plain c, where this defaults to an integer. * or in plain c, where this defaults to an integer.
@ -109,7 +108,7 @@ public interface IASTSimpleDeclSpecifier extends IASTDeclSpecifier {
public IASTSimpleDeclSpecifier copy(); public IASTSimpleDeclSpecifier copy();
/** /**
* This returns the built-in type for the declaration. The type is then * Returns the built-in type for the declaration. The type is then
* refined by qualifiers for signed/unsigned and short/long. The type could * refined by qualifiers for signed/unsigned and short/long. The type could
* also be unspecified which usually means int. * also be unspecified which usually means int.
*/ */
@ -231,5 +230,4 @@ public interface IASTSimpleDeclSpecifier extends IASTDeclSpecifier {
*/ */
@Deprecated @Deprecated
public static final int t_last = t_double; // used only in subclasses public static final int t_last = t_double; // used only in subclasses
} }

View file

@ -6,8 +6,8 @@
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* Doug Schaefer (IBM) - Initial API and implementation * Doug Schaefer (IBM) - Initial API and implementation
* Markus Schorn (Wind River Systems) * Markus Schorn (Wind River Systems)
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.core.dom.ast.c; package org.eclipse.cdt.core.dom.ast.c;
@ -20,11 +20,9 @@ import org.eclipse.cdt.core.dom.ast.IASTDeclSpecifier;
* @noimplement This interface is not intended to be implemented by clients. * @noimplement This interface is not intended to be implemented by clients.
*/ */
public interface ICASTDeclSpecifier extends IASTDeclSpecifier { public interface ICASTDeclSpecifier extends IASTDeclSpecifier {
/** /**
* @since 5.1 * @since 5.1
*/ */
@Override @Override
public ICASTDeclSpecifier copy(); public ICASTDeclSpecifier copy();
} }

View file

@ -6,8 +6,8 @@
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* Doug Schaefer (IBM) - Initial API and implementation * Doug Schaefer (IBM) - Initial API and implementation
* Markus Schorn (Wind River Systems) * Markus Schorn (Wind River Systems)
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.core.dom.ast.cpp; package org.eclipse.cdt.core.dom.ast.cpp;
@ -20,7 +20,6 @@ import org.eclipse.cdt.core.dom.ast.IASTDeclSpecifier;
* @noimplement This interface is not intended to be implemented by clients. * @noimplement This interface is not intended to be implemented by clients.
*/ */
public interface ICPPASTDeclSpecifier extends IASTDeclSpecifier { public interface ICPPASTDeclSpecifier extends IASTDeclSpecifier {
// A declaration in C++ can be a friend declaration // A declaration in C++ can be a friend declaration
/** /**
* Is this a friend declaration? * Is this a friend declaration?
@ -30,10 +29,9 @@ public interface ICPPASTDeclSpecifier extends IASTDeclSpecifier {
public boolean isFriend(); public boolean isFriend();
/** /**
* Set this to be a friend declaration true/false. * Sets this to be a friend declaration true/false.
* *
* @param value * @param value the new value
* boolean
*/ */
public void setFriend(boolean value); public void setFriend(boolean value);
@ -45,10 +43,9 @@ public interface ICPPASTDeclSpecifier extends IASTDeclSpecifier {
public boolean isVirtual(); public boolean isVirtual();
/** /**
* Set this declaration to be virutal. * Sets this declaration to be virtual.
* *
* @param value * @param value the new value
* boolean
*/ */
public void setVirtual(boolean value); public void setVirtual(boolean value);
@ -60,10 +57,9 @@ public interface ICPPASTDeclSpecifier extends IASTDeclSpecifier {
public boolean isExplicit(); public boolean isExplicit();
/** /**
* Set this to be an explicit constructor. * Sets this to be an explicit constructor.
* *
* @param value * @param value the new value
* boolean
*/ */
public void setExplicit(boolean value); public void setExplicit(boolean value);

View file

@ -6,7 +6,7 @@
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* John Camelon (IBM) - Initial API and implementation * John Camelon (IBM) - Initial API and implementation
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.core.dom.ast.gnu.cpp; package org.eclipse.cdt.core.dom.ast.gnu.cpp;
@ -21,7 +21,6 @@ import org.eclipse.cdt.core.dom.ast.IASTDeclSpecifier;
*/ */
@Deprecated @Deprecated
public interface IGPPASTDeclSpecifier extends IASTDeclSpecifier { public interface IGPPASTDeclSpecifier extends IASTDeclSpecifier {
/** /**
* @since 5.1 * @since 5.1
*/ */

View file

@ -6,8 +6,8 @@
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* John Camelon (IBM) - Initial API and implementation * John Camelon (IBM) - Initial API and implementation
* Markus Schorn (Wind River Systems) * Markus Schorn (Wind River Systems)
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.internal.core.dom.parser.cpp; package org.eclipse.cdt.internal.core.dom.parser.cpp;
@ -19,7 +19,6 @@ import org.eclipse.cdt.internal.core.model.ASTStringUtil;
* Base for all c++ declaration specifiers * Base for all c++ declaration specifiers
*/ */
public abstract class CPPASTBaseDeclSpecifier extends ASTNode implements ICPPASTDeclSpecifier { public abstract class CPPASTBaseDeclSpecifier extends ASTNode implements ICPPASTDeclSpecifier {
private boolean friend; private boolean friend;
private boolean inline; private boolean inline;
private boolean isConst; private boolean isConst;

View file

@ -6,7 +6,7 @@
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* IBM - Initial API and implementation * IBM - Initial API and implementation
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.internal.core.dom.parser.cpp; package org.eclipse.cdt.internal.core.dom.parser.cpp;
@ -27,7 +27,6 @@ import org.eclipse.cdt.internal.core.dom.parser.IASTInternalNameOwner;
*/ */
public class CPPASTElaboratedTypeSpecifier extends CPPASTBaseDeclSpecifier public class CPPASTElaboratedTypeSpecifier extends CPPASTBaseDeclSpecifier
implements ICPPASTElaboratedTypeSpecifier, IASTInternalNameOwner { implements ICPPASTElaboratedTypeSpecifier, IASTInternalNameOwner {
private int kind; private int kind;
private IASTName name; private IASTName name;

View file

@ -6,8 +6,8 @@
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* John Camelon (IBM) - Initial API and implementation * John Camelon (IBM) - Initial API and implementation
* Markus Schorn (Wind River Systems) * Markus Schorn (Wind River Systems)
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.internal.core.dom.parser.cpp; package org.eclipse.cdt.internal.core.dom.parser.cpp;
@ -24,16 +24,15 @@ import org.eclipse.cdt.internal.core.dom.parser.IASTInternalEnumerationSpecifier
*/ */
public class CPPASTEnumerationSpecifier extends CPPASTBaseDeclSpecifier public class CPPASTEnumerationSpecifier extends CPPASTBaseDeclSpecifier
implements IASTInternalEnumerationSpecifier, ICPPASTEnumerationSpecifier { implements IASTInternalEnumerationSpecifier, ICPPASTEnumerationSpecifier {
private boolean fIsScoped; private boolean fIsScoped;
private boolean fIsOpaque; private boolean fIsOpaque;
private IASTName fName; private IASTName fName;
private ICPPASTDeclSpecifier fBaseType; private ICPPASTDeclSpecifier fBaseType;
private IASTEnumerator[] fItems = null; private IASTEnumerator[] fItems;
private int fItemPos=-1; private int fItemPos= -1;
private boolean fValuesComputed= false; private boolean fValuesComputed;
private CPPEnumScope fScope; private CPPEnumScope fScope;
public CPPASTEnumerationSpecifier() { public CPPASTEnumerationSpecifier() {
@ -52,8 +51,9 @@ public class CPPASTEnumerationSpecifier extends CPPASTBaseDeclSpecifier
@Override @Override
public CPPASTEnumerationSpecifier copy(CopyStyle style) { public CPPASTEnumerationSpecifier copy(CopyStyle style) {
CPPASTEnumerationSpecifier copy = new CPPASTEnumerationSpecifier(fIsScoped, fName == null CPPASTEnumerationSpecifier copy =
? null : fName.copy(style), fBaseType == null ? null : fBaseType.copy(style)); new CPPASTEnumerationSpecifier(fIsScoped, fName == null ? null : fName.copy(style),
fBaseType == null ? null : fBaseType.copy(style));
copy.fIsOpaque = fIsOpaque; copy.fIsOpaque = fIsOpaque;
for (IASTEnumerator enumerator : getEnumerators()) for (IASTEnumerator enumerator : getEnumerators())
copy.addEnumerator(enumerator == null ? null : enumerator.copy(style)); copy.addEnumerator(enumerator == null ? null : enumerator.copy(style));

View file

@ -6,8 +6,8 @@
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* John Camelon (IBM) - Initial API and implementation * John Camelon (IBM) - Initial API and implementation
* Bryan Wilkinson (QNX) * Bryan Wilkinson (QNX)
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.internal.core.dom.parser.cpp; package org.eclipse.cdt.internal.core.dom.parser.cpp;
@ -26,12 +26,10 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPNamespace;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateTypeParameter; import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateTypeParameter;
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPSemantics; import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPSemantics;
public class CPPASTNamedTypeSpecifier extends CPPASTBaseDeclSpecifier implements public class CPPASTNamedTypeSpecifier extends CPPASTBaseDeclSpecifier
ICPPASTNamedTypeSpecifier, ICPPASTCompletionContext { implements ICPPASTNamedTypeSpecifier, ICPPASTCompletionContext {
private boolean typename; private boolean typename;
private IASTName name; private IASTName name;
public CPPASTNamedTypeSpecifier() { public CPPASTNamedTypeSpecifier() {
} }
@ -47,8 +45,8 @@ public class CPPASTNamedTypeSpecifier extends CPPASTBaseDeclSpecifier implements
@Override @Override
public CPPASTNamedTypeSpecifier copy(CopyStyle style) { public CPPASTNamedTypeSpecifier copy(CopyStyle style) {
CPPASTNamedTypeSpecifier copy = new CPPASTNamedTypeSpecifier(name == null ? null CPPASTNamedTypeSpecifier copy =
: name.copy(style)); new CPPASTNamedTypeSpecifier(name == null ? null : name.copy(style));
copyBaseDeclSpec(copy); copyBaseDeclSpec(copy);
copy.typename = typename; copy.typename = typename;
if (style == CopyStyle.withLocations) { if (style == CopyStyle.withLocations) {
@ -73,7 +71,6 @@ public class CPPASTNamedTypeSpecifier extends CPPASTBaseDeclSpecifier implements
return name; return name;
} }
@Override @Override
public void setName(IASTName name) { public void setName(IASTName name) {
assertNotFrozen(); assertNotFrozen();

View file

@ -6,8 +6,8 @@
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* John Camelon (IBM) - Initial API and implementation * John Camelon (IBM) - Initial API and implementation
* Markus Schorn (Wind River Systems) * Markus Schorn (Wind River Systems)
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.internal.core.dom.parser.cpp; package org.eclipse.cdt.internal.core.dom.parser.cpp;
@ -18,16 +18,16 @@ import org.eclipse.cdt.core.dom.ast.IBasicType.Kind;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTSimpleDeclSpecifier; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTSimpleDeclSpecifier;
import org.eclipse.cdt.internal.core.dom.parser.IASTAmbiguityParent; import org.eclipse.cdt.internal.core.dom.parser.IASTAmbiguityParent;
public class CPPASTSimpleDeclSpecifier extends CPPASTBaseDeclSpecifier implements ICPPASTSimpleDeclSpecifier, public class CPPASTSimpleDeclSpecifier extends CPPASTBaseDeclSpecifier
IASTAmbiguityParent { implements ICPPASTSimpleDeclSpecifier, IASTAmbiguityParent {
private int type; private int type;
private boolean isSigned; private boolean isSigned;
private boolean isUnsigned; private boolean isUnsigned;
private boolean isShort; private boolean isShort;
private boolean isLong; private boolean isLong;
private boolean isLonglong; private boolean isLonglong;
private boolean isComplex=false; private boolean isComplex;
private boolean isImaginary=false; private boolean isImaginary;
private IASTExpression fDeclTypeExpression; private IASTExpression fDeclTypeExpression;
@Override @Override