From ee27356ecf18959a857fb0aeb3f964e8000a566d Mon Sep 17 00:00:00 2001 From: Sergey Prigogin Date: Mon, 9 Jul 2012 19:51:59 -0700 Subject: [PATCH] Cosmetics. --- .../cdt/core/dom/ast/DOMException.java | 19 ++++++++---------- .../ast/cpp/ICPPTemplateNonTypeParameter.java | 17 ++++++++-------- .../dom/parser/cpp/CPPASTFieldReference.java | 4 ++-- .../parser/cpp/CPPClassSpecialization.java | 12 ++++------- .../parser/cpp/semantics/CPPTemplates.java | 20 +++++++++---------- 5 files changed, 32 insertions(+), 40 deletions(-) diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/DOMException.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/DOMException.java index 6b83daef583..d7503419071 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/DOMException.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/DOMException.java @@ -1,11 +1,11 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 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) 2004, 2009 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: + * Contributors: * Andrew Niefer (IBM Corporation) - initial API and implementation *******************************************************************************/ package org.eclipse.cdt.core.dom.ast; @@ -18,22 +18,19 @@ package org.eclipse.cdt.core.dom.ast; * @noinstantiate This class is not intended to be instantiated by clients. */ public class DOMException extends Exception { - private static final long serialVersionUID = 0; IProblemBinding problemBinding; /** - * @param problem - * binding for throwing - * + * @param problem the binding for throwing */ public DOMException(IProblemBinding problem) { problemBinding = problem; } /** - * Get the problem associated w/this exception. + * Returns the problem associated w/this exception. * * @return problem */ diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPTemplateNonTypeParameter.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPTemplateNonTypeParameter.java index f04895b4f41..5861713590e 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPTemplateNonTypeParameter.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPTemplateNonTypeParameter.java @@ -1,13 +1,13 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 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) 2004, 2009 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: - * Doug Schaefer (IBM) - Initial API and implementation - * Markus Schorn (Wind River Systems) + * Contributors: + * Doug Schaefer (IBM) - Initial API and implementation + * Markus Schorn (Wind River Systems) *******************************************************************************/ package org.eclipse.cdt.core.dom.ast.cpp; @@ -20,7 +20,6 @@ import org.eclipse.cdt.core.dom.ast.IASTExpression; * @noextend This interface is not intended to be extended by clients. */ public interface ICPPTemplateNonTypeParameter extends ICPPTemplateParameter, ICPPVariable { - /** * @deprecated, use {@link ICPPTemplateParameter#getDefaultValue()}. */ diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFieldReference.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFieldReference.java index 3f7f1473b53..8a2dff09a33 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFieldReference.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFieldReference.java @@ -274,10 +274,10 @@ public class CPPASTFieldReference extends ASTNode IASTName[] ns= ((ICPPASTQualifiedName) n).getNames(); if (ns.length < 2) return EvalFixed.INCOMPLETE; - qualifier= ns[ns.length-2].resolveBinding(); + qualifier= ns[ns.length - 2].resolveBinding(); if (qualifier instanceof IProblemBinding) return EvalFixed.INCOMPLETE; - n= ns[ns.length-1]; + n= ns[ns.length - 1]; } if (n instanceof ICPPASTTemplateId) { args= CPPTemplates.createTemplateArgumentArray((ICPPASTTemplateId) n); diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassSpecialization.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassSpecialization.java index 4a1c7c34e7f..c1e5df4ee23 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassSpecialization.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassSpecialization.java @@ -57,11 +57,11 @@ public class CPPClassSpecialization extends CPPSpecialization private ObjectMap specializationMap= ObjectMap.EMPTY_MAP; private final ThreadLocal> fInProgress= new ThreadLocal>(); - public CPPClassSpecialization(ICPPClassType specialized, IBinding owner, ICPPTemplateParameterMap argumentMap) { + public CPPClassSpecialization(ICPPClassType specialized, IBinding owner, + ICPPTemplateParameterMap argumentMap) { super(specialized, owner, argumentMap); } - @Override public ICPPClassType getSpecializedBinding() { return (ICPPClassType) super.getSpecializedBinding(); @@ -75,7 +75,7 @@ public class CPPClassSpecialization extends CPPSpecialization @Override public IBinding specializeMember(IBinding original, IASTNode point) { Set set; - synchronized(this) { + synchronized (this) { IBinding result= (IBinding) specializationMap.get(original); if (result != null) return result; @@ -91,7 +91,7 @@ public class CPPClassSpecialization extends CPPSpecialization IBinding result= CPPTemplates.createSpecialization(this, original, point); set.remove(original); - synchronized(this) { + synchronized (this) { IBinding concurrent= (IBinding) specializationMap.get(original); if (concurrent != null) return concurrent; @@ -233,9 +233,6 @@ public class CPPClassSpecialization extends CPPSpecialization return specScope; } - /* (non-Javadoc) - * @see org.eclipse.cdt.core.dom.ast.IType#isSameType(org.eclipse.cdt.core.dom.ast.IType) - */ @Override public boolean isSameType(IType type) { if (type == this) @@ -251,7 +248,6 @@ public class CPPClassSpecialization extends CPPSpecialization @Override public Object clone() { - // TODO Auto-generated method stub return this; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPTemplates.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPTemplates.java index b42087adb35..bfd903dc69e 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPTemplates.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPTemplates.java @@ -844,7 +844,7 @@ public class CPPTemplates { return null; ICPPClassSpecialization within= (ICPPClassSpecialization) owner; ICPPClassType orig = within.getSpecializedBinding(); - for(;;) { + for (;;) { IBinding o1 = within.getOwner(); IBinding o2 = orig.getOwner(); if (!(o1 instanceof ICPPClassSpecialization && o2 instanceof ICPPClassType)) @@ -1027,7 +1027,7 @@ public class CPPTemplates { IType[] newResult= new IType[result.length+packSize-1]; System.arraycopy(result, 0, newResult, 0, j); result= newResult; - for(int k=0; k 0) { System.arraycopy(args, 0, result, 0, i); @@ -1145,7 +1145,7 @@ public class CPPTemplates { } /** - * Instantiates the given type with the provided map and packoffset. + * Instantiates the given type with the provided map and packОffset. * The context is used to replace templates with their specialization, where appropriate. * @param point */