mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
tolerate lookup being closed when making the file writable before insertion (EA-39999)
This commit is contained in:
@@ -600,13 +600,14 @@ public class LookupImpl extends LightweightHint implements LookupEx, Disposable
|
||||
}
|
||||
|
||||
final PsiFile file = getPsiFile();
|
||||
if (file != null && !WriteCommandAction.ensureFilesWritable(myProject, Arrays.asList(file))) {
|
||||
doHide(false, true);
|
||||
fireItemSelected(null, completionChar);
|
||||
boolean writableOk = file == null || WriteCommandAction.ensureFilesWritable(myProject, Arrays.asList(file));
|
||||
if (myDisposed) { // ensureFilesWritable could close us by showing a dialog
|
||||
return;
|
||||
}
|
||||
|
||||
if (myDisposed) { // ensureFilesWritable could close us by showing a dialog
|
||||
if (!writableOk) {
|
||||
doHide(false, true);
|
||||
fireItemSelected(null, completionChar);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user