mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
remove unused code
This commit is contained in:
@@ -17,9 +17,7 @@ package com.intellij.psi.formatter.java;
|
||||
|
||||
import com.intellij.formatting.WrapType;
|
||||
import com.intellij.lang.ASTNode;
|
||||
import com.intellij.psi.PsiExpression;
|
||||
import com.intellij.psi.PsiPolyadicExpression;
|
||||
import com.intellij.psi.PsiWhiteSpace;
|
||||
import com.intellij.psi.codeStyle.CommonCodeStyleSettings;
|
||||
import com.intellij.psi.impl.source.tree.JavaElementType;
|
||||
import com.intellij.psi.tree.IElementType;
|
||||
@@ -75,33 +73,6 @@ public class JavaFormatterUtil {
|
||||
return expression1.getOperationTokenType() == expression2.getOperationTokenType();
|
||||
}
|
||||
|
||||
public static boolean hasMultilineArguments(@NotNull PsiExpression[] arguments) {
|
||||
for (PsiExpression argument: arguments) {
|
||||
ASTNode node = argument.getNode();
|
||||
if (node.textContains('\n'))
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isMultilineExceptArguments(@NotNull PsiExpression[] arguments) {
|
||||
for (PsiExpression argument : arguments) {
|
||||
ASTNode beforeArgument = argument.getNode().getTreePrev();
|
||||
if (isWhiteSpaceWithLineFeed(beforeArgument))
|
||||
return true;
|
||||
}
|
||||
|
||||
PsiExpression lastArgument = arguments[arguments.length - 1];
|
||||
ASTNode afterLastArgument = lastArgument.getNode().getTreeNext();
|
||||
return isWhiteSpaceWithLineFeed(afterLastArgument);
|
||||
}
|
||||
|
||||
private static boolean isWhiteSpaceWithLineFeed(@NotNull ASTNode node) {
|
||||
return node instanceof PsiWhiteSpace
|
||||
&& node.textContains('\n');
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static WrapType getWrapType(int wrap) {
|
||||
switch (wrap) {
|
||||
|
||||
Reference in New Issue
Block a user