improved spring performance (IDEA-77222, IDEA-79981,IDEA-79763, etc.)

This commit is contained in:
Serega Vasiliev
2012-01-19 16:30:40 +01:00
parent 47368ac891
commit b64a791521
2 changed files with 21 additions and 0 deletions
@@ -323,5 +323,25 @@ public abstract class DomAnchorImpl<T extends DomElement> implements DomAnchor<T
public XmlFile getContainingFile() {
return (XmlFile)myAnchor.getFile();
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
PsiBasedDomAnchor anchor = (PsiBasedDomAnchor)o;
if (myAnchor != null ? !myAnchor.equals(anchor.myAnchor) : anchor.myAnchor != null) return false;
if (myProject != null ? !myProject.equals(anchor.myProject) : anchor.myProject != null) return false;
return true;
}
@Override
public int hashCode() {
int result = myAnchor != null ? myAnchor.hashCode() : 0;
result = 31 * result + (myProject != null ? myProject.hashCode() : 0);
return result;
}
}
}
@@ -90,6 +90,7 @@ public class DomModelImpl<T extends DomElement> {
return myMergedModel instanceof MergedObject ? ((MergedObject) myMergedModel).getImplementations() : Collections.singletonList(myMergedModel);
}
@NotNull
public Project getProject() {
return myProject;
}