Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
72,900
String[] (@NotNull PsiElement position) { final PsiModifierList list = findModifierList(position); if (list == null && !shouldSuggestModifiers(position)) { return ArrayUtilRt.EMPTY_STRING_ARRAY; } PsiElement scope = position.getParent(); while (scope != null) { if (scope instanceof PsiJavaFile) { return addMemberModifi...
getKeywords
72,901
String[] (PsiModifierList list, @NotNull PsiElement scope) { if (HighlightingFeature.SEALED_CLASSES.isAvailable(scope)) { if (list == null) { return CLASS_MODIFIERS_WITH_SEALED.clone(); } else { final List<String> ret = new ArrayList<>(); addIfNotPresent(PsiModifier.PUBLIC, list, ret); if (!list.hasModifierProperty(Psi...
addClassModifiers
72,902
void (String modifier, PsiModifierList list, List<String> ret) { if (!list.hasModifierProperty(modifier)) { ret.add(modifier); } }
addIfNotPresent
72,903
String[] (PsiModifierList list, final boolean inInterface, @NotNull PsiElement position) { return addKeywords(list, inInterface ? getInterfaceMemberModifiers(position) : getClassMemberModifiers(position)); }
addMemberModifiers
72,904
String[][] (@NotNull PsiElement list) { if (HighlightingFeature.SEALED_CLASSES.isAvailable(list)) { return INTERFACE_MEMBER_MODIFIERS_WITH_SEALED; } if (PsiUtil.isLanguageLevel9OrHigher(list)) { return INTERFACE_9_MEMBER_MODIFIERS; } if (PsiUtil.isLanguageLevel8OrHigher(list)) { return INTERFACE_8_MEMBER_MODIFIERS; } r...
getInterfaceMemberModifiers
72,905
String[][] (@NotNull PsiElement list) { if (HighlightingFeature.SEALED_CLASSES.isAvailable(list)) { return CLASS_MEMBER_MODIFIERS_WITH_SEALED; } return CLASS_MEMBER_MODIFIERS; }
getClassMemberModifiers
72,906
String[] (PsiModifierList list, String[][] keywordSets) { final List<String> ret = new ArrayList<>(); for (int i = 0; i < keywordSets.length; i++) { final String[] keywords = keywordSets[keywordSets.length - i - 1]; boolean containModifierFlag = false; if (list != null) { for (@PsiModifier.ModifierConstant String keywo...
addKeywords
72,907
PsiModifierList (@NotNull PsiElement element) { if(element.getParent() instanceof PsiModifierList) { return (PsiModifierList)element.getParent(); } return PsiTreeUtil.getParentOfType(FilterPositionUtil.searchNonSpaceNonCommentBack(element), PsiModifierList.class); }
findModifierList
72,908
boolean (PsiElement element) { PsiElement parent = element.getParent(); while (parent instanceof PsiJavaCodeReferenceElement || parent instanceof PsiErrorElement || parent instanceof PsiTypeElement || parent instanceof PsiMethod || parent instanceof PsiVariable || parent instanceof PsiDeclarationStatement || parent ins...
shouldSuggestModifiers
72,909
boolean (LookupElement element, CompletionLocation location) { PsiElement e = element.getPsiElement(); return e != null && JavaDeprecationUtils.isDeprecated(e, location.getCompletionParameters().getPosition()); }
skipElement
72,910
AutoCompletionDecision (@NotNull AutoCompletionContext context) { final CompletionParameters parameters = context.getParameters(); if (parameters.getCompletionType() != CompletionType.SMART && parameters.getCompletionType() != CompletionType.BASIC) { return null; } if (ParameterInfoControllerBase.areParameterTemplatesE...
handleAutoCompletionPossibility
72,911
void (LookupElement element) { JavaMethodCallElement methodCallElement = element.as(JavaMethodCallElement.CLASS_CONDITION_KEY); if (methodCallElement != null) methodCallElement.putUserData(MERGED_ELEMENT, Boolean.TRUE); }
markAsMerged
72,912
String (LookupElement item) { return StreamEx.of(item.getAllLookupStrings()).sorted().joining("#"); }
joinLookupStrings
72,913
LookupElement (LookupElement[] items) { LookupElement best = items[0]; for (int i = 1; i < items.length; i++) { LookupElement item = items[i]; if (getPriority(best) < getPriority(item)) { best = item; } } return best; }
findBestOverload
72,914
int (LookupElement element) { PsiMethod method = Objects.requireNonNull(getItemMethod(element)); return (PsiTypes.voidType().equals(method.getReturnType()) ? 0 : 1) + (method.getParameterList().isEmpty() ? 0 : 2); }
getPriority
72,915
PsiMethod (LookupElement item) { Object o = item.getPsiElement(); return o instanceof PsiMethod ? (PsiMethod)o : null; }
getItemMethod
72,916
void (LookupElement item) { item.putUserData(JavaCompletionUtil.FORCE_SHOW_SIGNATURE_ATTR, true); }
disallowMerge
72,917
boolean (final Lookup lookup) { PsiElement psiElement = lookup.getPsiElement(); return psiElement != null && psiElement.getParent() instanceof PsiLiteralExpression; }
isWithinLiteral
72,918
Result (char c, final int prefixLength, final Lookup lookup) { PsiFile file = lookup.getPsiFile(); if (file == null) return null; boolean isJava = file.getLanguage().isKindOf(JavaLanguage.INSTANCE); boolean isJsp = file.getFileType() == StdFileTypes.JSP; if (!isJava && !isJsp) { return null; } LookupElement item = look...
acceptChar
72,919
StatisticsInfo (@NotNull final PsiElement element, @NotNull final ProximityLocation location) { return element instanceof PsiMember ? JavaStatisticsManager.createInfo(null, (PsiMember)element) : null; }
serialize
72,920
Set<PsiType> (@NotNull CompletionParameters parameters) { PsiExpression expr = PsiTreeUtil.getContextOfType(parameters.getPosition(), PsiExpression.class, true); if (expr != null) { Set<PsiType> set = new HashSet<>(); for (ExpectedTypeInfo expectedInfo : JavaSmartCompletionContributor.getExpectedTypes(parameters)) { se...
getExpectedTypes
72,921
PsiType (@NotNull LookupElement item) { return item.getUserData(QUALIFIER_TYPE_ATTR); }
getQualifierType
72,922
void (Project project, Set<LookupElement> set, String prefix, PsiType varType, VariableKind varKind) { CamelHumpMatcher camelHumpMatcher = new CamelHumpMatcher(prefix); JavaMemberNameCompletionContributor.completeVariableNameForRefactoring(project, set, camelHumpMatcher, varType, varKind, true, false); }
completeVariableNameForRefactoring
72,923
void (@NotNull LookupElement item, @NotNull List<? extends PsiMethod> methods) { item.putUserData(ALL_METHODS_ATTRIBUTE, ContainerUtil.map(methods, method -> SmartPointerManager.getInstance(method.getProject()).createSmartPsiElementPointer(method))); }
putAllMethods
72,924
List<PsiMethod> (@NotNull LookupElement item) { List<SmartPsiElementPointer<PsiMethod>> pointers = item.getUserData(ALL_METHODS_ATTRIBUTE); if (pointers == null) return null; return ContainerUtil.mapNotNull(pointers, SmartPsiElementPointer::getElement); }
getAllMethods
72,925
boolean (@NotNull PsiMember member, boolean allowInstanceInnerClasses) { String name = PsiUtil.getMemberQualifiedName(member); if (name == null) return false; if (!member.hasModifierProperty(PsiModifier.STATIC)) { if (member instanceof PsiMethod || member instanceof PsiField) { return false; } if (allowInstanceInnerCla...
isInExcludedPackage
72,926
PsiType (@NotNull PsiClassType classType) { if (!myVisited.add(classType)) return classType; PsiClassType.ClassResolveResult classResolveResult = classType.resolveGenerics(); PsiClass psiClass = classResolveResult.getElement(); PsiSubstitutor substitutor = classResolveResult.getSubstitutor(); if (psiClass == null) retu...
visitClassType
72,927
PsiSubstitutor (@NotNull PsiSubstitutor substitutor) { PsiSubstitutor originalSubstitutor = PsiSubstitutor.EMPTY; for (Map.Entry<PsiTypeParameter, PsiType> entry : substitutor.getSubstitutionMap().entrySet()) { PsiType value = entry.getValue(); originalSubstitutor = originalSubstitutor.put(CompletionUtil.getOriginalOrS...
originalizeSubstitutor
72,928
PsiType (@NotNull PsiType type) { return type; }
visitType
72,929
PsiType (@NotNull LookupElement element) { TypedLookupItem typed = element.as(TypedLookupItem.CLASS_CONDITION_KEY); return typed != null ? typed.getType() : null; }
getLookupElementType
72,930
PsiType (@Nullable PsiType qualifierType, @NotNull PsiMember member) { Ref<PsiSubstitutor> subst = Ref.create(PsiSubstitutor.EMPTY); class MyProcessor implements PsiScopeProcessor, NameHint, ElementClassHint { @Override public boolean execute(@NotNull PsiElement element, @NotNull ResolveState state) { if (element == me...
getQualifiedMemberReferenceType
72,931
boolean (@NotNull PsiElement element, @NotNull ResolveState state) { if (element == member) { subst.set(state.get(PsiSubstitutor.KEY)); } return true; }
execute
72,932
String (@NotNull ResolveState state) { return member.getName(); }
getName
72,933
boolean (@NotNull DeclarationKind kind) { return member instanceof PsiEnumConstant ? kind == DeclarationKind.ENUM_CONST : member instanceof PsiField ? kind == DeclarationKind.FIELD : kind == DeclarationKind.METHOD; }
shouldProcess
72,934
Set<LookupElement> (@NotNull PsiElement element, @NotNull PsiJavaCodeReferenceElement javaReference, @NotNull ElementFilter elementFilter, @NotNull JavaCompletionProcessor.Options options, @NotNull Condition<? super String> nameCondition, @NotNull CompletionParameters parameters) { PsiElement elementParent = element.ge...
processJavaReference
72,935
Set<LookupElement> (@NotNull PsiElement element, @NotNull PsiJavaCodeReferenceElement javaReference, @NotNull ElementFilter elementFilter, @NotNull JavaCompletionProcessor.Options options, @NotNull Condition<? super String> nameCondition, @NotNull CompletionParameters parameters) { Set<LookupElement> set = new LinkedHa...
processJavaQualifiedReference
72,936
PsiReferenceExpression (@NotNull String text, @NotNull PsiElement context) { return (PsiReferenceExpression) JavaPsiFacade.getElementFactory(context.getProject()).createExpressionFromText(text, context); }
createReference
72,937
List<PsiType> (PsiJavaReference javaReference, @NotNull CompletionParameters parameters) { if (javaReference instanceof PsiReferenceExpression refExpr) { PsiExpression qualifier = refExpr.getQualifierExpression(); if (qualifier != null) { Project project = qualifier.getProject(); PairFunction<PsiExpression, CompletionP...
getQualifierCastTypes
72,938
boolean (@NotNull LookupElement item, @NotNull PsiTypeLookupItem castTypeItem, @Nullable PsiType plainQualifier, @NotNull JavaCompletionProcessor processor, @NotNull Set<? extends PsiType> expectedTypes) { PsiType castType = castTypeItem.getType(); if (plainQualifier != null) { Object o = item.getObject(); if (o instan...
shouldCast
72,939
LookupElement (@NotNull LookupElement item, @NotNull PsiTypeLookupItem castTypeItem) { return new LookupElementDecorator<>(item) { @Override public void handleInsert(@NotNull InsertionContext context) { Document document = context.getEditor().getDocument(); context.commitDocument(); PsiFile file = context.getFile(); Ps...
castQualifier
72,940
void (@NotNull InsertionContext context) { Document document = context.getEditor().getDocument(); context.commitDocument(); PsiFile file = context.getFile(); PsiJavaCodeReferenceElement ref = PsiTreeUtil.findElementOfClassAtOffset(file, context.getStartOffset(), PsiJavaCodeReferenceElement.class, false); if (ref != nul...
handleInsert
72,941
void (@NotNull LookupElementPresentation presentation) { super.renderElement(presentation); presentation.appendTailText(" on " + castTypeItem.getType().getPresentableText(), true); }
renderElement
72,942
PsiTypeLookupItem (@NotNull LookupElement item, @NotNull List<PsiTypeLookupItem> castTypeItems, @Nullable PsiType plainQualifier, JavaCompletionProcessor processor, Set<? extends PsiType> expectedTypes) { return ContainerUtil.find(castTypeItems, c -> shouldCast(item, c, plainQualifier, processor, expectedTypes)); }
findQualifierCast
72,943
PsiType (@Nullable PsiType type) { return type instanceof PsiClassType ? ((PsiClassType)type).rawType() : type; }
toRaw
72,944
void (LookupElementDecorator<LookupElement> element, LookupElementPresentation presentation) { element.getDelegate().renderElement(presentation); presentation.setItemTextForeground(JBColor.RED); }
renderElement
72,945
void (LookupElementDecorator<LookupElement> element, LookupElementPresentation presentation) { element.getDelegate().renderElement(presentation); presentation.setItemTextBold(true); }
renderElement
72,946
boolean (@NotNull Object object) { if (!(object instanceof PsiMember)) return false; if (LanguageLevelUtil.getLastIncompatibleLanguageLevel((PsiMember)object, myLanguageLevel) != null) { return true; } if (object instanceof PsiEnumConstant) { return myConstantsUsedInSwitch.contains(CompletionUtil.getOriginalOrSelf((Psi...
shouldMarkRed
72,947
JavaLookupElementHighlighter (@NotNull PsiElement place) { return new JavaLookupElementHighlighter(place); }
getHighlighterForPlace
72,948
LookupElement (@Nullable PsiType qualifierType, @NotNull LookupElement item, @NotNull Object object, @NotNull PsiElement place) { return getHighlighterForPlace(place).highlightIfNeeded(qualifierType, item, object); }
highlightIfNeeded
72,949
boolean (@Nullable PsiType qualifierType, @NotNull Object object, boolean checkBases) { if (!(object instanceof PsiMember)) return false; if (qualifierType instanceof PsiArrayType) { //length and clone() PsiFile file = ((PsiMember)object).getContainingFile(); //yes, they're a bit dummy return file == null || file.getVi...
containsMember
72,950
boolean (@NotNull PsiType type, @NotNull PsiElement place) { if (type instanceof PsiArrayType) return true; PsiClass psiClass = PsiUtil.resolveClassInType(type); if (psiClass == null || psiClass.isEnum() || psiClass.isAnnotationType()) return false; PsiMethod[] methods = psiClass.getConstructors(); return methods.lengt...
hasAccessibleConstructor
72,951
boolean (@NotNull PsiMethod constructor, @NotNull PsiElement place) { if (!(constructor instanceof PsiCompiledElement)) return true; // it's possible to use a quick fix to make accessible after completion if (constructor.hasModifierProperty(PsiModifier.PRIVATE)) return false; if (constructor.hasModifierProperty(PsiModi...
isConstructorCompletable
72,952
LinkedHashSet<String> (@NotNull PsiMember member) { LinkedHashSet<String> allLookupStrings = new LinkedHashSet<>(); String name = member.getName(); allLookupStrings.add(name); PsiClass containingClass = member.getContainingClass(); while (containingClass != null) { String className = containingClass.getName(); if (clas...
getAllLookupStrings
72,953
boolean (@Nullable PsiElement element) { return element instanceof PsiExpression && SideEffectChecker.mayHaveSideEffects((PsiExpression)element); }
mayHaveSideEffects
72,954
void (@NotNull PsiClass psiClass, @NotNull PsiFile file, int offset) { insertClassReference(psiClass, file, offset, offset); }
insertClassReference
72,955
int (PsiClass psiClass, PsiFile file, int startOffset, int endOffset) { Project project = file.getProject(); PsiDocumentManager documentManager = PsiDocumentManager.getInstance(project); documentManager.commitAllDocuments(); PsiManager manager = file.getManager(); Document document = FileDocumentManager.getInstance().g...
insertClassReference
72,956
PsiElement (PsiReference psiReference) { if (psiReference instanceof PsiPolyVariantReference) { ResolveResult[] results = ((PsiPolyVariantReference)psiReference).multiResolve(true); if (results.length == 1) return results[0].getElement(); } return psiReference.resolve(); }
resolveReference
72,957
RangeMarker (int endOffset, Document document, String temporary) { CharSequence chars = document.getCharsSequence(); if (endOffset < chars.length() && Character.isJavaIdentifierPart(chars.charAt(endOffset))){ document.insertString(endOffset, temporary); RangeMarker toDelete = document.createRangeMarker(endOffset, endOf...
insertTemporary
72,958
void (@NotNull InsertionContext context, @NotNull LookupElement item, boolean overloadsMatter, boolean hasParams) { insertParentheses(context, item, overloadsMatter, ThreeState.fromBoolean(hasParams), false); }
insertParentheses
72,959
void (@NotNull InsertionContext context, @NotNull LookupElement item, boolean overloadsMatter, ThreeState hasParams, // UNSURE if providing no arguments is a valid situation boolean forceClosingParenthesis) { Editor editor = context.getEditor(); char completionChar = context.getCompletionChar(); PsiFile file = context....
insertParentheses
72,960
boolean (InsertionContext context1, LookupElement item1) { return hasParameters != ThreeState.NO; }
placeCaretInsideParentheses
72,961
PsiElement (@NotNull InsertionContext context) { PsiElement token = super.findExistingLeftParenthesis(context); return isPartOfLambda(token) ? null : token; }
findExistingLeftParenthesis
72,962
boolean (PsiElement token) { return token != null && token.getParent() instanceof PsiExpressionList && PsiUtilCore.getElementType(PsiTreeUtil.nextVisibleLeaf(token.getParent())) == JavaTokenType.ARROW; }
isPartOfLambda
72,963
boolean (InsertionContext context, LookupElement item, TailType tailType, boolean hasTail) { TailType toInsert = tailType; LookupItem<?> lookupItem = item.as(LookupItem.CLASS_CONDITION_KEY); if (toInsert == EqTailType.INSTANCE) { toInsert = TailTypes.unknownType(); } if (lookupItem == null || lookupItem.getAttribute(Lo...
insertTail
72,964
boolean (@NotNull PsiElement context) { PsiFile contextFile = context.getContainingFile(); return contextFile instanceof PsiClassOwner && StringUtil.isNotEmpty(((PsiClassOwner)contextFile).getPackageName()); }
inSomePackage
72,965
boolean (@NotNull PsiElement context, @NotNull PsiClass psiClass, boolean pkgContext) { return isSourceLevelAccessible(context, psiClass, pkgContext, psiClass.getContainingClass()); }
isSourceLevelAccessible
72,966
boolean (PsiElement context, @NotNull PsiClass psiClass, boolean pkgContext, @Nullable PsiClass qualifierClass) { if (!JavaPsiFacade.getInstance(psiClass.getProject()).getResolveHelper().isAccessible(psiClass, context, qualifierClass)) { return false; } if (pkgContext) { PsiClass topLevel = PsiUtil.getTopLevelClass(psi...
isSourceLevelAccessible
72,967
boolean (InsertionContext context, int offset) { if (offset < 0) { return false; } OffsetKey key = context.trackOffset(offset, false); PostprocessReformattingAspect.getInstance(context.getProject()).doPostponedFormatting(); offset = context.getOffset(key); if (offset < 0) { return false; } String open = escapeXmlIfNeed...
promptTypeArgs
72,968
int (@NotNull InsertionContext context, int offset) { int result = offset + 2; PsiCall call = PsiTreeUtil.findElementOfClassAtOffset(context.getFile(), offset, PsiCall.class, false); if (call == null || call.getArgumentList() == null) return result; int argumentListEnd = call.getArgumentList().getTextRange().getEndOffs...
getTabOutOffset
72,969
boolean (@NotNull PsiCall call) { if (!(call instanceof PsiNewExpression newExpression)) { return false; } PsiImmediateClassType targetType = ObjectUtils.tryCast(newExpression.getType(), PsiImmediateClassType.class); if (targetType == null) return false; return targetType.resolve() instanceof PsiAnonymousClass; }
isAnonymous
72,970
FakePsiElement (@NotNull PsiElement place, @NotNull PsiType varType) { return new FakePsiElement() { @Override public boolean processDeclarations(@NotNull PsiScopeProcessor processor, @NotNull ResolveState state, PsiElement lastParent, @NotNull PsiElement place) { return processor.execute(new LightVariableBuilder<>("xx...
createContextWithXxxVariable
72,971
boolean (@NotNull PsiScopeProcessor processor, @NotNull ResolveState state, PsiElement lastParent, @NotNull PsiElement place) { return processor.execute(new LightVariableBuilder<>("xxx", varType, place), ResolveState.initial()); }
processDeclarations
72,972
PsiElement () { return place; }
getParent
72,973
String (InsertionContext context, @NotNull String generics) { if (context.getFile().getViewProvider().getBaseLanguage() instanceof JspxLanguage) { return StringUtil.escapeXmlEntities(generics); } return generics; }
escapeXmlIfNeeded
72,974
boolean (PsiDocCommentOwner member) { if (DumbService.isDumb(member.getProject())) return false; if (member.isDeprecated()) { return true; } PsiClass aClass = member.getContainingClass(); while (aClass != null) { if (aClass.isDeprecated()) { return true; } aClass = aClass.getContainingClass(); } return false; }
isEffectivelyDeprecated
72,975
int (@NotNull InsertionContext context) { int start = context.getTailOffset() - 1; while (start >= 0) { char ch = context.getDocument().getCharsSequence().charAt(start); if (!Character.isJavaIdentifierPart(ch) && ch != '.') break; start--; } return start + 1; }
findQualifiedNameStart
72,976
void (@NotNull CompletionParameters parameters, @NotNull final CompletionResultSet result) { PsiElement position = parameters.getPosition(); PsiFile file = position.getContainingFile(); if (parameters.getCompletionType() != CompletionType.BASIC || !JavaCompletionContributor.mayStartClassName(result)) { return; } final ...
fillCompletionVariants
72,977
void (final @NotNull LookupElement element, @NotNull Lookup lookup, @NotNull Consumer<? super @NotNull LookupElementAction> consumer) { final StaticallyImportable item = element.as(StaticallyImportable.CLASS_CONDITION_KEY); if (item == null || !item.canBeImported()) { return; } final Icon checkIcon = PlatformIcons.CHEC...
fillActions
72,978
Result () { item.setShouldBeImported(!item.willBeImported()); return new Result.ChooseItem(element); }
performLookupAction
72,979
void (CompletionParameters parameters, CompletionResultSet result) { if (parameters.getCompletionType() != CompletionType.BASIC && parameters.getCompletionType() != CompletionType.SMART) { return; } PsiElement position = parameters.getPosition(); if (DumbService.getInstance(position.getProject()).isDumb()) { return; } ...
fillCompletionVariants
72,980
boolean (PsiElement position) { if (psiElement(PsiIdentifier.class) .withParents(PsiJavaCodeReferenceElement.class, PsiAnnotation.class, PsiModifierList.class).accepts(position)) { PsiElement parent = Objects.requireNonNull(PsiTreeUtil.getParentOfType(position, PsiModifierList.class)).getParent(); if (parent instanceof...
isTypingAnnotationForNewMember
72,981
boolean (PsiAnnotation anno) { CharSequence fileText = anno.getContainingFile().getViewProvider().getContents(); int afterAnno = CharArrayUtil.shiftForward(fileText, anno.getTextRange().getEndOffset(), " \t"); return fileText.length() > afterAnno && fileText.charAt(afterAnno) == '\n'; }
isFollowedByEol
72,982
LookupElement () { LookupElementBuilder element = LookupElementBuilder.create(JavaBundle.message("completion.override.implement.methods")).withLookupString("Override") .withInsertHandler((context, item) -> { PsiAnnotation annotation = PsiTreeUtil.getParentOfType(context.getFile().findElementAt(context.getStartOffset())...
itemWithOverrideImplementDialog
72,983
void (CompletionResultSet result, PsiElement position, @Nullable PsiModifierList modifierList) { PsiClass parent = CompletionUtil.getOriginalElement(Objects.requireNonNull(PsiTreeUtil.getParentOfType(position, PsiClass.class))); if (parent != null) { Set<MethodSignature> addedSignatures = new HashSet<>(); addGetterSett...
suggestGeneratedMethods
72,984
void (CompletionResultSet result, PsiClass parent, Set<? super MethodSignature> addedSignatures) { int count = 0; for (PsiField field : parent.getFields()) { if (isConstant(field)) continue; List<PsiMethod> prototypes = new SmartList<>(); try { Collections.addAll(prototypes, GetterSetterPrototypeProvider.generateGetter...
addGetterSetterElements
72,985
void (@NotNull InsertionContext context, @NotNull LookupElement item) { removeLookupString(context); insertGenerationInfos(context, Collections.singletonList(new PsiGenerationInfo<>(prototype))); }
handleInsert
72,986
boolean (PsiField field) { return field.hasModifierProperty(PsiModifier.FINAL) && field.hasModifierProperty(PsiModifier.PUBLIC) && field.hasModifierProperty(PsiModifier.STATIC); }
isConstant
72,987
void (InsertionContext context) { context.getDocument().deleteString(context.getStartOffset(), context.getTailOffset()); context.commitDocument(); }
removeLookupString
72,988
void (PsiClass parent, boolean implemented, CompletionResultSet result, Set<? super MethodSignature> addedSignatures, boolean generateDefaultMethods) { for (CandidateInfo candidate : OverrideImplementExploreUtil.getMethodsToOverrideImplement(parent, implemented)) { PsiMethod baseMethod = (PsiMethod)candidate.getElement...
addSuperSignatureElements
72,989
LookupElement (boolean implemented, PsiMethod baseMethod, PsiClass baseClass, PsiSubstitutor substitutor, boolean generateDefaultMethods, PsiClass targetClass, @Nullable Consumer<? super InsertionContext> wizardRunner) { RowIcon icon = IconManager .getInstance() .createRowIcon(baseMethod.getIcon(0), implemented ? AllIc...
createOverridingLookupElement
72,990
void (@NotNull InsertionContext context, @NotNull LookupElement item) { removeLookupString(context); context.setAddCompletionChar(false); context.setLaterRunnable(() -> wizardRunner.accept(context)); }
handleInsert
72,991
void (@NotNull InsertionContext context, @NotNull LookupElement item) { removeLookupString(context); final PsiClass parent = PsiTreeUtil.findElementOfClassAtOffset(context.getFile(), context.getStartOffset(), PsiClass.class, false); if (parent == null) return; try (AccessToken ignored = generateDefaultMethods ? forceDe...
handleInsert
72,992
AccessToken () { CommandProcessor instance = CommandProcessor.getInstance(); String commandName = instance.getCurrentCommandName(); instance.setCurrentCommandName(JavaBundle.message("generate.members.implement.command")); return new AccessToken() { @Override public void finish() { instance.setCurrentCommandName(command...
forceDefaultMethodsInside
72,993
void () { instance.setCurrentCommandName(commandName); }
finish
72,994
void (InsertionContext context, List<PsiGenerationInfo<PsiMethod>> infos) { List<PsiGenerationInfo<PsiMethod>> newInfos = GenerateMembersUtil .insertMembersAtOffset(context.getFile(), context.getStartOffset(), infos); if (!newInfos.isEmpty()) { final List<PsiElement> elements = new ArrayList<>(); for (GenerationInfo me...
insertGenerationInfos
72,995
LookupElement (PsiMethod prototype, PsiSubstitutor substitutor, Icon icon, String typeText, InsertHandler<LookupElement> insertHandler, boolean generateByWizard, boolean generateDefaultMethod, PsiClass targetClass) { String methodName = prototype.getName(); String visibility = VisibilityUtil.getVisibilityModifier(proto...
createGenerateMethodElement
72,996
String (PsiSubstitutor substitutor, PsiParameter p) { return PsiNameHelper.getShortClassName(substitutor.substitute(p.getType()).getPresentableText(false)); }
getShortParameterName
72,997
boolean (@NotNull LookupElement element) { if (!super.prefixMatches(element)) return false; if (!myPrefix.contains(" ")) return true; String signature = element.getLookupString(); FList<TextRange> fragments = matchingFragments(signature); return fragments == null || !ContainerUtil.exists(fragments, f -> isMiddleMatch(s...
prefixMatches
72,998
boolean (String signature, TextRange fragment) { int start = fragment.getStartOffset(); return start > 0 && Character.isJavaIdentifierPart(signature.charAt(start)) && Character.isJavaIdentifierPart(signature.charAt(start - 1)); }
isMiddleMatch
72,999
Set<LookupElement> (@NotNull PsiElement element, @NotNull PsiJavaReference javaReference, @NotNull ElementFilter elementFilter, @NotNull JavaCompletionProcessor.Options options, @NotNull Condition<? super String> nameCondition) { Set<LookupElement> set = new LinkedHashSet<>(); for (final String className : getContainin...
suggestQualifyingSuperCalls