diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassTemplate.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassTemplate.java index aab5db64108..fd1382816c9 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassTemplate.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassTemplate.java @@ -46,8 +46,7 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPTemplates; */ public class CPPClassTemplate extends CPPTemplateDefinition implements ICPPClassTemplate, ICPPInternalClassTemplate, ICPPInternalClassTypeMixinHost { - - private ICPPClassTemplatePartialSpecialization[] partialSpecializations = null; + private ICPPClassTemplatePartialSpecialization[] partialSpecializations; private ICPPDeferredClassInstance fDeferredInstance; private boolean addedPartialSpecializationsOfIndex; @@ -212,9 +211,7 @@ public class CPPClassTemplate extends CPPTemplateDefinition implements ICPPClass return null; } - /* (non-Javadoc) - * For debug purposes only - */ + /* For debug purposes only */ @Override public String toString() { return ASTTypeUtil.getType(this); @@ -249,7 +246,7 @@ public class CPPClassTemplate extends CPPTemplateDefinition implements ICPPClass @Override public boolean isFinal() { ICPPASTCompositeTypeSpecifier typeSpecifier = getCompositeTypeSpecifier(); - if(typeSpecifier != null){ + if (typeSpecifier != null) { return typeSpecifier.isFinal(); } return false; diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassType.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassType.java index d5cee05e031..11fdfe55c6b 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassType.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassType.java @@ -113,7 +113,7 @@ public class CPPClassType extends PlatformObject implements ICPPInternalClassTyp private IASTName definition; private IASTName[] declarations; - private boolean checked = false; + private boolean checked; private ICPPClassType typeInIndex; public CPPClassType(IASTName name, IBinding indexBinding) { @@ -122,10 +122,11 @@ public class CPPClassType extends PlatformObject implements ICPPInternalClassTyp while (parent instanceof IASTName) parent = parent.getParent(); - if (parent instanceof IASTCompositeTypeSpecifier) + if (parent instanceof IASTCompositeTypeSpecifier) { definition = name; - else + } else { declarations = new IASTName[] { name }; + } name.setBinding(this); if (indexBinding instanceof ICPPClassType && indexBinding instanceof IIndexBinding) { typeInIndex= (ICPPClassType) indexBinding; @@ -408,7 +409,7 @@ public class CPPClassType extends PlatformObject implements ICPPInternalClassTyp private IASTName stripQualifier(IASTName name) { if (name instanceof ICPPASTQualifiedName) { IASTName[] ns = ((ICPPASTQualifiedName)name).getNames(); - name = ns[ ns.length - 1 ]; + name = ns[ns.length - 1]; } return name; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPInternalClassTypeMixinHost.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPInternalClassTypeMixinHost.java index af964f6f7b8..d21ab0981e9 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPInternalClassTypeMixinHost.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPInternalClassTypeMixinHost.java @@ -6,7 +6,7 @@ * http://www.eclipse.org/legal/epl-v10.html * * Contributors: - * Andrew Ferguson (Symbian) - Initial implementation + * Andrew Ferguson (Symbian) - Initial implementation *******************************************************************************/ package org.eclipse.cdt.internal.core.dom.parser.cpp; @@ -21,17 +21,14 @@ interface ICPPInternalClassTypeMixinHost extends ICPPClassType, ICPPInternalBind /** * @return the composite type specifier for the class type */ - ICPPASTCompositeTypeSpecifier getCompositeTypeSpecifier(); - - /** - * {@inheritDoc} - */ - @Override + ICPPASTCompositeTypeSpecifier getCompositeTypeSpecifier(); + + @Override ICPPClassScope getCompositeScope(); - /** - * Ensures the ICPPInternalBinding definition is set, if this is possible. - * @see ICPPInternalBinding#getDefinition() - */ - void checkForDefinition(); + /** + * Ensures the ICPPInternalBinding definition is set, if this is possible. + * @see ICPPInternalBinding#getDefinition() + */ + void checkForDefinition(); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/IPDOMBinding.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/IPDOMBinding.java index d88a4451445..5061a47d046 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/IPDOMBinding.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/IPDOMBinding.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.internal.core.pdom.dom; @@ -15,10 +15,9 @@ import org.eclipse.cdt.internal.core.index.IIndexFragmentBinding; import org.eclipse.cdt.internal.core.pdom.PDOM; /** - * Marker for bindings in the pdom + * Interface for bindings in the PDOM. */ public interface IPDOMBinding extends IPDOMNode, IIndexFragmentBinding { - /** * Returns the database this binding belongs to. */ diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/IPDOMMemberOwner.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/IPDOMMemberOwner.java index f96c37538ef..72e3e72e3f6 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/IPDOMMemberOwner.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/IPDOMMemberOwner.java @@ -6,7 +6,7 @@ * http://www.eclipse.org/legal/epl-v10.html * * Contributors: - * Andrew Ferguson (Symbian) - Initial API and implementation + * Andrew Ferguson (Symbian) - Initial API and implementation *******************************************************************************/ package org.eclipse.cdt.internal.core.pdom.dom; diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/IPDOMCPPClassType.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/IPDOMCPPClassType.java index 6767e35d127..e13a004544d 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/IPDOMCPPClassType.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/IPDOMCPPClassType.java @@ -22,7 +22,6 @@ import org.eclipse.core.runtime.CoreException; * Interface that allows to implement a class-scope. */ public interface IPDOMCPPClassType extends ICPPClassType, IPDOMBinding, IIndexType { - /** * Visits the children of the class type without using the cache. This method is * used to populate the cache. diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/utils/VisibilityEnum.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/utils/VisibilityEnum.java index aad471a5508..5b82a7aac96 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/utils/VisibilityEnum.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/utils/VisibilityEnum.java @@ -12,7 +12,6 @@ *******************************************************************************/ package org.eclipse.cdt.internal.ui.refactoring.utils; -import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompositeTypeSpecifier.ICPPASTBaseSpecifier; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTVisibilityLabel; /** @@ -20,19 +19,16 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTVisibilityLabel; */ public enum VisibilityEnum { // The values are ordered by increasing visibility. - v_private("private", ICPPASTVisibilityLabel.v_private, ICPPASTBaseSpecifier.v_private), //$NON-NLS-1$ - v_protected("protected", ICPPASTVisibilityLabel.v_protected, ICPPASTBaseSpecifier.v_protected), //$NON-NLS-1$ - v_public("public", ICPPASTVisibilityLabel.v_public, ICPPASTBaseSpecifier.v_public); //$NON-NLS-1$ + v_private("private", ICPPASTVisibilityLabel.v_private), //$NON-NLS-1$ + v_protected("protected", ICPPASTVisibilityLabel.v_protected), //$NON-NLS-1$ + v_public("public", ICPPASTVisibilityLabel.v_public); //$NON-NLS-1$ private final String stringRepresentation; private final int visibilityLabelValue; - private final int baseSpecifierValue; - private VisibilityEnum(String stringRepresentation, int visibilityLabelValue, - int baseSpecifierValue) { + private VisibilityEnum(String stringRepresentation, int visibilityLabelValue) { this.stringRepresentation = stringRepresentation; this.visibilityLabelValue = visibilityLabelValue; - this.baseSpecifierValue = baseSpecifierValue; } public static VisibilityEnum from(ICPPASTVisibilityLabel visibility) { @@ -47,10 +43,6 @@ public enum VisibilityEnum { return null; } - public int getBaseSpecifierValue() { - return baseSpecifierValue; - } - public int getVisibilityLabelValue() { return visibilityLabelValue; }