mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
WI-59905 Support extracting duplicates when changed param is also output variable
GitOrigin-RevId: 2292b61d367a5f040e415547ff45a38cb10aec64
This commit is contained in:
committed by
intellij-monorepo-bot
parent
3929f8daa8
commit
01be87cc6b
+6
@@ -146,6 +146,9 @@ public class SimpleDuplicatesFinder {
|
||||
final PsiElement candidateParent = candidate.getParent();
|
||||
if (patternParent == null || candidateParent == null) return false;
|
||||
if (pattern.getUserData(PARAMETER) != null && patternParent.getClass() == candidateParent.getClass()) {
|
||||
if (myOutputVariables.contains(pattern.getText())) {
|
||||
match.changeOutput(candidate.getText());
|
||||
}
|
||||
return changeParameter(pattern.getText(), candidate.getText(), match);
|
||||
}
|
||||
if (children1.length != children2.length) return false;
|
||||
@@ -158,6 +161,9 @@ public class SimpleDuplicatesFinder {
|
||||
|
||||
if (children1.length == 0) {
|
||||
if (pattern.getUserData(PARAMETER) != null && patternParent.getClass() == candidateParent.getClass()) {
|
||||
if (myOutputVariables.contains(pattern.getText())) {
|
||||
match.changeOutput(candidate.getText());
|
||||
}
|
||||
return changeParameter(pattern.getText(), candidate.getText(), match);
|
||||
}
|
||||
if (myOutputVariables.contains(pattern.getText())) {
|
||||
|
||||
Reference in New Issue
Block a user