mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Unnecessary local variable: provide "inline" QuickFix (IDEA-24780)
This commit is contained in:
+11
-6
@@ -55,15 +55,20 @@ public class InlineRefactoringActionHandler implements RefactoringActionHandler
|
||||
}
|
||||
}
|
||||
|
||||
final List<InlineHandler> handlers = InlineHandlers.getInlineHandlers(element.getLanguage());
|
||||
for (InlineHandler handler : handlers) {
|
||||
if (GenericInlineHandler.invoke(element, editor, handler)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (invokeInliner(editor, element)) return;
|
||||
|
||||
String message = RefactoringBundle.getCannotRefactorMessage(RefactoringBundle.message("error.wrong.caret.position.method.or.local.name"));
|
||||
CommonRefactoringUtil.showErrorHint(project, editor, message, REFACTORING_NAME, null);
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean invokeInliner(Editor editor, PsiElement element) {
|
||||
final List<InlineHandler> handlers = InlineHandlers.getInlineHandlers(element.getLanguage());
|
||||
for (InlineHandler handler : handlers) {
|
||||
if (GenericInlineHandler.invoke(element, editor, handler)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user