mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
(no message)
This commit is contained in:
@@ -244,7 +244,6 @@ public class ShowIntentionsPass extends TextEditorHighlightingPass {
|
||||
*/
|
||||
public static boolean showAddImportHint(Editor editor, final PsiJavaCodeReferenceElement ref) {
|
||||
if (HintManager.getInstance().hasShownHintsThatWillHideByOtherHint()) return false;
|
||||
if (isCaretNearRef(editor,ref)) return false;
|
||||
|
||||
PsiManager manager = ref.getManager();
|
||||
if (manager == null) return false;
|
||||
@@ -315,7 +314,7 @@ public class ShowIntentionsPass extends TextEditorHighlightingPass {
|
||||
int offset2 = ref.getTextRange().getEndOffset();
|
||||
QuestionAction action = new AddImportAction(manager.getProject(), ref, classes, editor);
|
||||
|
||||
if (classes.length == 1 && CodeInsightSettings.getInstance().ADD_UNAMBIGIOUS_IMPORTS_ON_THE_FLY) {
|
||||
if (classes.length == 1 && CodeInsightSettings.getInstance().ADD_UNAMBIGIOUS_IMPORTS_ON_THE_FLY && !isCaretNearRef(editor,ref)) {
|
||||
action.execute();
|
||||
return false;
|
||||
}
|
||||
@@ -334,4 +333,4 @@ public class ShowIntentionsPass extends TextEditorHighlightingPass {
|
||||
private static boolean canBeHint(HighlightInfoType type) {
|
||||
return type == HighlightInfoType.WRONG_REF || type == HighlightInfoType.JAVADOC_WRONG_REF;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user