mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
IDEA-163825 Smart step variants from another line
This commit is contained in:
@@ -215,14 +215,14 @@ public class JavaSmartStepIntoHandler extends JvmSmartStepIntoHandler {
|
||||
private void visitConditional(@Nullable PsiElement condition,
|
||||
@Nullable PsiElement thenBranch,
|
||||
@Nullable PsiElement elseBranch) {
|
||||
if (condition != null) {
|
||||
if (condition != null && checkTextRange(condition, true)) {
|
||||
condition.accept(this);
|
||||
}
|
||||
ThreeState conditionRes = evaluateCondition(condition);
|
||||
if (conditionRes != ThreeState.NO && thenBranch != null) {
|
||||
if (conditionRes != ThreeState.NO && thenBranch != null && checkTextRange(thenBranch, true)) {
|
||||
thenBranch.accept(this);
|
||||
}
|
||||
if (conditionRes != ThreeState.YES && elseBranch != null) {
|
||||
if (conditionRes != ThreeState.YES && elseBranch != null && checkTextRange(elseBranch, true)) {
|
||||
elseBranch.accept(this);
|
||||
}
|
||||
}
|
||||
@@ -246,7 +246,7 @@ public class JavaSmartStepIntoHandler extends JvmSmartStepIntoHandler {
|
||||
super.visitExpression(expression);
|
||||
}
|
||||
|
||||
boolean checkTextRange(PsiElement expression, boolean expand) {
|
||||
boolean checkTextRange(@NotNull PsiElement expression, boolean expand) {
|
||||
TextRange range = expression.getTextRange();
|
||||
if (lineRange.intersects(range)) {
|
||||
if (expand) {
|
||||
|
||||
Reference in New Issue
Block a user