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
|
||||
@Override
|
||||
public List<TextRange> mark(@NotNull JetWhenExpression element) {
|
||||
if (hasSyntaxError(element)) return Collections.emptyList();
|
||||
return markElement(element.getWhenKeywordElement());
|
||||
}
|
||||
});
|
||||
|
||||
@@ -74,14 +74,11 @@ public class PositioningStrategies {
|
||||
@NotNull
|
||||
@Override
|
||||
public List<TextRange> mark(@NotNull PsiNameIdentifierOwner element) {
|
||||
if (element.getLastChild() instanceof PsiErrorElement) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
PsiElement nameIdentifier = element.getNameIdentifier();
|
||||
if (nameIdentifier != null) {
|
||||
return markElement(nameIdentifier);
|
||||
}
|
||||
return Collections.emptyList();
|
||||
return markElement(element);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user