mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-10-06 06:21:16 +07:00
postpone open files in the editor after write action completes
EA-114507 - assert: NoSwingUnderWriteAction.lambda$watchForEvents$
This commit is contained in:
@@ -284,7 +284,7 @@ public class CopyClassesHandler extends CopyHandlerDelegateBase {
|
||||
for (PsiFile file : files) {
|
||||
CopyHandler.updateSelectionInActiveProjectView(file, project, selectInActivePanel);
|
||||
}
|
||||
EditorHelper.openFilesInEditor(files.toArray(new PsiFile[files.size()]));
|
||||
EditorHelper.openFilesInEditor(files.toArray(PsiFile.EMPTY_ARRAY));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-1
@@ -16,6 +16,7 @@
|
||||
package com.intellij.refactoring.move.moveClassesOrPackages;
|
||||
|
||||
import com.intellij.ide.util.EditorHelper;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.extensions.Extensions;
|
||||
import com.intellij.openapi.progress.ProgressIndicator;
|
||||
@@ -533,7 +534,7 @@ public class MoveClassesOrPackagesProcessor extends BaseRefactoringProcessor {
|
||||
}
|
||||
|
||||
if (myOpenInEditor) {
|
||||
EditorHelper.openFilesInEditor(myElementsToMove);
|
||||
ApplicationManager.getApplication().invokeLater(() -> EditorHelper.openFilesInEditor(Arrays.stream(myElementsToMove).filter(PsiElement::isValid).toArray(PsiElement[]::new)));
|
||||
}
|
||||
}
|
||||
catch (IncorrectOperationException e) {
|
||||
|
||||
Reference in New Issue
Block a user