1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-08 10:16:03 +02:00

Cosmetics.

This commit is contained in:
Sergey Prigogin 2011-07-27 10:40:34 -07:00
parent 3427d95db8
commit acc49b9da2
7 changed files with 43 additions and 47 deletions

View file

@ -23,7 +23,6 @@ import org.eclipse.cdt.internal.core.dom.parser.ASTNode;
* @noimplement This interface is not intended to be implemented by clients. * @noimplement This interface is not intended to be implemented by clients.
*/ */
public interface ICPPUsingDirective { public interface ICPPUsingDirective {
ICPPUsingDirective[] EMPTY_ARRAY = new ICPPUsingDirective[0]; ICPPUsingDirective[] EMPTY_ARRAY = new ICPPUsingDirective[0];
/** /**

View file

@ -24,7 +24,7 @@ import org.eclipse.cdt.internal.core.dom.parser.ITypeMarshalBuffer;
import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.CoreException;
/** /**
* Integral c++ type. * Built-in c++ type.
*/ */
public class CPPBasicType implements ICPPBasicType, ISerializableType { public class CPPBasicType implements ICPPBasicType, ISerializableType {
public static final CPPBasicType BOOLEAN = new CPPBasicType(Kind.eBoolean, 0, null); public static final CPPBasicType BOOLEAN = new CPPBasicType(Kind.eBoolean, 0, null);
@ -97,7 +97,6 @@ public class CPPBasicType implements ICPPBasicType, ISerializableType {
} }
} }
public boolean isSameType(IType object) { public boolean isSameType(IType object) {
if (object == this) if (object == this)
return true; return true;
@ -208,13 +207,11 @@ public class CPPBasicType implements ICPPBasicType, ISerializableType {
return new CPPBasicType(Kind.values()[kind], modifiers); return new CPPBasicType(Kind.values()[kind], modifiers);
} }
@Deprecated @Deprecated
public int getQualifierBits() { public int getQualifierBits() {
return getModifiers(); return getModifiers();
} }
@Deprecated @Deprecated
public int getType() { public int getType() {
switch (fKind) { switch (fKind) {
@ -239,6 +236,7 @@ public class CPPBasicType implements ICPPBasicType, ISerializableType {
} }
return t_unspecified; return t_unspecified;
} }
/** /**
* @deprecated types don't have values * @deprecated types don't have values
*/ */

View file

@ -88,7 +88,7 @@ public abstract class CompositeIndexBinding implements IIndexBinding {
} }
public boolean isFileLocal() throws CoreException { public boolean isFileLocal() throws CoreException {
return rbinding != null ? rbinding.isFileLocal() : false; return rbinding != null && rbinding.isFileLocal();
} }
public IIndexFile getLocalToFile() throws CoreException { public IIndexFile getLocalToFile() throws CoreException {

View file

@ -233,7 +233,7 @@ public class CPPCompositesFactory extends AbstractCompositeFactory {
} }
protected IIndexFragmentBinding findOneBinding(IBinding binding) { protected IIndexFragmentBinding findOneBinding(IBinding binding) {
return super.findOneBinding(binding, false); return findOneBinding(binding, false);
} }
/* (non-Javadoc) /* (non-Javadoc)

View file

@ -24,13 +24,13 @@ import org.eclipse.core.runtime.CoreException;
public interface IPDOMCPPClassType extends ICPPClassType, IPDOMBinding, IIndexType { public interface IPDOMCPPClassType extends ICPPClassType, IPDOMBinding, IIndexType {
/** /**
* Visit the children of the class type without using the cache. This method is * Visits the children of the class type without using the cache. This method is
* used to populate the cache. * used to populate the cache.
*/ */
void acceptUncached(IPDOMVisitor visitor) throws CoreException; void acceptUncached(IPDOMVisitor visitor) throws CoreException;
/** /**
* Return the scope name, for use in {@link IScope#getScopeName()} * Returns the scope name, for use in {@link IScope#getScopeName()}
*/ */
IIndexName getScopeName(); IIndexName getScopeName();
} }

View file

@ -147,7 +147,7 @@ class PDOMCPPNamespace extends PDOMCPPBinding
} }
public ICPPUsingDirective[] getUsingDirectives() { public ICPPUsingDirective[] getUsingDirectives() {
return new ICPPUsingDirective[0]; return ICPPUsingDirective.EMPTY_ARRAY;
} }
public IBinding[] find(String name) { public IBinding[] find(String name) {

View file

@ -72,7 +72,7 @@ public class LineSearchElement extends PDOMSearchElement {
if (!(obj instanceof Match)) if (!(obj instanceof Match))
return false; return false;
Match m = (Match) obj; Match m = (Match) obj;
return (fOffset == m.fOffset) && (fLength == m.fLength); return fOffset == m.fOffset && fLength == m.fLength;
} }
@Override @Override
@ -142,7 +142,7 @@ public class LineSearchElement extends PDOMSearchElement {
if (!(obj instanceof LineSearchElement)) if (!(obj instanceof LineSearchElement))
return false; return false;
LineSearchElement other = (LineSearchElement) obj; LineSearchElement other = (LineSearchElement) obj;
return (fOffset == other.fOffset) && (super.equals(obj)) && (fMatches.equals(other.fMatches)); return fOffset == other.fOffset && super.equals(obj) && fMatches.equals(other.fMatches);
} }
@Override @Override
@ -220,7 +220,6 @@ public class LineSearchElement extends PDOMSearchElement {
private static LineSearchElement[] collectLineElements(AbstractCharArray buf, Match[] matches, private static LineSearchElement[] collectLineElements(AbstractCharArray buf, Match[] matches,
IIndexFileLocation fileLocation) { IIndexFileLocation fileLocation) {
List<LineSearchElement> result = new ArrayList<LineSearchElement>(); List<LineSearchElement> result = new ArrayList<LineSearchElement>();
List<Match> matchCollector= new ArrayList<Match>(); List<Match> matchCollector= new ArrayList<Match>();