mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
another place in parameter info to use async commit
This commit is contained in:
@@ -36,7 +36,6 @@ import com.intellij.openapi.application.TransactionId;
|
||||
import com.intellij.openapi.components.ServiceManager;
|
||||
import com.intellij.openapi.editor.Editor;
|
||||
import com.intellij.openapi.project.DumbService;
|
||||
import com.intellij.openapi.project.IndexNotReadyException;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.Condition;
|
||||
import com.intellij.openapi.util.Key;
|
||||
@@ -178,22 +177,14 @@ public class AutoPopupController implements Disposable {
|
||||
}
|
||||
|
||||
final PsiFile file1 = file;
|
||||
final Runnable request = new Runnable(){
|
||||
@Override
|
||||
public void run(){
|
||||
if (myProject.isDisposed() || DumbService.isDumb(myProject)) return;
|
||||
documentManager.commitAllDocuments();
|
||||
if (editor.isDisposed() || !editor.getComponent().isShowing()) return;
|
||||
Runnable request = () -> {
|
||||
if (!myProject.isDisposed() && !DumbService.isDumb(myProject) && !editor.isDisposed() && editor.getComponent().isShowing()) {
|
||||
int lbraceOffset = editor.getCaretModel().getOffset() - 1;
|
||||
try {
|
||||
ShowParameterInfoHandler.invoke(myProject, editor, file1, lbraceOffset, highlightedMethod, false);
|
||||
}
|
||||
catch (IndexNotReadyException ignored) { //anything can happen on alarm
|
||||
}
|
||||
ShowParameterInfoHandler.invoke(myProject, editor, file1, lbraceOffset, highlightedMethod, false);
|
||||
}
|
||||
};
|
||||
|
||||
addRequest(request, settings.PARAMETER_INFO_DELAY);
|
||||
addRequest(() -> documentManager.performLaterWhenAllCommitted(request), settings.PARAMETER_INFO_DELAY);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user