Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
73,200
List<PsiClass> (PsiTypeElement typeElement) { PsiElement typeParent = typeElement.getParent(); if (typeParent instanceof PsiReferenceParameterList) { int index = Arrays.asList(((PsiReferenceParameterList)typeParent).getTypeParameterElements()).indexOf(typeElement); PsiElement listParent = typeParent.getParent(); if (in...
getTypeBounds
73,201
boolean (PsiElement position) { return IN_CATCH_TYPE.accepts(position) || IN_MULTI_CATCH_TYPE.accepts(position) || INSIDE_METHOD_THROWS_CLAUSE.accepts(position) || JavaDocCompletionContributor.THROWS_TAG_EXCEPTION.accepts(position); }
isExceptionPosition
73,202
MyResult (boolean condition) { return condition ? MyResult.suitableClass : MyResult.classNameOrGlobalStatic; }
preferClassIf
73,203
boolean (@NotNull ExpectedTypeInfo info) { PsiClass expectedClass = PsiUtil.resolveClassInType(info.getType()); return expectedClass != null && expectedClass.isEnum(); }
isEnumClass
73,204
MyResult (@NotNull LookupElement item) { final Object object = item.getObject(); if (object instanceof PsiKeyword) { ThreeState result = isProbableKeyword(((PsiKeyword)object).getText()); if (result == ThreeState.YES) return MyResult.probableKeyword; if (result == ThreeState.NO) return MyResult.improbableKeyword; } if ...
weigh
73,205
boolean (PsiElement itemObject) { if (isComparisonRhs(myPosition) && myPosition.getParent().getParent() instanceof PsiPolyadicExpression) { PsiExpression[] operands = ((PsiPolyadicExpression)myPosition.getParent().getParent()).getOperands(); if (operands[0] instanceof PsiReferenceExpression && ((PsiReferenceExpression)...
isComparisonWithItself
73,206
boolean (@NotNull LookupElement item) { TypedLookupItem typed = item.as(TypedLookupItem.CLASS_CONDITION_KEY); PsiType itemType = typed == null ? null : typed.getType(); return itemType != null && Arrays.stream(myExpectedTypes) .map(ExpectedTypeInfo::getType) .anyMatch(type -> !isTooGeneric(type) && type.isAssignableFro...
isExpectedTypeItem
73,207
boolean (PsiType type) { PsiType erasure = TypeConversionUtil.erasure(type); return erasure == null || erasure.equalsToText(CommonClassNames.JAVA_LANG_OBJECT); }
isTooGeneric
73,208
ThreeState (String keyword) { PsiStatement parentStatement = PsiTreeUtil.getParentOfType(myPosition, PsiStatement.class); if (PsiKeyword.RETURN.equals(keyword)) { if (isLastStatement(parentStatement) && !isOnTopLevelInVoidMethod(parentStatement) && !(parentStatement.getParent() instanceof PsiLoopStatement)) { return Th...
isProbableKeyword
73,209
boolean (PsiElement position) { return psiElement().afterLeaf(psiElement().withElementType(elementType().oneOf(JavaTokenType.EQEQ, JavaTokenType.NE))).accepts(position); }
isComparisonRhs
73,210
boolean (@Nullable PsiStatement parentStatement) { return parentStatement != null && parentStatement.getTextRange().getStartOffset() == myPosition.getTextRange().getStartOffset() && JBIterable.generate(parentStatement, PsiElement::getNextSibling) .takeWhile(e -> !e.textContains('\n')) .skip(1) .filter(PsiStatement.clas...
isBeforeVariableOnSameLine
73,211
boolean (Object object) { if (!(object instanceof PsiMethod)) return false; PsiField field = PropertyUtil.getFieldOfGetter((PsiMethod)object); return field != null && PsiResolveHelper.getInstance(myPosition.getProject()).isAccessible(field, myPosition, null); }
isAccessibleFieldGetter
73,212
boolean (PsiElement position) { return psiElement().inside(PsiReferenceParameterList.class).accepts(position); }
isInMethodTypeArg
73,213
boolean (@NotNull PsiStatement statement) { if (!(statement.getParent() instanceof PsiCodeBlock)) return false; PsiElement parent = statement.getParent().getParent(); if (parent instanceof PsiMethod) { return ((PsiMethod)parent).isConstructor() || PsiTypes.voidType().equals(((PsiMethod)parent).getReturnType()); } if (p...
isOnTopLevelInVoidMethod
73,214
boolean (Object object) { if (!(object instanceof PsiMethod method)) return false; if (!PropertyUtilBase.hasGetterName(method)) return false; if (method.hasTypeParameters()) return false; return !KnownElementWeigher.isGetClass(method); }
isGetter
73,215
boolean (PsiStatement statement) { if (statement == null) { return false; } if (!(statement.getParent() instanceof PsiCodeBlock codeBlock)) { return true; } PsiStatement[] siblings = codeBlock.getStatements(); PsiStatement lastOne = siblings[siblings.length - 1]; if (statement == lastOne) { return true; } int posEnd = ...
isLastStatement
73,216
void (@NotNull CompletionInitializationContext context) { JavaClassReference reference = findJavaClassReference(context.getFile(), context.getStartOffset()); if (reference != null && !reference.getSuperClasses().isEmpty()) { JavaClassReferenceSet set = reference.getJavaClassReferenceSet(); context.setReplacementOffset(...
duringCompletion
73,217
void (@NotNull CompletionParameters parameters, @NotNull CompletionResultSet result) { PsiElement position = parameters.getPosition(); JavaClassReference reference = findJavaClassReference(position.getContainingFile(), parameters.getOffset()); if (reference == null) { return; } List<String> extendClassNames = reference...
fillCompletionVariants
73,218
JavaClassReference (final PsiFile file, final int offset) { PsiReference reference = file.findReferenceAt(offset); if (reference instanceof PsiMultiReference) { for (final PsiReference psiReference : ((PsiMultiReference)reference).getReferences()) { if (psiReference instanceof JavaClassReference) { return (JavaClassRef...
findJavaClassReference
73,219
void (final InsertionContext context, final JavaPsiClassReferenceElement item) { final Editor editor = context.getEditor(); final PsiClass psiClass = item.getObject(); if (!psiClass.isValid()) return; int endOffset = editor.getCaretModel().getOffset(); final String qname = psiClass.getQualifiedName(); if (qname == null...
_handleInsert
73,220
void (@NotNull final InsertionContext context, @NotNull final JavaPsiClassReferenceElement item) { _handleInsert(context, item); item.getTailType().processTail(context.getEditor(), context.getEditor().getCaretModel().getOffset()); }
handleInsert
73,221
void (@NotNull final CompletionParameters parameters, @NotNull final PrefixMatcher prefixMatcher, final boolean filterByScope, @NotNull final Consumer<? super PsiClass> consumer) { final PsiElement context = parameters.getPosition(); final Project project = context.getProject(); final GlobalSearchScope scope = filterBy...
processJavaClasses
73,222
void (@NotNull final PrefixMatcher prefixMatcher, @NotNull Project project, @NotNull GlobalSearchScope scope, @NotNull Processor<? super PsiClass> processor) { final Set<String> names = new HashSet<>(10000); AllClassesSearchExecutor.processClassNames(project, scope, s -> { if (prefixMatcher.prefixMatches(s)) { names.ad...
processJavaClasses
73,223
boolean (@NotNull final PsiElement context, @NotNull final PsiClass psiClass, final boolean filterByScope, final boolean pkgContext) { ProgressManager.checkCanceled(); if (JavaCompletionUtil.isInExcludedPackage(psiClass, false)) return false; final String qualifiedName = psiClass.getQualifiedName(); if (qualifiedName =...
isAcceptableInContext
73,224
JavaPsiClassReferenceElement (@NotNull final PsiClass psiClass, final InsertHandler<JavaPsiClassReferenceElement> insertHandler) { final JavaPsiClassReferenceElement item = new JavaPsiClassReferenceElement(psiClass); item.setInsertHandler(insertHandler); return item; }
createLookupItem
73,225
boolean (@NotNull PsiFile psiFile, @NotNull PsiElement element) { if (!HighlightingFeature.PATTERN_GUARDS_AND_RECORD_PATTERNS.isAvailable(psiFile)) return false; if (!(element instanceof PsiIdentifier)) return false; PsiElement parent = element.getParent(); if (!(parent instanceof PsiJavaCodeReferenceElement)) return f...
isPatternContext
73,226
void (@NotNull Consumer<? super LookupElement> lookupElements, @NotNull PsiElement context, @NotNull PsiClass psiClass) { if (!psiClass.isRecord() || psiClass.getRecordComponents().length == 0 || psiClass.getName() == null) return; // TODO: support deconstruction with type parameters if (psiClass.getTypeParameters().le...
addPatterns
73,227
record (@NotNull PsiClass record, @NotNull List<String> names) { static PatternModel create(@NotNull PsiClass record, @NotNull PsiElement context) { JavaCodeStyleManager manager = JavaCodeStyleManager.getInstance(record.getProject()); List<String> names = ContainerUtil.map(record.getRecordComponents(), cmp -> manager.s...
PatternModel
73,228
PatternModel (@NotNull PsiClass record, @NotNull PsiElement context) { JavaCodeStyleManager manager = JavaCodeStyleManager.getInstance(record.getProject()); List<String> names = ContainerUtil.map(record.getRecordComponents(), cmp -> manager.suggestUniqueVariableName(cmp.getName(), context, true)); return new PatternMod...
create
73,229
String () { return EntryStream.zip(Arrays.asList(record.getRecordComponents()), names) .mapKeyValue((cmp, name) -> cmp.getType().getPresentableText() + " " + name) .joining(", ", record.getName() + "(", ")"); }
toString
73,230
void (@NotNull LookupElementPresentation presentation) { super.renderElement(presentation); presentation.setIcon(myModel.record().getIcon(0)); presentation.setTailText(" " + PsiFormatUtil.getPackageDisplayName(myModel.record()), true); }
renderElement
73,231
void (@NotNull InsertionContext context) { int startOffset = context.getStartOffset(); int endOffset = context.getEditor().getCaretModel().getOffset(); Document document = context.getDocument(); String canonicalText = myModel.getCanonicalText(); document.replaceString(startOffset, endOffset, canonicalText); PsiDocument...
handleInsert
73,232
PsiMember () { return myMember; }
getMember
73,233
PsiClass () { return myContainingClass; }
getContainingClass
73,234
void (boolean shouldImportStatic) { myShouldImport = shouldImportStatic; }
setShouldBeImported
73,235
boolean () { return myShouldImport; }
willBeImported
73,236
void (LookupElementPresentation presentation, boolean showClass, boolean showPackage, PsiSubstitutor substitutor) { final String className = myContainingClass == null ? "???" : myContainingClass.getName(); final String memberName = myMember.getName(); boolean constructor = myMember instanceof PsiMethod && ((PsiMethod)m...
renderElement
73,237
PsiType (PsiMember member, PsiSubstitutor substitutor) { if (member instanceof PsiField field) { return substitutor.substitute(field.getType()); } if (member instanceof PsiMethod method) { if (method.isConstructor()) { PsiClass aClass = Objects.requireNonNull(method.getContainingClass()); return JavaPsiFacade.getElemen...
getDeclaredType
73,238
PsiType (@NotNull PsiMethod method, @Nullable PsiType type) { if (PsiTypesUtil.isGetClass(method) && type instanceof PsiClassType) { PsiType arg = ContainerUtil.getFirstItem(Arrays.asList(((PsiClassType)type).getParameters())); PsiType bound = arg instanceof PsiWildcardType ? TypeConversionUtil.erasure(((PsiWildcardTyp...
patchGetClass
73,239
String (@NotNull PsiMethod method, @NotNull PsiSubstitutor substitutor) { return PsiFormatUtil.formatMethod(method, substitutor, PsiFormatUtilBase.SHOW_PARAMETERS, PsiFormatUtilBase.SHOW_NAME | PsiFormatUtilBase.SHOW_TYPE); }
getMethodParameterString
73,240
void (@NotNull CompletionParameters parameters, @NotNull CompletionResultSet result) { if (parameters.getCompletionType() != CompletionType.BASIC && parameters.getCompletionType() != CompletionType.SMART) { return; } if (parameters.getInvocationCount() == 0 && TemplateManagerImpl.getTemplateState(parameters.getEditor()...
fillCompletionVariants
73,241
void (Set<LookupElement> set, PrefixMatcher matcher, @NotNull PsiVariable var, boolean includeOverlapped) { FeatureUsageTracker.getInstance().triggerFeatureUsed("editing.completion.variable.name"); Project project = var.getProject(); JavaCodeStyleManager codeStyleManager = JavaCodeStyleManager.getInstance(project); Var...
completeLocalVariableName
73,242
List<String> (@NotNull PsiDocComment docComment) { List<String> result = new ArrayList<>(); for (PsiDocTag tag : docComment.getTags()) { if ("param".equals(tag.getName())) { PsiDocTagValue value = tag.getValueElement(); if (value instanceof PsiDocParamRef && !((PsiDocParamRef)value).isTypeParamRef()) { ASTNode token = ...
getUnresolvedMethodParamNamesFromJavadoc
73,243
boolean (String className) { return className != null && !StringUtil.isCapitalized(className); }
seemsMistypedKeyword
73,244
boolean (PrefixMatcher matcher, @NotNull Set<String> set) { for (String s : set) { if (matcher.isStartMatch(s)) { return true; } } return false; }
hasStartMatches
73,245
boolean (@NotNull Set<? extends LookupElement> set, PrefixMatcher matcher) { for (LookupElement lookupElement : set) { if (matcher.isStartMatch(lookupElement)) { return true; } } return false; }
hasStartMatches
73,246
void (Set<LookupElement> set, PrefixMatcher matcher, PsiVariable var, Project project, JavaCodeStyleManager codeStyleManager) { PsiClass psiClass = PsiTreeUtil.getParentOfType(var, PsiClass.class); if (psiClass == null) { return; } for (PsiField field : psiClass.getFields()) { String name = field.getName(); if (field.g...
addSuggestionsInspiredByFieldNames
73,247
int (@NotNull String propertyName, @NotNull String prefix) { int overlap = 0; int propertyNameLen = propertyName.length(); int prefixLen = prefix.length(); for (int j = 1; j < prefixLen && j < propertyNameLen; j++) { if (prefix.substring(prefixLen - j).equals(propertyName.substring(0, j))) { overlap = j; } } return ove...
getOverlap
73,248
String[] (PsiElement parentOfType, boolean referenceOnMethod, PrefixMatcher matcher) { if (parentOfType != null && parentOfType.getTextLength() > MAX_SCOPE_SIZE_TO_SEARCH_UNRESOLVED) return ArrayUtilRt.EMPTY_STRING_ARRAY; Set<String> unresolvedRefs = new LinkedHashSet<>(); if (parentOfType != null) { parentOfType.accep...
getUnresolvedReferences
73,249
void (Set<LookupElement> set, @NotNull PsiRecordComponent var, PrefixMatcher matcher) { FeatureUsageTracker.getInstance().triggerFeatureUsed("editing.completion.variable.name"); Project project = var.getProject(); JavaCodeStyleManager codeStyleManager = JavaCodeStyleManager.getInstance(project); SuggestedNameInfo sugge...
completeComponentName
73,250
void (Set<LookupElement> set, @NotNull PsiField var, @NotNull PrefixMatcher matcher, boolean includeOverlapped) { FeatureUsageTracker.getInstance().triggerFeatureUsed("editing.completion.variable.name"); Project project = var.getProject(); JavaCodeStyleManager codeStyleManager = JavaCodeStyleManager.getInstance(project...
completeFieldName
73,251
void (Project project, Set<LookupElement> set, PrefixMatcher matcher, PsiType varType, VariableKind varKind, boolean includeOverlapped, boolean methodPrefix) { JavaCodeStyleManager codeStyleManager = JavaCodeStyleManager.getInstance(project); SuggestedNameInfo suggestedNameInfo = codeStyleManager.suggestVariableName(va...
completeVariableNameForRefactoring
73,252
void (Set<LookupElement> set, PsiElement element, PrefixMatcher matcher) { if (element instanceof PsiMethod method && method.isConstructor()) { PsiClass containingClass = method.getContainingClass(); if (containingClass != null) { String name = containingClass.getName(); if (StringUtil.isNotEmpty(name)) { addLookupItem...
completeMethodName
73,253
String[] (PsiClass psiClass, boolean staticContext, PsiType varType, PsiElement element) { List<String> propertyHandlers = new ArrayList<>(); for (PsiField field : psiClass.getFields()) { if (field == element) continue; if (StringUtil.isEmpty(field.getName())) continue; PsiUtilCore.ensureValid(field); PsiType fieldType...
getPropertiesHandlersNames
73,254
void (Set<LookupElement> lookupElements, @Nullable SuggestedNameInfo callback, PrefixMatcher matcher, Project project, String... strings) { outer: for (int i = 0; i < strings.length; i++) { String name = strings[i]; if (!matcher.prefixMatches(name) || !PsiNameHelper.getInstance(project).isIdentifier(name, LanguageLevel...
addLookupItems
73,255
LookupElementDecorator<LookupElement> (SuggestedNameInfo callback, LookupElement element) { return LookupElementDecorator.withInsertHandler(element, (context, item) -> { TailType tailType = LookupItem.getDefaultTailType(context.getCompletionChar()); if (tailType != null) { context.setAddCompletionChar(false); tailType....
withInsertHandler
73,256
String () { return myForcedPresentableName; }
getForcedPresentableName
73,257
PsiType () { PsiClass psiClass = getObject(); return JavaPsiFacade.getElementFactory(psiClass.getProject()).createType(psiClass, getSubstitutor()); }
getType
73,258
PsiSubstitutor () { return mySubstitutor; }
getSubstitutor
73,259
JavaPsiClassReferenceElement (PsiSubstitutor substitutor) { mySubstitutor = substitutor; return this; }
setSubstitutor
73,260
String () { if (myForcedPresentableName != null) { return myForcedPresentableName; } return super.getLookupString(); }
getLookupString
73,261
Set<String> () { if (myForcedPresentableName != null) { return Collections.singleton(myForcedPresentableName); } return super.getAllLookupStrings(); }
getAllLookupStrings
73,262
void (String forcedPresentableName) { myForcedPresentableName = forcedPresentableName; }
setForcedPresentableName
73,263
PsiClass () { return myClass; }
getObject
73,264
boolean () { return myClass.isValid(); }
isValid
73,265
boolean (final Object o) { if (this == o) return true; if (!(o instanceof JavaPsiClassReferenceElement that)) return false; if (myQualifiedName != null) { return myQualifiedName.equals(that.myQualifiedName); } return Comparing.equal(myClass, that.myClass); }
equals
73,266
String () { return myQualifiedName; }
getQualifiedName
73,267
int () { final String s = myQualifiedName; return s == null ? 239 : s.hashCode(); }
hashCode
73,268
void (@NotNull LookupElementPresentation presentation) { renderClassItem(presentation, this, getObject(), false, " " + myPackageDisplayName, mySubstitutor); }
renderElement
73,269
void (LookupElementPresentation presentation, LookupElement item, PsiClass psiClass, boolean diamond, @NotNull String locationString, @NotNull PsiSubstitutor substitutor) { if (!(psiClass instanceof PsiTypeParameter)) { presentation.setIcon(DefaultLookupItemRenderer.getRawIcon(item)); } boolean strikeout = JavaElementL...
renderClassItem
73,270
String () { return " " + myPackageDisplayName; }
getLocationString
73,271
String (final PsiClass psiClass, final LookupElement item, boolean diamond, @NotNull PsiSubstitutor substitutor) { String forced = item instanceof JavaPsiClassReferenceElement ? ((JavaPsiClassReferenceElement)item).getForcedPresentableName() : item instanceof PsiTypeLookupItem ? ((PsiTypeLookupItem)item).getForcedPrese...
getName
73,272
String (@NotNull final PsiSubstitutor substitutor, final PsiTypeParameter[] params) { final boolean space = showSpaceAfterComma(params[0]); StringBuilder buffer = new StringBuilder(); buffer.append("<"); for(int i = 0; i < params.length; i++){ final PsiTypeParameter param = params[i]; final PsiType type = substitutor.s...
formatTypeParameters
73,273
boolean (PsiClass element) { return CodeStyle.getLanguageSettings(element.getContainingFile(), JavaLanguage.INSTANCE).SPACE_AFTER_COMMA; }
showSpaceAfterComma
73,274
boolean (@NotNull PsiElement position, @Nullable PsiClass cls) { if (cls == null || cls.hasModifierProperty(PsiModifier.ABSTRACT)) return false; PsiMethod[] constructors = cls.getConstructors(); if (constructors.length > 0) { return !ContainerUtil.exists(constructors, ctor -> JavaResolveUtil.isAccessible(ctor, cls, cto...
isInaccessibleConstructorSuggestion
73,275
int (Editor editor, int tailOffset, int startOffset) { Project project = editor.getProject(); if (project != null) { PsiFile psiFile = PsiDocumentManager.getInstance(project).getPsiFile(editor.getDocument()); if (psiFile != null) { editor.getCaretModel().moveToOffset(tailOffset); CodeStyleManager.getInstance(project).r...
reformatBrace
73,276
int (final Editor editor, int tailOffset) { CommonCodeStyleSettings styleSettings = CodeStyle.getLocalLanguageSettings(editor, tailOffset); if (isSpaceBeforeParentheses(styleSettings, editor, tailOffset)) { tailOffset = insertChar(editor, tailOffset, ' '); } Document document = editor.getDocument(); if (tailOffset < do...
processTail
73,277
TextRange (PsiFile file, final Document document, int startOffset) { PsiElement element = file.findElementAt(startOffset); element = PsiTreeUtil.getParentOfType(element, PsiStatement.class, false); if (element != null) { final PsiElement parent = element.getParent(); if (parent instanceof PsiLoopStatement) { element = ...
getRangeToCheckParensBalance
73,278
int (final Editor editor, int tailOffset) { return addRParenth(editor, tailOffset, isSpaceWithinParentheses(CodeStyle.getLocalLanguageSettings(editor, tailOffset), editor, tailOffset)); }
processTail
73,279
int (Editor editor, int offset, boolean spaceWithinParens) { int existingRParenthOffset = getExistingRParenthOffset(editor, offset); if (existingRParenthOffset < 0){ if (spaceWithinParens){ offset = insertChar(editor, offset, ' '); } editor.getDocument().insertString(offset, ")"); return moveCaret(editor, offset, 1); }...
addRParenth
73,280
String () { return "RParenth"; }
toString
73,281
int (final Editor editor, final int tailOffset) { final Document document = editor.getDocument(); if (tailOffset >= document.getTextLength()) return -1; final CharSequence charsSequence = document.getCharsSequence(); EditorHighlighter highlighter = editor.getHighlighter(); int existingRParenthOffset = -1; for(Highlight...
getExistingRParenthOffset
73,282
int (Document document, EditorHighlighter highlighter, int rangeStart, int rangeEnd) { LOG.assertTrue(0 <= rangeStart); LOG.assertTrue(rangeStart <= rangeEnd); LOG.assertTrue(rangeEnd <= document.getTextLength()); HighlighterIterator iterator = highlighter.createIterator(rangeStart); int balance = 0; while(!iterator.at...
calcParensBalance
73,283
boolean (@NotNull PsiElement position) { return SuppressManager.getInstance().isSuppressedFor(position, AccessStaticViaInstanceBase.ACCESS_STATIC_VIA_INSTANCE) || Registry.is("ide.java.completion.suggest.static.after.instance"); }
allowStaticAfterInstanceQualifier
73,284
boolean (@NotNull PsiClass clazz) { String name = clazz.getName(); return name != null && name.startsWith("$"); }
seemsInternal
73,285
void (@NotNull Event event, Object associated) { if (JavaScopeProcessorEvent.isEnteringStaticScope(event, associated)) { myStatic = true; } if(event == JavaScopeProcessorEvent.CHANGE_LEVEL){ myMembersFlag = true; myFinishedScopesMethodNames.addAll(myCurrentScopeMethodNames); myCurrentScopeMethodNames.clear(); } if (eve...
handleEvent
73,286
boolean (@NotNull PsiElement element, @NotNull ResolveState state) { if (element instanceof PsiPackage && !isQualifiedContext()) { if (myScope instanceof PsiClass) { return true; } if (((PsiPackage)element).getQualifiedName().contains(".") && PsiTreeUtil.getParentOfType(myElement, PsiImportStatementBase.class) != null)...
execute
73,287
void (@NotNull ResolveState state, @NotNull PsiClass psiClass) { final Collection<PsiClass> sealedInheritors = SealedUtils.findSameFileInheritorsClasses(psiClass); for (PsiClass inheritor : sealedInheritors) { final CompletionElement completion = new CompletionElement(inheritor, state.get(PsiSubstitutor.KEY)); final Co...
addSealedHierarchy
73,288
PsiType (PsiElement completion) { PsiElement parent = myElement.getParent(); if (completion instanceof PsiMethod && parent instanceof PsiMethodReferenceExpression) { PsiType matchingType = ContainerUtil.find(myExpectedGroundTypes.getValue(), candidate -> candidate != null && hasSuitableType((PsiMethodReferenceExpressio...
getMethodReferenceType
73,289
boolean (PsiMethodReferenceExpression refPlace, PsiMethod method, @NotNull PsiType expectedType) { PsiMethodReferenceExpression referenceExpression = createMethodReferenceExpression(method, refPlace); return LambdaUtil.performWithTargetType(referenceExpression, expectedType, () -> { JavaResolveResult result = reference...
hasSuitableType
73,290
PsiMethodReferenceExpression (PsiMethod method, PsiMethodReferenceExpression place) { PsiElementFactory factory = JavaPsiFacade.getElementFactory(method.getProject()); PsiMethodReferenceExpression copy = (PsiMethodReferenceExpression)place.copy(); PsiElement referenceNameElement = copy.getReferenceNameElement(); LOG.as...
createMethodReferenceExpression
73,291
String (@NotNull PsiElement element) { if (element instanceof PsiMethod method && myFinishedScopesMethodNames.contains(method.getName())) { String className = myDeclarationHolder instanceof PsiClass psiClass ? psiClass.getName() : null; if (className != null) { return className + (method.hasModifierProperty(PsiModifier...
getCallQualifierText
73,292
boolean () { final PsiElement elementParent = myElement.getParent(); return elementParent instanceof PsiQualifiedReference && ((PsiQualifiedReference)elementParent).getQualifier() != null; }
isQualifiedContext
73,293
StaticProblem (@NotNull PsiElement element) { if (myOptions.showInstanceInStaticContext && !isQualifiedContext()) { return StaticProblem.none; } if (element instanceof PsiModifierListOwner modifierListOwner) { if (myStatic) { if (!(element instanceof PsiClass) && !modifierListOwner.hasModifierProperty(PsiModifier.STATI...
getStaticProblem
73,294
boolean (@NotNull PsiElement element, @NotNull ResolveState state) { String name = PsiUtilCore.getName(element); if (element instanceof PsiMethod && ((PsiMethod)element).isConstructor() && myElement.getParent() instanceof PsiMethodReferenceExpression) { name = PsiKeyword.NEW; } return StringUtil.isNotEmpty(name) && myM...
satisfies
73,295
void (@Nullable PsiType qualifierType) { myQualifierType = qualifierType; }
setQualifierType
73,296
PsiType () { return myQualifierType; }
getQualifierType
73,297
boolean (@Nullable final PsiElement element) { // if checkAccess is false, we only show inaccessible source elements because their access modifiers can be changed later by the user. // compiled element can't be changed, so we don't pollute the completion with them. In Javadoc, everything is allowed. if (!myOptions.chec...
isAccessible
73,298
boolean (@Nullable PsiElement element) { if (element instanceof PsiMember member) { Set<PsiClass> accessObjectClasses = !myQualified ? Collections.singleton(null) : myQualifierType instanceof PsiIntersectionType ? ContainerUtil.map2Set(((PsiIntersectionType)myQualifierType).getConjuncts(), PsiUtil::resolveClassInClassT...
isAccessibleForResolve
73,299
PsiResolveHelper () { return JavaPsiFacade.getInstance(myElement.getProject()).getResolveHelper(); }
getResolveHelper