diff --git a/java/java-impl/src/com/intellij/codeInsight/completion/JavaCompletionContributor.java b/java/java-impl/src/com/intellij/codeInsight/completion/JavaCompletionContributor.java index 6e0274599cf1..15829dfdb671 100644 --- a/java/java-impl/src/com/intellij/codeInsight/completion/JavaCompletionContributor.java +++ b/java/java-impl/src/com/intellij/codeInsight/completion/JavaCompletionContributor.java @@ -471,9 +471,9 @@ public class JavaCompletionContributor extends CompletionContributor { PsiElement position = parameters.getPosition(); if (psiElement().withParent(psiReferenceExpression().withFirstChild(psiReferenceExpression().referencing(psiClass()))).accepts(position)) { if (CompletionUtil.shouldShowFeature(parameters, JavaCompletionFeatures.GLOBAL_MEMBER_NAME)) { - final String shortcut = getActionShortcut(IdeActions.ACTION_CLASS_NAME_COMPLETION); + final String shortcut = getActionShortcut(IdeActions.ACTION_CODE_COMPLETION); if (shortcut != null) { - return "Pressing " + shortcut + " without a class qualifier would show all accessible static methods"; + return "Pressing " + shortcut + " twice without a class qualifier would show all accessible static methods"; } } } @@ -490,7 +490,7 @@ public class JavaCompletionContributor extends CompletionContributor { if (parameters.getCompletionType() != CompletionType.CLASS_NAME && shouldSuggestClassNameCompletion(parameters.getPosition())) { if (CompletionUtil.shouldShowFeature(parameters, CodeCompletionFeatures.EDITING_COMPLETION_CLASSNAME)) { - final String shortcut = getActionShortcut(IdeActions.ACTION_CLASS_NAME_COMPLETION); + final String shortcut = getActionShortcut(IdeActions.ACTION_CODE_COMPLETION); if (shortcut != null) { return CompletionBundle.message("completion.class.name.hint", shortcut); } diff --git a/platform/lang-impl/src/com/intellij/codeInsight/completion/FilePathCompletionContributor.java b/platform/lang-impl/src/com/intellij/codeInsight/completion/FilePathCompletionContributor.java index 5f7940e5fc6e..a6f60ea38427 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/completion/FilePathCompletionContributor.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/completion/FilePathCompletionContributor.java @@ -68,10 +68,9 @@ public class FilePathCompletionContributor extends CompletionContributor { @NotNull CompletionResultSet result) { final PsiReference psiReference = parameters.getPosition().getContainingFile().findReferenceAt(parameters.getOffset()); if (getReference(psiReference) != null) { - final String shortcut = getActionShortcut(IdeActions.ACTION_CLASS_NAME_COMPLETION); - final CompletionService service = CompletionService.getCompletionService(); - if (/*StringUtil.isEmpty(service.getAdvertisementText()) &&*/ shortcut != null) { - service.setAdvertisementText(CodeInsightBundle.message("class.completion.file.path", shortcut)); + final String shortcut = getActionShortcut(IdeActions.ACTION_CODE_COMPLETION); + if (shortcut != null) { + CompletionService.getCompletionService().setAdvertisementText(CodeInsightBundle.message("class.completion.file.path", shortcut)); } } } @@ -166,10 +165,10 @@ public class FilePathCompletionContributor extends CompletionContributor { } if (set.getSuitableFileTypes().length > 0 && parameters.getInvocationCount() == 1) { - final String shortcut = getActionShortcut(IdeActions.ACTION_CLASS_NAME_COMPLETION); - final CompletionService service = CompletionService.getCompletionService(); + final String shortcut = getActionShortcut(IdeActions.ACTION_CODE_COMPLETION); if (shortcut != null) { - service.setAdvertisementText(CodeInsightBundle.message("class.completion.file.path.all.variants", shortcut)); + CompletionService.getCompletionService() + .setAdvertisementText(CodeInsightBundle.message("class.completion.file.path.all.variants", shortcut)); } } diff --git a/platform/platform-api/src/com/intellij/openapi/actionSystem/IdeActions.java b/platform/platform-api/src/com/intellij/openapi/actionSystem/IdeActions.java index f366cb5e69b5..b6fa20a49a20 100644 --- a/platform/platform-api/src/com/intellij/openapi/actionSystem/IdeActions.java +++ b/platform/platform-api/src/com/intellij/openapi/actionSystem/IdeActions.java @@ -67,7 +67,7 @@ public interface IdeActions { @NonNls String ACTION_SHOW_INTENTION_ACTIONS = "ShowIntentionActions"; @NonNls String ACTION_CODE_COMPLETION = "CodeCompletion"; @NonNls String ACTION_SMART_TYPE_COMPLETION = "SmartTypeCompletion"; - @NonNls String ACTION_CLASS_NAME_COMPLETION = "ClassNameCompletion"; + @Deprecated @NonNls String ACTION_CLASS_NAME_COMPLETION = "ClassNameCompletion"; @NonNls String ACTION_CHOOSE_LOOKUP_ITEM = "EditorChooseLookupItem"; @NonNls String ACTION_CHOOSE_LOOKUP_ITEM_ALWAYS = "EditorChooseLookupItemAlways"; @NonNls String ACTION_CHOOSE_LOOKUP_ITEM_REPLACE = "EditorChooseLookupItemReplace"; diff --git a/platform/platform-resources-en/src/messages/CodeInsightBundle.properties b/platform/platform-resources-en/src/messages/CodeInsightBundle.properties index ec22e436d9b4..9fa986238706 100644 --- a/platform/platform-resources-en/src/messages/CodeInsightBundle.properties +++ b/platform/platform-resources-en/src/messages/CodeInsightBundle.properties @@ -468,7 +468,7 @@ i18nize.empty.file.path=Please specify properties file path choose.type.popup.title=Choose Type cast.expression=Cast expression cast.to.0=Cast to ''{0}'' -class.completion.file.path=Press {0} to search for all matching project files +class.completion.file.path=Press {0} again to search for all matching project files class.completion.file.path.all.variants=Press {0} to search for matching files of any type property.has.more.parameters.than.passed=Property ''{0}'' expected {1} {1, choice, 1#parameter|2#parameters}, passed {2} create.file.family=Create File diff --git a/plugins/groovy/src/org/jetbrains/plugins/groovy/lang/completion/GroovyCompletionContributor.java b/plugins/groovy/src/org/jetbrains/plugins/groovy/lang/completion/GroovyCompletionContributor.java index 4b64105b1a2f..72753a189542 100644 --- a/plugins/groovy/src/org/jetbrains/plugins/groovy/lang/completion/GroovyCompletionContributor.java +++ b/plugins/groovy/src/org/jetbrains/plugins/groovy/lang/completion/GroovyCompletionContributor.java @@ -239,9 +239,9 @@ public class GroovyCompletionContributor extends CompletionContributor { if (CompletionService.getCompletionService().getAdvertisementText() == null && parameters.getInvocationCount() > 0 && CompletionUtil.shouldShowFeature(parameters, JavaCompletionFeatures.GLOBAL_MEMBER_NAME)) { - final String shortcut = getActionShortcut(IdeActions.ACTION_CLASS_NAME_COMPLETION); + final String shortcut = getActionShortcut(IdeActions.ACTION_CODE_COMPLETION); if (shortcut != null) { - CompletionService.getCompletionService().setAdvertisementText("Pressing " + shortcut + " without a class qualifier would show all accessible static methods"); + CompletionService.getCompletionService().setAdvertisementText("Pressing " + shortcut + " twice without a class qualifier would show all accessible static methods"); } } diff --git a/resources-en/src/messages/CompletionBundle.properties b/resources-en/src/messages/CompletionBundle.properties index dd0b8d250c30..dfa4ba885371 100644 --- a/resources-en/src/messages/CompletionBundle.properties +++ b/resources-en/src/messages/CompletionBundle.properties @@ -6,5 +6,5 @@ completion.smart.hint=Press {0} to show only variants that are suitable by type completion.smart.chain.hint=Press {0} once more to search across chained method calls completion.smart.toar.hint=Press {0} once more to find collections of {1} completion.smart.aslist.hint=Press {0} once more to find arrays of {1} -completion.class.name.hint=Press {0} to view all accessible classes +completion.class.name.hint=Press {0} again to view all accessible classes completion.class.name.hint.2=Press {0} once more to ignore module dependencies while searching \ No newline at end of file diff --git a/xml/impl/src/com/intellij/codeInsight/completion/XmlCompletionContributor.java b/xml/impl/src/com/intellij/codeInsight/completion/XmlCompletionContributor.java index c4c36ad21e3a..3979367ea435 100644 --- a/xml/impl/src/com/intellij/codeInsight/completion/XmlCompletionContributor.java +++ b/xml/impl/src/com/intellij/codeInsight/completion/XmlCompletionContributor.java @@ -193,7 +193,7 @@ public class XmlCompletionContributor extends CompletionContributor { public String advertise(@NotNull final CompletionParameters parameters) { if (isXmlNameCompletion(parameters) && parameters.getCompletionType() == CompletionType.BASIC) { if (FeatureUsageTracker.getInstance().isToBeAdvertisedInLookup(TAG_NAME_COMPLETION_FEATURE, parameters.getPosition().getProject())) { - final String shortcut = getActionShortcut(IdeActions.ACTION_CLASS_NAME_COMPLETION); + final String shortcut = getActionShortcut(IdeActions.ACTION_CODE_COMPLETION); if (shortcut != null) { return XmlBundle.message("tag.name.completion.hint", shortcut); }