Got rid of returning empty range list in position strategies (in places where they depend on syntax errors).
This commit is contained in:
@@ -288,7 +288,6 @@ public interface Errors {
|
|||||||
@NotNull
|
@NotNull
|
||||||
@Override
|
@Override
|
||||||
public List<TextRange> mark(@NotNull JetWhenExpression element) {
|
public List<TextRange> mark(@NotNull JetWhenExpression element) {
|
||||||
if (hasSyntaxError(element)) return Collections.emptyList();
|
|
||||||
return markElement(element.getWhenKeywordElement());
|
return markElement(element.getWhenKeywordElement());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -74,14 +74,11 @@ public class PositioningStrategies {
|
|||||||
@NotNull
|
@NotNull
|
||||||
@Override
|
@Override
|
||||||
public List<TextRange> mark(@NotNull PsiNameIdentifierOwner element) {
|
public List<TextRange> mark(@NotNull PsiNameIdentifierOwner element) {
|
||||||
if (element.getLastChild() instanceof PsiErrorElement) {
|
|
||||||
return Collections.emptyList();
|
|
||||||
}
|
|
||||||
PsiElement nameIdentifier = element.getNameIdentifier();
|
PsiElement nameIdentifier = element.getNameIdentifier();
|
||||||
if (nameIdentifier != null) {
|
if (nameIdentifier != null) {
|
||||||
return markElement(nameIdentifier);
|
return markElement(nameIdentifier);
|
||||||
}
|
}
|
||||||
return Collections.emptyList();
|
return markElement(element);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user