mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Code formatting.
This commit is contained in:
parent
3d48bf4f02
commit
2aedcbec84
6 changed files with 20 additions and 22 deletions
|
@ -67,7 +67,6 @@ public abstract class CPPTemplateDefinition extends PlatformObject implements IC
|
|||
}
|
||||
}
|
||||
|
||||
//private IASTName templateName;
|
||||
protected IASTName[] declarations;
|
||||
protected IASTName definition;
|
||||
|
||||
|
@ -115,7 +114,7 @@ public abstract class CPPTemplateDefinition extends PlatformObject implements IC
|
|||
public ICPPTemplateInstance[] getAllInstances() {
|
||||
if (instances != null) {
|
||||
ICPPTemplateInstance[] result= new ICPPTemplateInstance[instances.size()];
|
||||
for (int i=0; i < instances.size(); i++) {
|
||||
for (int i= 0; i < instances.size(); i++) {
|
||||
result[i]= (ICPPTemplateInstance) instances.getAt(i);
|
||||
}
|
||||
return result;
|
||||
|
@ -194,7 +193,7 @@ public abstract class CPPTemplateDefinition extends PlatformObject implements IC
|
|||
}
|
||||
return templateParameters;
|
||||
}
|
||||
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalBinding#addDefinition(org.eclipse.cdt.core.dom.ast.IASTNode)
|
||||
*/
|
||||
|
@ -275,7 +274,7 @@ public abstract class CPPTemplateDefinition extends PlatformObject implements IC
|
|||
final protected void updateTemplateParameterBindings(IASTName name) {
|
||||
ICPPASTTemplateParameter[] updateParams = CPPTemplates.getTemplateDeclaration(name).getTemplateParameters();
|
||||
|
||||
int k=0;
|
||||
int k= 0;
|
||||
int tdeclLen= declarations == null ? 0 : declarations.length;
|
||||
for (int i= -1; i < tdeclLen && k < updateParams.length; i++) {
|
||||
IASTName tdecl;
|
||||
|
|
|
@ -37,7 +37,7 @@ import org.eclipse.core.runtime.PlatformObject;
|
|||
*/
|
||||
public abstract class CPPTemplateParameter extends PlatformObject
|
||||
implements ICPPTemplateParameter, ICPPInternalBinding, ICPPTwoPhaseBinding {
|
||||
private IASTName [] declarations;
|
||||
private IASTName[] declarations;
|
||||
private final int position;
|
||||
|
||||
public CPPTemplateParameter(IASTName name) {
|
||||
|
@ -105,7 +105,6 @@ public abstract class CPPTemplateParameter extends PlatformObject
|
|||
return declarations[0].toCharArray();
|
||||
}
|
||||
|
||||
|
||||
public int getParameterPosition() {
|
||||
return position;
|
||||
}
|
||||
|
@ -140,7 +139,7 @@ public abstract class CPPTemplateParameter extends PlatformObject
|
|||
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPBinding#getQualifiedNameCharArray()
|
||||
*/
|
||||
public char[][] getQualifiedNameCharArray() {
|
||||
return new char [][] {getNameCharArray() };
|
||||
return new char[][] {getNameCharArray() };
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
@ -185,7 +184,7 @@ public abstract class CPPTemplateParameter extends PlatformObject
|
|||
} else {
|
||||
if (declarations.length > 0 && declarations[0] == node)
|
||||
return;
|
||||
//keep the lowest offset declaration in [0]
|
||||
// keep the lowest offset declaration in [0]
|
||||
if (declarations.length > 0 && ((ASTNode)node).getOffset() < ((ASTNode)declarations[0]).getOffset()) {
|
||||
declarations = (IASTName[]) ArrayUtil.prepend(IASTName.class, declarations, name);
|
||||
} else {
|
||||
|
|
|
@ -36,25 +36,25 @@ public class CompositeCPPClassTemplate extends CompositeCPPClassType
|
|||
public ICPPClassTemplatePartialSpecialization[] getPartialSpecializations()
|
||||
throws DOMException {
|
||||
try {
|
||||
IIndexFragmentBinding[] bindings= ((CIndex)((CPPCompositesFactory)cf).getContext()).findEquivalentBindings(rbinding);
|
||||
IIndexFragmentBinding[] bindings= ((CIndex)((CPPCompositesFactory) cf).getContext()).findEquivalentBindings(rbinding);
|
||||
IIndexFragmentBinding[][] preresult= new IIndexFragmentBinding[bindings.length][];
|
||||
|
||||
for(int i=0; i<bindings.length; i++) {
|
||||
ICPPClassTemplatePartialSpecialization[] ss= ((ICPPClassTemplate)bindings[i]).getPartialSpecializations();
|
||||
for (int i= 0; i < bindings.length; i++) {
|
||||
ICPPClassTemplatePartialSpecialization[] ss= ((ICPPClassTemplate) bindings[i]).getPartialSpecializations();
|
||||
preresult[i]= new IIndexFragmentBinding[ss.length];
|
||||
System.arraycopy(ss, 0, preresult[i], 0, ss.length);
|
||||
}
|
||||
|
||||
return (ICPPClassTemplatePartialSpecialization[]) ArrayUtil.addAll(ICPPClassTemplatePartialSpecialization.class, null, cf.getCompositeBindings(preresult));
|
||||
} catch(CoreException ce) {
|
||||
} catch (CoreException ce) {
|
||||
CCorePlugin.log(ce);
|
||||
return ICPPClassTemplatePartialSpecialization.EMPTY_PARTIAL_SPECIALIZATION_ARRAY;
|
||||
}
|
||||
}
|
||||
|
||||
public ICPPTemplateParameter[] getTemplateParameters() throws DOMException {
|
||||
ICPPTemplateParameter[] result= ((ICPPClassTemplate)rbinding).getTemplateParameters();
|
||||
for(int i=0; i<result.length; i++) {
|
||||
ICPPTemplateParameter[] result= ((ICPPClassTemplate) rbinding).getTemplateParameters();
|
||||
for (int i= 0; i < result.length; i++) {
|
||||
result[i]= (ICPPTemplateParameter) cf.getCompositeBinding((IIndexFragmentBinding) result[i]);
|
||||
}
|
||||
return result;
|
||||
|
|
|
@ -31,16 +31,16 @@ CompositeCPPClassSpecialization implements ICPPClassTemplate, ICPPInstanceCache{
|
|||
|
||||
public ICPPClassTemplatePartialSpecialization[] getPartialSpecializations()
|
||||
throws DOMException {
|
||||
ICPPClassTemplatePartialSpecialization[] result= ((ICPPClassTemplate)rbinding).getPartialSpecializations();
|
||||
for(int i=0; i<result.length; i++) {
|
||||
ICPPClassTemplatePartialSpecialization[] result= ((ICPPClassTemplate) rbinding).getPartialSpecializations();
|
||||
for (int i= 0; i < result.length; i++) {
|
||||
result[i]= (ICPPClassTemplatePartialSpecialization) cf.getCompositeBinding((IIndexFragmentBinding)result[i]);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public ICPPTemplateParameter[] getTemplateParameters() throws DOMException {
|
||||
ICPPTemplateParameter[] result= ((ICPPClassTemplate)rbinding).getTemplateParameters();
|
||||
for(int i=0; i<result.length; i++) {
|
||||
ICPPTemplateParameter[] result= ((ICPPClassTemplate) rbinding).getTemplateParameters();
|
||||
for (int i= 0; i < result.length; i++) {
|
||||
result[i]= (ICPPTemplateParameter) cf.getCompositeBinding((IIndexFragmentBinding) result[i]);
|
||||
}
|
||||
return result;
|
||||
|
|
|
@ -29,8 +29,8 @@ public class CompositeCPPFunctionTemplate extends CompositeCPPFunction
|
|||
}
|
||||
|
||||
public ICPPTemplateParameter[] getTemplateParameters() throws DOMException {
|
||||
ICPPTemplateParameter[] result= ((ICPPFunctionTemplate)rbinding).getTemplateParameters();
|
||||
for(int i=0; i<result.length; i++) {
|
||||
ICPPTemplateParameter[] result= ((ICPPFunctionTemplate) rbinding).getTemplateParameters();
|
||||
for (int i= 0; i < result.length; i++) {
|
||||
result[i]= (ICPPTemplateParameter) cf.getCompositeBinding((IIndexFragmentBinding) result[i]);
|
||||
}
|
||||
return result;
|
||||
|
|
|
@ -29,8 +29,8 @@ public class CompositeCPPFunctionTemplateSpecialization extends CompositeCPPFunc
|
|||
}
|
||||
|
||||
public ICPPTemplateParameter[] getTemplateParameters() throws DOMException {
|
||||
ICPPTemplateParameter[] result= ((ICPPFunctionTemplate)rbinding).getTemplateParameters();
|
||||
for(int i=0; i<result.length; i++) {
|
||||
ICPPTemplateParameter[] result= ((ICPPFunctionTemplate) rbinding).getTemplateParameters();
|
||||
for (int i= 0; i < result.length; i++) {
|
||||
result[i]= (ICPPTemplateParameter) cf.getCompositeBinding((IIndexFragmentBinding) result[i]);
|
||||
}
|
||||
return result;
|
||||
|
|
Loading…
Add table
Reference in a new issue