mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
no references to class name completion from productivity tips (IDEA-86517)
This commit is contained in:
+3
-4
@@ -105,11 +105,10 @@ public class ConstructorInsertHandler implements InsertHandler<LookupElementDeco
|
||||
return;
|
||||
}
|
||||
|
||||
if (mySmart) {
|
||||
FeatureUsageTracker.getInstance().triggerFeatureUsed(JavaCompletionFeatures.AFTER_NEW);
|
||||
}
|
||||
if (isAbstract) {
|
||||
if (mySmart) {
|
||||
FeatureUsageTracker.getInstance().triggerFeatureUsed(JavaCompletionFeatures.AFTER_NEW_ANONYMOUS);
|
||||
}
|
||||
|
||||
PostprocessReformattingAspect.getInstance(context.getProject()).doPostponedFormatting(context.getFile().getViewProvider());
|
||||
|
||||
final Editor editor = context.getEditor();
|
||||
|
||||
-5
@@ -53,11 +53,6 @@ public class JavaClassNameCompletionContributor extends CompletionContributor {
|
||||
@Override
|
||||
public void fillCompletionVariants(CompletionParameters parameters, final CompletionResultSet _result) {
|
||||
if (parameters.isExtendedCompletion()) {
|
||||
if (shouldShowSecondSmartCompletionHint(parameters) &&
|
||||
CompletionUtil.shouldShowFeature(parameters, CodeCompletionFeatures.SECOND_CLASS_NAME_COMPLETION)) {
|
||||
CompletionService.getCompletionService().setAdvertisementText(CompletionBundle.message("completion.class.name.hint.2", getActionShortcut(IdeActions.ACTION_CODE_COMPLETION)));
|
||||
}
|
||||
|
||||
CompletionResultSet result = _result.withPrefixMatcher(CompletionUtil.findReferenceOrAlphanumericPrefix(parameters));
|
||||
addAllClasses(parameters, parameters.getInvocationCount() <= 1,
|
||||
JavaCompletionSorting.addJavaSorting(parameters, result).getPrefixMatcher(), new Consumer<LookupElement>() {
|
||||
|
||||
@@ -488,15 +488,6 @@ 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_CODE_COMPLETION);
|
||||
if (shortcut != null) {
|
||||
return CompletionBundle.message("completion.class.name.hint", shortcut);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (parameters.getCompletionType() == CompletionType.SMART && parameters.getInvocationCount() == 1) {
|
||||
final PsiType[] psiTypes = ExpectedTypesGetter.getExpectedTypes(parameters.getPosition(), true);
|
||||
if (psiTypes.length > 0) {
|
||||
|
||||
@@ -27,5 +27,4 @@ public interface JavaCompletionFeatures {
|
||||
@NonNls String SECOND_SMART_COMPLETION_ARRAY_MEMBER = "editing.completion.second.smarttype.array.member";
|
||||
@NonNls String GLOBAL_MEMBER_NAME = "editing.completion.global.member.name";
|
||||
@NonNls String AFTER_NEW = "editing.completion.smarttype.afternew";
|
||||
@NonNls String AFTER_NEW_ANONYMOUS = "editing.completion.smarttype.afternew";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user