Java: keep "Inline this usage, keep the method" option enabled when inline is invoked on the only usage (IDEA-362625)

(cherry picked from commit df1e13ff01ce46b415e9466667bfe19ee67145f9)

IJ-CR-149100

GitOrigin-RevId: 04cc035315593d4a8b1950d7d961c41cd838f118
This commit is contained in:
Bas Leijdekkers
2024-11-08 16:14:08 +01:00
committed by intellij-monorepo-bot
parent 7178d5454c
commit fbdc27f1eb
2 changed files with 2 additions and 2 deletions

View File

@@ -22,7 +22,7 @@ public class InlineFieldDialog extends InlineOptionsWithSearchSettingsDialog {
myField = field;
myReferenceExpression = ref;
myOccurrencesNumber = getNumberOfOccurrences(myField);
myInvokedOnReference = myReferenceExpression != null && myOccurrencesNumber != 1;
myInvokedOnReference = myReferenceExpression != null;
setTitle(getRefactoringName());
init();

View File

@@ -28,7 +28,7 @@ public class InlineMethodDialog extends InlineOptionsWithSearchSettingsDialog {
myEditor = editor;
myAllowInlineThisOnly = allowInlineThisOnly;
myOccurrencesNumber = getNumberOfOccurrences(method);
myInvokedOnReference = ref != null && myOccurrencesNumber != 1;
myInvokedOnReference = ref != null;
setTitle(getRefactoringName());
init();