void (@NotNull PsiScopeProcessor processor) { if (processor instanceof JavaCompletionProcessor) { Map<CustomizableReferenceProvider.CustomizationKey, Object> options = getOptions(); if (options != null && (JavaClassReferenceProvider.SUPER_CLASSES.getValue(options) != null || JavaClassReferenceProvider.NOT_INTERFACE.getBooleanValue(options) || JavaClassReferenceProvider.CONCRETE.getBooleanValue(options)) || JavaClassReferenceProvider.CLASS_KIND.getValue(options) != null) { ((JavaCompletionProcessor)processor).setCompletionElements(getVariants()); return; } } PsiScopeProcessor processorToUse = processor; if (myInStaticImport) { // allows to complete members processor.handleEvent(JavaScopeProcessorEvent.CHANGE_LEVEL, null); } else { if (isDefinitelyStatic()) { processor.handleEvent(JavaScopeProcessorEvent.START_STATIC, null); } processorToUse = new PsiScopeProcessor() { @Override public boolean execute(@NotNull PsiElement element, @NotNull ResolveState state) { return !(element instanceof PsiClass || element instanceof PsiPackage) || processor.execute(element, state); } @Override public <V> V getHint(@NotNull Key<V> hintKey) { return processor.getHint(hintKey); } @Override public void handleEvent(@NotNull Event event, Object associated) { processor.handleEvent(event, associated); } }; } super.processVariants(processorToUse); }