completion: use utility method directly to avoid dependency on package-private access from java plugin to the platform

(IDEA-200277)
This commit is contained in:
nik
2018-10-11 10:29:40 +03:00
parent 3583e8c619
commit 195e6faa2e
@@ -18,6 +18,7 @@ package com.intellij.codeInsight.completion;
import com.intellij.codeInsight.daemon.impl.quickfix.StaticImportMemberFix;
import com.intellij.codeInsight.lookup.LookupElement;
import com.intellij.openapi.actionSystem.IdeActions;
import com.intellij.openapi.keymap.KeymapUtil;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.psi.*;
@@ -101,7 +102,7 @@ public abstract class StaticMemberProcessor {
private void showHint(boolean shouldImport) {
if (!myHintShown && !shouldImport) {
final String shortcut = CompletionContributor.getActionShortcut(IdeActions.ACTION_SHOW_INTENTION_ACTIONS);
final String shortcut = KeymapUtil.getFirstKeyboardShortcutText(IdeActions.ACTION_SHOW_INTENTION_ACTIONS);
if (StringUtil.isNotEmpty(shortcut)) {
CompletionService.getCompletionService().setAdvertisementText("To import a method statically, press " + shortcut);
}