logging for EA-33934 - assert: InplaceRefactoring.getSelectedInEditorElement

(cherry picked from commit 0bd32db61347fc443cd34a516925d147f7108f89)
This commit is contained in:
anna
2013-03-27 19:02:35 +01:00
parent 09f4a50b16
commit c621ab1010
@@ -664,10 +664,10 @@ public abstract class InplaceRefactoring {
}
}
private static PsiElement getSelectedInEditorElement(@Nullable PsiElement nameIdentifier,
final Collection<PsiReference> refs,
Collection<Pair<PsiElement, TextRange>> stringUsages,
final int offset) {
private PsiElement getSelectedInEditorElement(@Nullable PsiElement nameIdentifier,
final Collection<PsiReference> refs,
Collection<Pair<PsiElement, TextRange>> stringUsages,
final int offset) {
if (nameIdentifier != null) {
final TextRange range = nameIdentifier.getTextRange();
if (range != null && contains(range, offset)) return nameIdentifier;
@@ -683,7 +683,7 @@ public abstract class InplaceRefactoring {
if (contains(stringUsage.second.shiftRight(element.getTextRange().getStartOffset()), offset)) return element;
}
LOG.error(nameIdentifier);
LOG.error(nameIdentifier + " by " + this.getClass().getName());
return null;
}