diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPMethod.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPMethod.java index abbf0ad6cc2..5366f88f47c 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPMethod.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPMethod.java @@ -6,11 +6,10 @@ * http://www.eclipse.org/legal/epl-v10.html * * Contributors: - * IBM - Initial API and implementation + * IBM - Initial API and implementation *******************************************************************************/ package org.eclipse.cdt.core.dom.ast.cpp; - /** * Base interface for methods, also used for constructors. * @@ -18,7 +17,7 @@ package org.eclipse.cdt.core.dom.ast.cpp; * @noimplement This interface is not intended to be implemented by clients. */ public interface ICPPMethod extends ICPPFunction, ICPPMember { - public static final ICPPMethod [] EMPTY_CPPMETHOD_ARRAY = new ICPPMethod[0]; + public static final ICPPMethod[] EMPTY_CPPMETHOD_ARRAY = {}; /** * Returns whether this method is declared to be virtual. Does not detect whether @@ -27,9 +26,9 @@ public interface ICPPMethod extends ICPPFunction, ICPPMember { public boolean isVirtual(); /** - * is this a destructor + * Is this a destructor? * - * returns true if its name starts with '~' + * Returns true if its name starts with '~' */ public boolean isDestructor(); diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPNamespace.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPNamespace.java index 275bddc4502..5e4de882ac9 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPNamespace.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPNamespace.java @@ -21,12 +21,12 @@ import org.eclipse.cdt.core.dom.ast.IBinding; */ public interface ICPPNamespace extends ICPPBinding { /** - * get the scope object associated with this namespace + * Returns the scope object associated with this namespace */ public ICPPNamespaceScope getNamespaceScope(); /** - * get an array of the all the bindings declared in this namespace. + * Returns an array of the all the bindings declared in this namespace. */ public IBinding[] getMemberBindings(); diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPNamespaceAlias.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPNamespaceAlias.java index 8ca5e810bad..237ea89f333 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPNamespaceAlias.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPNamespaceAlias.java @@ -17,10 +17,8 @@ import org.eclipse.cdt.core.dom.ast.IBinding; * @noimplement This interface is not intended to be implemented by clients. */ public interface ICPPNamespaceAlias extends ICPPNamespace { - /** - * get the binding of the original namespace. + * Returns the binding of the original namespace. */ public IBinding getBinding(); - } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPNamespaceScope.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPNamespaceScope.java index 46146ae960f..f5b8ea79a7e 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPNamespaceScope.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPNamespaceScope.java @@ -11,7 +11,6 @@ *******************************************************************************/ package org.eclipse.cdt.core.dom.ast.cpp; - /** * A namespace scope is either a block-scope or a namespace-scope or global scope. * @@ -19,7 +18,6 @@ package org.eclipse.cdt.core.dom.ast.cpp; * @noimplement This interface is not intended to be implemented by clients. */ public interface ICPPNamespaceScope extends ICPPScope { - /** * @since 5.3 */ diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPParameter.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPParameter.java index 12ae004074e..7ac37d22210 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPParameter.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPParameter.java @@ -6,8 +6,8 @@ * http://www.eclipse.org/legal/epl-v10.html * * Contributors: - * Andrew Niefer (IBM) - Initial API and implementation - * Markus Schorn (Wind River Systems) + * Andrew Niefer (IBM) - Initial API and implementation + * Markus Schorn (Wind River Systems) *******************************************************************************/ package org.eclipse.cdt.core.dom.ast.cpp; @@ -18,7 +18,6 @@ import org.eclipse.cdt.core.dom.ast.IParameter; * @noimplement This interface is not intended to be implemented by clients. */ public interface ICPPParameter extends IParameter, ICPPVariable { - /** * @since 5.2 */ diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPParameterPackType.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPParameterPackType.java index 04200c1d03d..62b72bf3639 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPParameterPackType.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPParameterPackType.java @@ -21,7 +21,6 @@ import org.eclipse.cdt.core.dom.ast.IType; * @since 5.2 */ public interface ICPPParameterPackType extends IType { - /** * Returns the pattern for the pack-expansion */ diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPReferenceType.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPReferenceType.java index 5d4d7b4f06f..460194b209b 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPReferenceType.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPReferenceType.java @@ -18,7 +18,6 @@ import org.eclipse.cdt.core.dom.ast.IType; * @noimplement This interface is not intended to be implemented by clients. */ public interface ICPPReferenceType extends IType { - /** * Returns the type that this is a reference of */ diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPScope.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPScope.java index 22378e234cd..960c75db3d8 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPScope.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPScope.java @@ -17,5 +17,4 @@ import org.eclipse.cdt.core.dom.ast.IScope; * @noimplement This interface is not intended to be implemented by clients. */ public interface ICPPScope extends IScope { - } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPSpecialization.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPSpecialization.java index 3b14edcaa19..7f34606a020 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPSpecialization.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPSpecialization.java @@ -6,8 +6,8 @@ * http://www.eclipse.org/legal/epl-v10.html * * Contributors: - * Andrew Niefer (IBM) - Initial API and implementation - * Markus Schorn (Wind River Systems) + * Andrew Niefer (IBM) - Initial API and implementation + * Markus Schorn (Wind River Systems) *******************************************************************************/ package org.eclipse.cdt.core.dom.ast.cpp; diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPTemplateArgument.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPTemplateArgument.java index cda584b37a0..17e08457afa 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPTemplateArgument.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPTemplateArgument.java @@ -6,7 +6,7 @@ * http://www.eclipse.org/legal/epl-v10.html * * Contributors: - * Markus Schorn - initial API and implementation + * Markus Schorn - initial API and implementation *******************************************************************************/ package org.eclipse.cdt.core.dom.ast.cpp; diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPTemplateDefinition.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPTemplateDefinition.java index eb776231e3b..36f4f330fb7 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPTemplateDefinition.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPTemplateDefinition.java @@ -6,12 +6,11 @@ * http://www.eclipse.org/legal/epl-v10.html * * Contributors: - * IBM - Initial API and implementation - * Markus Schorn (Wind River Systems) + * IBM - Initial API and implementation + * Markus Schorn (Wind River Systems) *******************************************************************************/ package org.eclipse.cdt.core.dom.ast.cpp; - /** * Base interface for all template definitions including explicit (partial) specializations. * @@ -19,7 +18,6 @@ package org.eclipse.cdt.core.dom.ast.cpp; * @noimplement This interface is not intended to be implemented by clients. */ public interface ICPPTemplateDefinition extends ICPPBinding { - /** * Returns an array of the template parameters. * In the case of a specialization, the array will be empty, diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPTemplateInstance.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPTemplateInstance.java index 2ea5efd0cd4..fb71b0c5c30 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPTemplateInstance.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPTemplateInstance.java @@ -1,15 +1,14 @@ /******************************************************************************* - * Copyright (c) 2005, 2010 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html + * Copyright (c) 2005, 2010 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html * - * Contributors: - * IBM - Initial API and implementation - * Markus Schorn (Wind River Systems) + * Contributors: + * IBM - Initial API and implementation + * Markus Schorn (Wind River Systems) *******************************************************************************/ - package org.eclipse.cdt.core.dom.ast.cpp; import org.eclipse.cdt.core.dom.ast.IType; diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPTemplateParameter.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPTemplateParameter.java index d4d1eb12c29..9f9cf2c0459 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPTemplateParameter.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPTemplateParameter.java @@ -6,8 +6,8 @@ * http://www.eclipse.org/legal/epl-v10.html * * Contributors: - * Doug Schaefer (IBM) - Initial API and implementation - * Markus Schorn (Wind River Systems) + * Doug Schaefer (IBM) - Initial API and implementation + * Markus Schorn (Wind River Systems) *******************************************************************************/ package org.eclipse.cdt.core.dom.ast.cpp; @@ -18,7 +18,7 @@ package org.eclipse.cdt.core.dom.ast.cpp; * @noimplement This interface is not intended to be implemented by clients. */ public interface ICPPTemplateParameter extends ICPPBinding { - public static final ICPPTemplateParameter[] EMPTY_TEMPLATE_PARAMETER_ARRAY = new ICPPTemplateParameter[0]; + public static final ICPPTemplateParameter[] EMPTY_TEMPLATE_PARAMETER_ARRAY = {}; /** * Returns the zero-based position of this parameter within the template parameter list it belongs to. diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPTemplateParameterMap.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPTemplateParameterMap.java index a0ccd0e9aec..2a4b0a11e40 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPTemplateParameterMap.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPTemplateParameterMap.java @@ -6,11 +6,10 @@ * http://www.eclipse.org/legal/epl-v10.html * * Contributors: - * Markus Schorn - initial API and implementation + * Markus Schorn - initial API and implementation *******************************************************************************/ package org.eclipse.cdt.core.dom.ast.cpp; - /** * Models the mapping of template parameters to values, or pack-expansions. * @@ -19,7 +18,6 @@ package org.eclipse.cdt.core.dom.ast.cpp; * @noimplement This interface is not intended to be implemented by clients. */ public interface ICPPTemplateParameterMap { - /** * Returns the value for the template parameter with the given id. * @see ICPPTemplateParameter#getParameterID() @@ -32,7 +30,6 @@ public interface ICPPTemplateParameterMap { */ public ICPPTemplateArgument getArgument(ICPPTemplateParameter param); - /** * Returns the values for the template parameter pack with the given id in the map, * or null if the parameter is not mapped or is not a parameter pack. diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPTemplateScope.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPTemplateScope.java index e1b9e13a18c..ba8ed791e2b 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPTemplateScope.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPTemplateScope.java @@ -6,8 +6,8 @@ * http://www.eclipse.org/legal/epl-v10.html * * Contributors: - * IBM - Initial API and implementation - * Markus Schorn (Wind River Systems) + * IBM - Initial API and implementation + * Markus Schorn (Wind River Systems) *******************************************************************************/ package org.eclipse.cdt.core.dom.ast.cpp; diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPTemplateTemplateParameter.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPTemplateTemplateParameter.java index e86fa831fa2..c993e37327f 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPTemplateTemplateParameter.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPTemplateTemplateParameter.java @@ -20,7 +20,6 @@ import org.eclipse.cdt.core.dom.ast.IType; * @noimplement This interface is not intended to be implemented by clients. */ public interface ICPPTemplateTemplateParameter extends ICPPTemplateParameter, ICPPClassTemplate { - @Override public ICPPTemplateParameter[] getTemplateParameters(); diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPTemplateTypeParameter.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPTemplateTypeParameter.java index 0c494c5bc52..56acf7ec907 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPTemplateTypeParameter.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPTemplateTypeParameter.java @@ -6,7 +6,7 @@ * http://www.eclipse.org/legal/epl-v10.html * * Contributors: - * Doug Schaefer (IBM) - Initial API and implementation + * Doug Schaefer (IBM) - Initial API and implementation *******************************************************************************/ package org.eclipse.cdt.core.dom.ast.cpp; @@ -18,17 +18,15 @@ import org.eclipse.cdt.core.dom.ast.IType; * @noimplement This interface is not intended to be implemented by clients. */ public interface ICPPTemplateTypeParameter extends ICPPTemplateParameter, IType { - /** - * The default type for this parameter. May be null - * + * The default type for this parameter. May be {@code null}. */ public IType getDefault() throws DOMException; /** * Types containing template parameters need to be compared even before it is known to which - * binding the template parameter belongs to. Therefore {@link #isSameType(IType)} compares the - * kind and the parameter position of the template parameter, only. The name and the owner + * binding the template parameter belongs to. Therefore {@link #isSameType(IType)} compares + * the kind and the parameter position of the template parameter, only. The name and the owner * is ignored. * * @since 5.1 diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPUsingDeclaration.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPUsingDeclaration.java index da92e3e9154..ba37e652f46 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPUsingDeclaration.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPUsingDeclaration.java @@ -22,8 +22,7 @@ import org.eclipse.cdt.core.dom.ast.IBinding; * @noextend This interface is not intended to be extended by clients. * @noimplement This interface is not intended to be implemented by clients. */ -public interface ICPPUsingDeclaration extends ICPPBinding { - +public interface ICPPUsingDeclaration extends ICPPBinding { /** * Return an array of bindings that were declared by this using declaration. * Each of these bindings delegates to some previously declared binding to which it diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPUsingDirective.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPUsingDirective.java index 5424102b9af..e5122a7c890 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPUsingDirective.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPUsingDirective.java @@ -23,7 +23,7 @@ import org.eclipse.cdt.internal.core.dom.parser.ASTNode; * @noimplement This interface is not intended to be implemented by clients. */ public interface ICPPUsingDirective { - ICPPUsingDirective[] EMPTY_ARRAY = new ICPPUsingDirective[0]; + ICPPUsingDirective[] EMPTY_ARRAY = {}; /** * Returns the scope of the namespace that is nominated by this diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPVariable.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPVariable.java index c9144497a35..2961d919c83 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPVariable.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPVariable.java @@ -18,7 +18,6 @@ import org.eclipse.cdt.core.dom.ast.IVariable; * @noimplement This interface is not intended to be implemented by clients. */ public interface ICPPVariable extends IVariable, ICPPBinding { - /** * does this variable have the mutable storage class specifier */ diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTLiteralExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTLiteralExpression.java index a7a6fa62397..a80ff8b6cf0 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTLiteralExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTLiteralExpression.java @@ -59,13 +59,9 @@ public class CPPASTLiteralExpression extends ASTNode implements ICPPASTLiteralEx @Override public CPPASTLiteralExpression copy(CopyStyle style) { - CPPASTLiteralExpression copy = new CPPASTLiteralExpression(kind, - value == null ? null : value.clone()); - copy.setOffsetAndLength(this); - if (style == CopyStyle.withLocations) { - copy.setCopyLocation(this); - } - return copy; + CPPASTLiteralExpression copy = + new CPPASTLiteralExpression(kind, value == null ? null : value.clone()); + return copy(copy, style); } @Override @@ -250,7 +246,7 @@ public class CPPASTLiteralExpression extends ASTNode implements ICPPASTLiteralEx case lk_float_constant: return new EvalFixed(classifyTypeOfFloatLiteral(), PRVALUE, Value.UNKNOWN); case lk_integer_constant: - return new EvalFixed(classifyTypeOfIntLiteral(),PRVALUE, createIntValue()); + return new EvalFixed(classifyTypeOfIntLiteral(), PRVALUE, createIntValue()); case lk_string_literal: IType type = new CPPBasicType(getCharType(), 0, this); type = new CPPQualifierType(type, true, false);