IDEA-122465 Spring: Alt-F1/SpringBeans... navigation doesn't work properly in mixed contexts

StubAnchor equals() missing
This commit is contained in:
Yann Cébron
2014-03-26 10:13:47 +01:00
parent eb997fbc03
commit e0e1939256
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2011 JetBrains s.r.o.
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -377,5 +377,22 @@ public abstract class DomAnchorImpl<T extends DomElement> implements DomAnchor<T
public PsiElement getPsiElement() {
return myHandler.getXmlElement();
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
StubAnchor anchor = (StubAnchor)o;
if (myHandler != null ? !myHandler.equals(anchor.myHandler) : anchor.myHandler != null) return false;
return true;
}
@Override
public int hashCode() {
return myHandler != null ? myHandler.hashCode() : 0;
}
}
}