mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
EA-420710 (plugin) - IAE: ModalityState.$$$reportNull$$$0
GitOrigin-RevId: 38b3ce7521bbf26f9f090fc706bf9865ba6583b5
This commit is contained in:
committed by
intellij-monorepo-bot
parent
d0de6eda25
commit
d3f5af9da9
+6
-3
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.refactoring.move.moveClassesOrPackages;
|
||||
|
||||
import com.intellij.CommonBundle;
|
||||
@@ -28,7 +28,10 @@ import com.intellij.psi.search.ProjectScope;
|
||||
import com.intellij.psi.util.PsiTreeUtil;
|
||||
import com.intellij.psi.util.PsiUtilCore;
|
||||
import com.intellij.refactoring.*;
|
||||
import com.intellij.refactoring.move.*;
|
||||
import com.intellij.refactoring.move.MoveCallback;
|
||||
import com.intellij.refactoring.move.MoveClassesOrPackagesCallback;
|
||||
import com.intellij.refactoring.move.MoveDialogBase;
|
||||
import com.intellij.refactoring.move.MoveHandler;
|
||||
import com.intellij.refactoring.move.moveFilesOrDirectories.MoveFilesOrDirectoriesUtil;
|
||||
import com.intellij.refactoring.ui.ClassNameReferenceEditor;
|
||||
import com.intellij.refactoring.ui.PackageNameReferenceEditorCombo;
|
||||
@@ -327,7 +330,7 @@ public class MoveClassesOrPackagesDialog extends MoveDialogBase {
|
||||
|
||||
@Override
|
||||
protected void validateButtons() {
|
||||
validateButtonsAsync();
|
||||
validateButtonsAsync(ModalityState.stateForComponent(myMainPanel));
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
||||
@@ -177,8 +177,12 @@ public abstract class RefactoringDialog extends DialogWrapper {
|
||||
getPreviewAction().setEnabled(enabled);
|
||||
getRefactorAction().setEnabled(enabled);
|
||||
}
|
||||
|
||||
|
||||
protected void validateButtonsAsync() {
|
||||
validateButtonsAsync(ModalityState.stateForComponent(getContentPanel()));
|
||||
}
|
||||
|
||||
protected void validateButtonsAsync(@NotNull ModalityState modalityState) {
|
||||
setErrorText(null);
|
||||
ReadAction.nonBlocking(() -> {
|
||||
try {
|
||||
@@ -188,7 +192,7 @@ public abstract class RefactoringDialog extends DialogWrapper {
|
||||
catch (ConfigurationException e) {
|
||||
return e;
|
||||
}
|
||||
}).finishOnUiThread(ModalityState.stateForComponent(getContentPanel()), e -> {
|
||||
}).finishOnUiThread(modalityState, e -> {
|
||||
if (e != null) {
|
||||
setErrorText(e.getMessage());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user