mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
cleanup
This commit is contained in:
+1
-2
@@ -32,8 +32,7 @@ class ConstantExpressionPredicate implements PsiElementPredicate {
|
||||
}
|
||||
final PsiPolyadicExpression expression = (PsiPolyadicExpression)element;
|
||||
final PsiType expressionType = expression.getType();
|
||||
if (expressionType == null) return false;
|
||||
if (expressionType.equalsToText("java.lang.String")) {
|
||||
if (expressionType == null || expressionType.equalsToText("java.lang.String")) {
|
||||
// intention disabled for string concatenations because of performance issues on
|
||||
// relatively common large string expressions.
|
||||
return false;
|
||||
|
||||
+2
-2
@@ -73,10 +73,10 @@ class ConstantSubexpressionPredicate implements PsiElementPredicate {
|
||||
if (currentToken == token) {
|
||||
final String binaryExpressionText = operands[i - 1].getText() + ' ' + token.getText() + ' ' + operand.getText();
|
||||
final PsiElementFactory factory = JavaPsiFacade.getElementFactory(expression.getProject());
|
||||
return (PsiBinaryExpression)factory.createExpressionFromText(binaryExpressionText, expression);
|
||||
return (PsiPolyadicExpression)factory.createExpressionFromText(binaryExpressionText, expression);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new AssertionError();
|
||||
}
|
||||
|
||||
private static boolean isPartOfLargerExpression(PsiPolyadicExpression expression) {
|
||||
|
||||
Reference in New Issue
Block a user