mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-10-01 13:11:39 +07:00
extract functional: skip if element was invalidated (IDEA-174178)
when typed to the editor between dialog is closed and popup was shown
This commit is contained in:
+3
@@ -639,6 +639,9 @@ public class IntroduceParameterHandler extends IntroduceHandlerBase {
|
||||
final PsiType selectedType,
|
||||
final ExtractMethodProcessor processor,
|
||||
final PsiElement[] elements) {
|
||||
if (!elements[0].isValid()) {
|
||||
return;
|
||||
}
|
||||
final PsiElement commonParent = findCommonParent(elements);
|
||||
if (commonParent == null) {
|
||||
LOG.error("Should have common parent:" + Arrays.toString(elements));
|
||||
|
||||
+1
@@ -115,6 +115,7 @@ public class IntroduceFunctionalVariableHandler extends IntroduceVariableHandler
|
||||
Editor editor,
|
||||
MyExtractMethodProcessor processor,
|
||||
PsiElement[] elements) {
|
||||
if (!elements[0].isValid()) return;
|
||||
if (!CommonRefactoringUtil.checkReadOnlyStatus(project, elements[0])) return;
|
||||
MyExtractMethodProcessor physicalProcessor =
|
||||
new MyExtractMethodProcessor(project, editor, elements,
|
||||
|
||||
Reference in New Issue
Block a user