mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Cosmetics.
This commit is contained in:
parent
e477f03d08
commit
45e67ddcf2
24 changed files with 88 additions and 94 deletions
|
@ -15,10 +15,7 @@ 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 IASTTypeId extends IASTNode {
|
public interface IASTTypeId extends IASTNode {
|
||||||
/**
|
public static final IASTTypeId[] EMPTY_TYPEID_ARRAY = {};
|
||||||
* Constant.
|
|
||||||
*/
|
|
||||||
public static final IASTTypeId[] EMPTY_TYPEID_ARRAY = new IASTTypeId[0];
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <code>DECL_SPECIFIER</code> represents the relationship between an <code>IASTTypeId</code>
|
* <code>DECL_SPECIFIER</code> represents the relationship between an <code>IASTTypeId</code>
|
||||||
|
@ -35,7 +32,7 @@ public interface IASTTypeId extends IASTNode {
|
||||||
"IASTTypeId.ABSTRACT_DECLARATOR - IASTDeclarator for IASTTypeId"); //$NON-NLS-1$
|
"IASTTypeId.ABSTRACT_DECLARATOR - IASTDeclarator for IASTTypeId"); //$NON-NLS-1$
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the decl specifier.
|
* Returns the decl specifier.
|
||||||
* @return <code>IASTDeclSpecifier</code>
|
* @return <code>IASTDeclSpecifier</code>
|
||||||
*/
|
*/
|
||||||
public IASTDeclSpecifier getDeclSpecifier();
|
public IASTDeclSpecifier getDeclSpecifier();
|
||||||
|
@ -54,7 +51,7 @@ public interface IASTTypeId extends IASTNode {
|
||||||
public IASTDeclarator getAbstractDeclarator();
|
public IASTDeclarator getAbstractDeclarator();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the abstract declarator.
|
* Sets the abstract declarator.
|
||||||
* @param abstractDeclarator <code>IASTDeclarator</code>
|
* @param abstractDeclarator <code>IASTDeclarator</code>
|
||||||
*/
|
*/
|
||||||
public void setAbstractDeclarator(IASTDeclarator abstractDeclarator);
|
public void setAbstractDeclarator(IASTDeclarator abstractDeclarator);
|
||||||
|
|
|
@ -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 Rational Software) - Initial API and implementation
|
* John Camelon (IBM Rational Software) - Initial API and implementation
|
||||||
* Markus Schorn (Wind River Systems)
|
* Markus Schorn (Wind River Systems)
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.core.dom.ast;
|
package org.eclipse.cdt.core.dom.ast;
|
||||||
|
|
||||||
|
@ -16,9 +16,8 @@ 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 IASTTypeIdExpression extends IASTExpression {
|
public interface IASTTypeIdExpression extends IASTExpression {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <code>op_sizeof</code> sizeof( typeId ) expression
|
* <code>op_sizeof</code> sizeof (typeId) expression
|
||||||
*/
|
*/
|
||||||
public static final int op_sizeof = 0;
|
public static final int op_sizeof = 0;
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
|
|
||||||
|
@ -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 IASTWhileStatement extends IASTStatement {
|
public interface IASTWhileStatement extends IASTStatement {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <code>CONDITIONEXPRESSION</code> represents the relationship between an <code>IASTWhileStatement</code> and
|
* <code>CONDITIONEXPRESSION</code> represents the relationship between an <code>IASTWhileStatement</code> and
|
||||||
* it's nested <code>IASTExpression</code>.
|
* it's nested <code>IASTExpression</code>.
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
* http://www.eclipse.org/legal/epl-v10.html
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Tomasz Wesolowski - initial API and implementation
|
* Tomasz Wesolowski - initial API and implementation
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.core.dom.ast;
|
package org.eclipse.cdt.core.dom.ast;
|
||||||
|
|
||||||
|
@ -19,7 +19,6 @@ package org.eclipse.cdt.core.dom.ast;
|
||||||
* @since 5.3
|
* @since 5.3
|
||||||
*/
|
*/
|
||||||
public interface ICPPASTCompletionContext extends IASTCompletionContext {
|
public interface ICPPASTCompletionContext extends IASTCompletionContext {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns bindings that start with the given name or prefix, only considering those that are valid for
|
* Returns bindings that start with the given name or prefix, only considering those that are valid for
|
||||||
* this context, including those in the requested set of namespaces.
|
* this context, including those in the requested set of namespaces.
|
||||||
|
|
|
@ -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.core.dom.ast;
|
package org.eclipse.cdt.core.dom.ast;
|
||||||
|
|
||||||
|
@ -21,15 +21,16 @@ public interface ICompositeType extends IBinding, IType {
|
||||||
public static final int k_union = IASTCompositeTypeSpecifier.k_union;
|
public static final int k_union = IASTCompositeTypeSpecifier.k_union;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the type of the composite, {@link #k_struct}, {@link #k_union}, or
|
* Returns the type of the composite, {@link #k_struct}, {@link #k_union},
|
||||||
* {@link org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType#k_class}.
|
* or {@link org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType#k_class}.
|
||||||
*/
|
*/
|
||||||
public int getKey();
|
public int getKey();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns whether the type is anonymous or not. A type for which objects or
|
* Returns whether the type is anonymous or not. A type for which objects or
|
||||||
* pointers are declared is not considered an anonymous type.
|
* pointers are declared is not considered an anonymous type.
|
||||||
* <pre> struct Outer {
|
* <pre>
|
||||||
|
* struct Outer {
|
||||||
* struct {int a;}; // anonymous
|
* struct {int a;}; // anonymous
|
||||||
* struct {int b;} c; // not anonymous
|
* struct {int b;} c; // not anonymous
|
||||||
* }
|
* }
|
||||||
|
|
|
@ -10,11 +10,10 @@
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.core.dom.ast.cpp;
|
package org.eclipse.cdt.core.dom.ast.cpp;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @noextend This interface is not intended to be extended by clients.
|
* @noextend This interface is not intended to be extended by clients.
|
||||||
* @noimplement This interface is not intended to be implemented by clients.
|
* @noimplement This interface is not intended to be implemented by clients.
|
||||||
*/
|
*/
|
||||||
public interface ICPPConstructor extends ICPPMethod {
|
public interface ICPPConstructor extends ICPPMethod {
|
||||||
public static final ICPPConstructor [] EMPTY_CONSTRUCTOR_ARRAY = new ICPPConstructor[0];
|
public static final ICPPConstructor[] EMPTY_CONSTRUCTOR_ARRAY = {};
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
* http://www.eclipse.org/legal/epl-v10.html
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Bryan Wilkinson (QNX) - Initial API and implementation
|
* Bryan Wilkinson (QNX) - 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;
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
* http://www.eclipse.org/legal/epl-v10.html
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Markus Schorn - initial API and implementation
|
* Markus Schorn - initial API and implementation
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.core.dom.ast.cpp;
|
package org.eclipse.cdt.core.dom.ast.cpp;
|
||||||
|
|
||||||
|
@ -21,7 +21,6 @@ import org.eclipse.cdt.core.dom.ast.IType;
|
||||||
* @noimplement This interface is not intended to be implemented by clients.
|
* @noimplement This interface is not intended to be implemented by clients.
|
||||||
*/
|
*/
|
||||||
public interface ICPPEnumeration extends IEnumeration, ICPPBinding {
|
public interface ICPPEnumeration extends IEnumeration, ICPPBinding {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns whether this enumeration is scoped.
|
* Returns whether this enumeration is scoped.
|
||||||
* An enumeration can only be scoped in C++.
|
* An enumeration can only be scoped in C++.
|
||||||
|
|
|
@ -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.cpp;
|
package org.eclipse.cdt.core.dom.ast.cpp;
|
||||||
|
|
||||||
|
@ -17,6 +17,5 @@ import org.eclipse.cdt.core.dom.ast.IField;
|
||||||
* @noimplement This interface is not intended to be implemented by clients.
|
* @noimplement This interface is not intended to be implemented by clients.
|
||||||
*/
|
*/
|
||||||
public interface ICPPField extends IField, ICPPMember, ICPPVariable {
|
public interface ICPPField extends IField, ICPPMember, ICPPVariable {
|
||||||
public static final ICPPField [] EMPTY_CPPFIELD_ARRAY = new ICPPField[0];
|
public static final ICPPField[] EMPTY_CPPFIELD_ARRAY = {};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2005, 2010 IBM Corporation and others.
|
* Copyright (c) 2005, 2010 IBM 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 Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
* http://www.eclipse.org/legal/epl-v10.html
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Andrew Niefer (IBM Corporation) - initial API and implementation
|
* Andrew Niefer (IBM Corporation) - 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;
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,6 @@ import org.eclipse.cdt.core.dom.ast.IScope;
|
||||||
* @noimplement This interface is not intended to be implemented by clients.
|
* @noimplement This interface is not intended to be implemented by clients.
|
||||||
*/
|
*/
|
||||||
public interface ICPPFunctionScope extends ICPPScope {
|
public interface ICPPFunctionScope extends ICPPScope {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the scope representing the function body. returns null if there is no
|
* Get the scope representing the function body. returns null if there is no
|
||||||
* function definition
|
* function definition
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2005, 2009 IBM Corporation and others.
|
* Copyright (c) 2005, 2009 IBM 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 Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
* http://www.eclipse.org/legal/epl-v10.html
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Andrew Niefer (IBM) - Initial API and implementation
|
* Andrew Niefer (IBM) - Initial API and implementation
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.core.dom.ast.cpp;
|
package org.eclipse.cdt.core.dom.ast.cpp;
|
||||||
|
|
||||||
|
@ -17,5 +17,4 @@ package org.eclipse.cdt.core.dom.ast.cpp;
|
||||||
* @noextend This interface is not intended to be extended by clients.
|
* @noextend This interface is not intended to be extended by clients.
|
||||||
*/
|
*/
|
||||||
public interface ICPPFunctionTemplate extends ICPPFunction, ICPPTemplateDefinition {
|
public interface ICPPFunctionTemplate extends ICPPFunction, ICPPTemplateDefinition {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,10 +6,10 @@
|
||||||
* 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
|
||||||
* Markus Schorn (Wind River Systems)
|
* Markus Schorn (Wind River Systems)
|
||||||
* Bryan Wilkinson (QNX)
|
* Bryan Wilkinson (QNX)
|
||||||
* Andrew Ferguson (Symbian)
|
* Andrew Ferguson (Symbian)
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.internal.core.dom.parser.cpp;
|
package org.eclipse.cdt.internal.core.dom.parser.cpp;
|
||||||
|
|
||||||
|
@ -91,7 +91,8 @@ public class AbstractCPPClassSpecializationScope implements ICPPClassSpecializat
|
||||||
return CPPSemantics.resolveAmbiguities(name, specs);
|
return CPPSemantics.resolveAmbiguities(name, specs);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated @Override
|
@Deprecated
|
||||||
|
@Override
|
||||||
final public IBinding[] getBindings(IASTName name, boolean resolve, boolean prefixLookup,
|
final public IBinding[] getBindings(IASTName name, boolean resolve, boolean prefixLookup,
|
||||||
IIndexFileSet fileSet) {
|
IIndexFileSet fileSet) {
|
||||||
return getBindings(new ScopeLookupData(name, resolve, prefixLookup));
|
return getBindings(new ScopeLookupData(name, resolve, prefixLookup));
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
* http://www.eclipse.org/legal/epl-v10.html
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Markus Schorn - initial API and implementation
|
* Markus Schorn - initial API and implementation
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.internal.core.dom.parser.cpp;
|
package org.eclipse.cdt.internal.core.dom.parser.cpp;
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
* http://www.eclipse.org/legal/epl-v10.html
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Markus Schorn - Initial API and implementation
|
* Markus Schorn - Initial API and implementation
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.internal.core.dom.parser.cpp;
|
package org.eclipse.cdt.internal.core.dom.parser.cpp;
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
* http://www.eclipse.org/legal/epl-v10.html
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Markus Schorn - Initial API and implementation
|
* Markus Schorn - Initial API and implementation
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.internal.core.dom.parser.cpp;
|
package org.eclipse.cdt.internal.core.dom.parser.cpp;
|
||||||
|
|
||||||
|
@ -15,8 +15,8 @@ import org.eclipse.cdt.core.dom.ast.IASTFunctionCallExpression;
|
||||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTExpression;
|
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTExpression;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.ASTAmbiguousCastVsFunctionCallExpression;
|
import org.eclipse.cdt.internal.core.dom.parser.ASTAmbiguousCastVsFunctionCallExpression;
|
||||||
|
|
||||||
public class CPPASTAmbiguousCastVsFunctionCallExpression extends
|
public class CPPASTAmbiguousCastVsFunctionCallExpression
|
||||||
ASTAmbiguousCastVsFunctionCallExpression implements ICPPASTExpression {
|
extends ASTAmbiguousCastVsFunctionCallExpression implements ICPPASTExpression {
|
||||||
|
|
||||||
public CPPASTAmbiguousCastVsFunctionCallExpression(IASTCastExpression castExpr, IASTFunctionCallExpression funcCall) {
|
public CPPASTAmbiguousCastVsFunctionCallExpression(IASTCastExpression castExpr, IASTFunctionCallExpression funcCall) {
|
||||||
super(castExpr, funcCall);
|
super(castExpr, funcCall);
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
* http://www.eclipse.org/legal/epl-v10.html
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Markus Schorn - initial API and implementation
|
* Markus Schorn - initial API and implementation
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.internal.core.dom.parser.cpp;
|
package org.eclipse.cdt.internal.core.dom.parser.cpp;
|
||||||
|
|
||||||
|
|
|
@ -18,17 +18,15 @@ import org.eclipse.cdt.core.parser.util.ArrayUtil;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.ASTAmbiguousNode;
|
import org.eclipse.cdt.internal.core.dom.parser.ASTAmbiguousNode;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.IASTAmbiguousExpression;
|
import org.eclipse.cdt.internal.core.dom.parser.IASTAmbiguousExpression;
|
||||||
|
|
||||||
public class CPPASTAmbiguousExpression extends ASTAmbiguousNode implements
|
public class CPPASTAmbiguousExpression extends ASTAmbiguousNode
|
||||||
IASTAmbiguousExpression, ICPPASTExpression {
|
implements IASTAmbiguousExpression, ICPPASTExpression {
|
||||||
|
private IASTExpression[] exp = new IASTExpression[2];
|
||||||
private IASTExpression [] exp = new IASTExpression[2];
|
private int expPos= -1;
|
||||||
private int expPos=-1;
|
|
||||||
|
|
||||||
public CPPASTAmbiguousExpression(IASTExpression... expressions) {
|
public CPPASTAmbiguousExpression(IASTExpression... expressions) {
|
||||||
for(IASTExpression e : expressions)
|
for(IASTExpression e : expressions)
|
||||||
addExpression(e);
|
addExpression(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IASTExpression copy() {
|
public IASTExpression copy() {
|
||||||
|
@ -44,7 +42,7 @@ public class CPPASTAmbiguousExpression extends ASTAmbiguousNode implements
|
||||||
public void addExpression(IASTExpression e) {
|
public void addExpression(IASTExpression e) {
|
||||||
assertNotFrozen();
|
assertNotFrozen();
|
||||||
if (e != null) {
|
if (e != null) {
|
||||||
exp = ArrayUtil.appendAt( IASTExpression.class, exp, ++expPos, e );
|
exp = ArrayUtil.appendAt(IASTExpression.class, exp, ++expPos, e);
|
||||||
e.setParent(this);
|
e.setParent(this);
|
||||||
e.setPropertyInParent(SUBEXPRESSION);
|
e.setPropertyInParent(SUBEXPRESSION);
|
||||||
}
|
}
|
||||||
|
@ -52,7 +50,7 @@ public class CPPASTAmbiguousExpression extends ASTAmbiguousNode implements
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IASTExpression[] getExpressions() {
|
public IASTExpression[] getExpressions() {
|
||||||
exp = ArrayUtil.trimAt( IASTExpression.class, exp, expPos );
|
exp = ArrayUtil.trimAt(IASTExpression.class, exp, expPos);
|
||||||
return exp;
|
return exp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
* http://www.eclipse.org/legal/epl-v10.html
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Markus Schorn - Initial API and implementation
|
* Markus Schorn - Initial API and implementation
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.internal.core.dom.parser.cpp;
|
package org.eclipse.cdt.internal.core.dom.parser.cpp;
|
||||||
|
|
||||||
|
@ -34,9 +34,8 @@ import org.eclipse.core.runtime.Assert;
|
||||||
* <br>
|
* <br>
|
||||||
* template<typename... T> void function(T ...); // is T a parameter pack?
|
* template<typename... T> void function(T ...); // is T a parameter pack?
|
||||||
*/
|
*/
|
||||||
public class CPPASTAmbiguousParameterDeclaration extends ASTAmbiguousNode implements
|
public class CPPASTAmbiguousParameterDeclaration extends ASTAmbiguousNode
|
||||||
IASTAmbiguousParameterDeclaration, ICPPASTParameterDeclaration {
|
implements IASTAmbiguousParameterDeclaration, ICPPASTParameterDeclaration {
|
||||||
|
|
||||||
private ICPPASTParameterDeclaration fParameterDecl;
|
private ICPPASTParameterDeclaration fParameterDecl;
|
||||||
|
|
||||||
public CPPASTAmbiguousParameterDeclaration(ICPPASTParameterDeclaration decl) {
|
public CPPASTAmbiguousParameterDeclaration(ICPPASTParameterDeclaration decl) {
|
||||||
|
@ -47,7 +46,6 @@ public class CPPASTAmbiguousParameterDeclaration extends ASTAmbiguousNode implem
|
||||||
public void addParameterDeclaration(IASTParameterDeclaration d) {
|
public void addParameterDeclaration(IASTParameterDeclaration d) {
|
||||||
assert false;
|
assert false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected final IASTNode doResolveAmbiguity(ASTVisitor resolver) {
|
protected final IASTNode doResolveAmbiguity(ASTVisitor resolver) {
|
||||||
|
@ -73,7 +71,7 @@ public class CPPASTAmbiguousParameterDeclaration extends ASTAmbiguousNode implem
|
||||||
final ASTNode asNode = (ASTNode) dtor;
|
final ASTNode asNode = (ASTNode) dtor;
|
||||||
if (ptrOps.length > 0) {
|
if (ptrOps.length > 0) {
|
||||||
final ASTNode first = (ASTNode)ptrOps[0];
|
final ASTNode first = (ASTNode)ptrOps[0];
|
||||||
final ASTNode last = (ASTNode)ptrOps[ptrOps.length-1];
|
final ASTNode last = (ASTNode)ptrOps[ptrOps.length - 1];
|
||||||
asNode.setOffsetAndLength(first.getOffset(), last.getOffset() + last.getLength());
|
asNode.setOffsetAndLength(first.getOffset(), last.getOffset() + last.getLength());
|
||||||
} else {
|
} else {
|
||||||
asNode.setOffsetAndLength(0, 0);
|
asNode.setOffsetAndLength(0, 0);
|
||||||
|
@ -82,7 +80,7 @@ public class CPPASTAmbiguousParameterDeclaration extends ASTAmbiguousNode implem
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IASTParameterDeclaration[] getParameterDeclarations() {
|
public IASTParameterDeclaration[] getParameterDeclarations() {
|
||||||
return new IASTParameterDeclaration[] {fParameterDecl};
|
return new IASTParameterDeclaration[] { fParameterDecl };
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -32,8 +32,9 @@ public class CPPASTAmbiguousStatement extends ASTAmbiguousNode implements IASTAm
|
||||||
private IASTDeclaration fDeclaration;
|
private IASTDeclaration fDeclaration;
|
||||||
|
|
||||||
public CPPASTAmbiguousStatement(IASTStatement... statements) {
|
public CPPASTAmbiguousStatement(IASTStatement... statements) {
|
||||||
for (IASTStatement s : statements)
|
for (IASTStatement s : statements) {
|
||||||
addStatement(s);
|
addStatement(s);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -6,9 +6,9 @@
|
||||||
* http://www.eclipse.org/legal/epl-v10.html
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Andrew Ferguson (Symbian) - Initial Implementation
|
* Andrew Ferguson (Symbian) - Initial Implementation
|
||||||
* Markus Schorn (Wind River Systems)
|
* Markus Schorn (Wind River Systems)
|
||||||
* IBM Corporation
|
* IBM Corporation
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.internal.core.dom.parser.cpp;
|
package org.eclipse.cdt.internal.core.dom.parser.cpp;
|
||||||
|
|
||||||
|
@ -33,11 +33,11 @@ import org.eclipse.core.runtime.Assert;
|
||||||
* Ambiguity node for deciding between type-id and id-expression in a template argument.
|
* Ambiguity node for deciding between type-id and id-expression in a template argument.
|
||||||
*/
|
*/
|
||||||
public class CPPASTAmbiguousTemplateArgument extends ASTAmbiguousNode implements ICPPASTAmbiguousTemplateArgument {
|
public class CPPASTAmbiguousTemplateArgument extends ASTAmbiguousNode implements ICPPASTAmbiguousTemplateArgument {
|
||||||
|
|
||||||
private List<IASTNode> fNodes;
|
private List<IASTNode> fNodes;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param nodes nodes of type {@link IASTTypeId}, {@link IASTIdExpression} or {@link ICPPASTPackExpansionExpression}.
|
* @param nodes nodes of type {@link IASTTypeId}, {@link IASTIdExpression}
|
||||||
|
* or {@link ICPPASTPackExpansionExpression}.
|
||||||
*/
|
*/
|
||||||
public CPPASTAmbiguousTemplateArgument(IASTNode... nodes) {
|
public CPPASTAmbiguousTemplateArgument(IASTNode... nodes) {
|
||||||
fNodes= new ArrayList<IASTNode>(2);
|
fNodes= new ArrayList<IASTNode>(2);
|
||||||
|
@ -56,7 +56,6 @@ public class CPPASTAmbiguousTemplateArgument extends ASTAmbiguousNode implements
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void beforeAlternative(IASTNode node) {
|
protected void beforeAlternative(IASTNode node) {
|
||||||
|
@ -77,13 +76,11 @@ public class CPPASTAmbiguousTemplateArgument extends ASTAmbiguousNode implements
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void afterResolution(ASTVisitor resolver, IASTNode best) {
|
protected void afterResolution(ASTVisitor resolver, IASTNode best) {
|
||||||
beforeAlternative(best);
|
beforeAlternative(best);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IASTNode copy() {
|
public IASTNode copy() {
|
||||||
return copy(CopyStyle.withoutLocations);
|
return copy(CopyStyle.withoutLocations);
|
||||||
|
@ -91,15 +88,14 @@ public class CPPASTAmbiguousTemplateArgument extends ASTAmbiguousNode implements
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IASTNode copy(CopyStyle style) {
|
public IASTNode copy(CopyStyle style) {
|
||||||
|
|
||||||
int sizeOfNodes = fNodes.size();
|
int sizeOfNodes = fNodes.size();
|
||||||
IASTNode[] copyNodes = new IASTNode[sizeOfNodes];
|
IASTNode[] copyNodes = new IASTNode[sizeOfNodes];
|
||||||
int arrayIndex = 0;
|
int arrayIndex = 0;
|
||||||
for(IASTNode node : fNodes) {
|
for (IASTNode node : fNodes) {
|
||||||
if(node!=null){
|
if (node != null){
|
||||||
copyNodes[arrayIndex] = node.copy(style);
|
copyNodes[arrayIndex] = node.copy(style);
|
||||||
}else{
|
} else {
|
||||||
copyNodes[arrayIndex]=null;
|
copyNodes[arrayIndex]= null;
|
||||||
}
|
}
|
||||||
arrayIndex++;
|
arrayIndex++;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2004, 2010 IBM Corporation and others.
|
* Copyright (c) 2004, 2010 IBM 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 Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
* http://www.eclipse.org/legal/epl-v10.html
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Andrew Niefer (IBM Corporation) - initial API and implementation
|
* Andrew Niefer (IBM Corporation) - initial API and implementation
|
||||||
* Markus Schorn (Wind River Systems)
|
* Markus Schorn (Wind River Systems)
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
|
@ -16,7 +16,17 @@
|
||||||
package org.eclipse.cdt.internal.core.dom.parser.cpp.semantics;
|
package org.eclipse.cdt.internal.core.dom.parser.cpp.semantics;
|
||||||
|
|
||||||
import static org.eclipse.cdt.core.dom.ast.IASTExpression.ValueCategory.LVALUE;
|
import static org.eclipse.cdt.core.dom.ast.IASTExpression.ValueCategory.LVALUE;
|
||||||
import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUtil.*;
|
import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUtil.ALLCVQ;
|
||||||
|
import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUtil.ARRAY;
|
||||||
|
import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUtil.CVTYPE;
|
||||||
|
import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUtil.MPTR;
|
||||||
|
import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUtil.PTR;
|
||||||
|
import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUtil.REF;
|
||||||
|
import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUtil.TDEF;
|
||||||
|
import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUtil.calculateInheritanceDepth;
|
||||||
|
import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUtil.getNestedType;
|
||||||
|
import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUtil.getUltimateTypeUptoPointers;
|
||||||
|
import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUtil.isConversionOperator;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
@ -3261,7 +3271,7 @@ public class CPPSemantics {
|
||||||
if (tu != null && funcData.foundItems instanceof Object[]) {
|
if (tu != null && funcData.foundItems instanceof Object[]) {
|
||||||
final IIndexFileSet fileSet = tu.getIndexFileSet();
|
final IIndexFileSet fileSet = tu.getIndexFileSet();
|
||||||
if (fileSet != null) {
|
if (fileSet != null) {
|
||||||
int j=0;
|
int j= 0;
|
||||||
final Object[] items= (Object[]) funcData.foundItems;
|
final Object[] items= (Object[]) funcData.foundItems;
|
||||||
for (int i = 0; i < items.length; i++) {
|
for (int i = 0; i < items.length; i++) {
|
||||||
Object item = items[i];
|
Object item = items[i];
|
||||||
|
@ -3292,7 +3302,7 @@ public class CPPSemantics {
|
||||||
items[j++]= func;
|
items[j++]= func;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (j>0) {
|
if (j > 0) {
|
||||||
while (j < items.length)
|
while (j < items.length)
|
||||||
items[j++]= null;
|
items[j++]= null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@ import org.eclipse.ltk.ui.refactoring.UserInputWizardPage;
|
||||||
/**
|
/**
|
||||||
* @author Thomas Corbat
|
* @author Thomas Corbat
|
||||||
*/
|
*/
|
||||||
public class GenerateGettersAndSettersWizard extends RefactoringWizard {
|
public class GenerateGettersAndSettersWizard extends RefactoringWizard {
|
||||||
public GenerateGettersAndSettersWizard(
|
public GenerateGettersAndSettersWizard(
|
||||||
GenerateGettersAndSettersRefactoring refactoring) {
|
GenerateGettersAndSettersRefactoring refactoring) {
|
||||||
super(refactoring, DIALOG_BASED_USER_INTERFACE | PREVIEW_EXPAND_FIRST_NODE);
|
super(refactoring, DIALOG_BASED_USER_INTERFACE | PREVIEW_EXPAND_FIRST_NODE);
|
||||||
|
|
Loading…
Add table
Reference in a new issue