Remove unused utility methods
This commit is contained in:
@@ -653,8 +653,9 @@ public class JetPsiUtil {
|
|||||||
JetTokens.ALL_ASSIGNMENTS.contains(((JetBinaryExpression) element).getOperationToken());
|
JetTokens.ALL_ASSIGNMENTS.contains(((JetBinaryExpression) element).getOperationToken());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isBranchedExpression(@Nullable PsiElement element) {
|
public static boolean isOrdinaryAssignment(@NotNull PsiElement element) {
|
||||||
return element instanceof JetIfExpression || element instanceof JetWhenExpression;
|
return element instanceof JetBinaryExpression &&
|
||||||
|
((JetBinaryExpression) element).getOperationToken().equals(JetTokens.EQ);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
@@ -705,17 +706,6 @@ public class JetPsiUtil {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
|
||||||
public static <C extends Collection<JetVariableDeclaration>> C getBlockVariableDeclarations(@NotNull JetBlockExpression block, @NotNull C collection) {
|
|
||||||
for (JetElement element : block.getStatements()) {
|
|
||||||
if (element instanceof JetVariableDeclaration) {
|
|
||||||
collection.add((JetVariableDeclaration) element);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return collection;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static boolean checkWhenExpressionHasSingleElse(@NotNull JetWhenExpression whenExpression) {
|
public static boolean checkWhenExpressionHasSingleElse(@NotNull JetWhenExpression whenExpression) {
|
||||||
int elseCount = 0;
|
int elseCount = 0;
|
||||||
for (JetWhenEntry entry : whenExpression.getEntries()) {
|
for (JetWhenEntry entry : whenExpression.getEntries()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user