mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fix typo
This commit is contained in:
@@ -171,22 +171,16 @@ class JavaSimplePropertyIndex : FileBasedIndexExtension<Int, PropertyIndexValue>
|
||||
.singleOrNull { ElementType.JAVA_STATEMENT_BIT_SET.contains(it.tokenType) }
|
||||
?.takeIf { it.tokenType == JavaElementType.RETURN_STATEMENT}
|
||||
?.let { LightTreeUtil.firstChildOfType(tree, it, ElementType.EXPRESSION_BIT_SET) }
|
||||
?.takeIf(this::doNotContainMethodCalls)
|
||||
?.takeIf(this::doesNotContainMethodCalls)
|
||||
?.let { LightTreeUtil.toFilteredString(tree, it, null) }
|
||||
|
||||
private fun doNotContainMethodCalls(expression: LighterASTNode): Boolean {
|
||||
private fun doesNotContainMethodCalls(expression: LighterASTNode): Boolean {
|
||||
if (expression.tokenType == JavaElementType.METHOD_CALL_EXPRESSION) {
|
||||
return false
|
||||
}
|
||||
val qualifier = JavaLightTreeUtil.findExpressionChild(tree, expression)
|
||||
return qualifier == null || doNotContainMethodCalls(qualifier)
|
||||
return qualifier == null || doesNotContainMethodCalls(qualifier)
|
||||
}
|
||||
|
||||
private fun isEmptyExpressionList(expressionList: LighterASTNode): Boolean {
|
||||
val children = tree.getChildren(expressionList)
|
||||
return children.size == 2 && children[0].tokenType == JavaTokenType.LPARENTH && children[1].tokenType == JavaTokenType.RPARENTH
|
||||
}
|
||||
|
||||
}.visitNode(tree.root)
|
||||
result
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ public abstract class RunConfigurationProducer<T extends RunConfiguration> {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
catch (ClassCastException e) {
|
||||
catch (Exception e) {
|
||||
LOG.error(myConfigurationFactory + " produced wrong type", e);
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user