mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-01 06:05:24 +02:00
Cosmetics.
This commit is contained in:
parent
d7e43b1a2c
commit
2afbff2520
7 changed files with 24 additions and 39 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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.
|
||||
*/
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue