mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-183291 Adding a library to classpath via quick command requires clearing of read-only status of file
This commit is contained in:
-4
@@ -87,8 +87,4 @@ class AddExtLibraryDependencyFix extends OrderEntryFix {
|
||||
}.execute());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean startInWriteAction() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
+3
-1
@@ -16,6 +16,7 @@
|
||||
package com.intellij.codeInsight.daemon.impl.quickfix;
|
||||
|
||||
import com.intellij.codeInsight.daemon.QuickFixBundle;
|
||||
import com.intellij.openapi.application.WriteAction;
|
||||
import com.intellij.openapi.editor.Editor;
|
||||
import com.intellij.openapi.module.Module;
|
||||
import com.intellij.openapi.project.Project;
|
||||
@@ -72,7 +73,8 @@ class AddLibraryDependencyFix extends OrderEntryFix {
|
||||
|
||||
@Override
|
||||
public void invoke(@NotNull Project project, @Nullable Editor editor, PsiFile file) {
|
||||
JavaProjectModelModificationService.getInstance(project).addDependency(myCurrentModule, myLibrary, myScope, myExported);
|
||||
WriteAction.run(
|
||||
() -> JavaProjectModelModificationService.getInstance(project).addDependency(myCurrentModule, myLibrary, myScope, myExported));
|
||||
|
||||
if (myQualifiedClassName != null && editor != null) {
|
||||
importClass(myCurrentModule, editor, restoreReference(), myQualifiedClassName);
|
||||
|
||||
-4
@@ -156,8 +156,4 @@ class AddModuleDependencyFix extends OrderEntryFix {
|
||||
return Messages.showOkCancelDialog(project, message, title, Messages.getWarningIcon()) == Messages.OK;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean startInWriteAction() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -94,7 +94,7 @@ public abstract class OrderEntryFix implements IntentionAction, LocalQuickFix {
|
||||
|
||||
@Override
|
||||
public boolean startInWriteAction() {
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user