Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
71,300
boolean (PsiElement resolved, PsiElement context) { if (!(resolved instanceof PsiMember)) { return true; } if (!PsiResolveHelper.getInstance(resolved.getProject()).isAccessible((PsiMember)resolved, context, null)) { return false; } VirtualFile file = PsiUtilCore.getVirtualFile(resolved); return file == null || context....
isAccessible
71,301
String () { return JavaBundle.message("quickfix.family.change.javadoc.to"); }
getFamilyName
71,302
void (@NotNull Project project, @NotNull PsiElement element, @NotNull ModPsiUpdater updater) { String first = myUnboundParams.iterator().next(); updater.templateBuilder().field(element, new ConstantNode(first).withLookupStrings(myUnboundParams)); }
applyFix
71,303
String () { return QuickFixBundle.message("add.qualifier"); }
getFamilyName
71,304
ModCommand (@NotNull Project project, @NotNull ProblemDescriptor descriptor) { PsiJavaCodeReferenceElement ref = PsiTreeUtil.getParentOfType(descriptor.getPsiElement(), PsiJavaCodeReferenceElement.class); if (ref == null) return ModCommand.nop(); List<ModCommandAction> actions = StreamEx.of(originalClasses).map(SmartPs...
perform
71,305
String () { return ""; }
getFamilyName
71,306
void (@NotNull ActionContext context, @NotNull PsiJavaCodeReferenceElement ref, @NotNull ModPsiUpdater updater) { PsiClass element = myClass.getElement(); if (element != null) { ref.bindToElement(element); } }
invoke
71,307
String () { return JavaBundle.message("quickfix.text.remove.javadoc.0.1", myTagName, myParamName); }
getName
71,308
String () { return JavaBundle.message("quickfix.family.remove.javadoc.tag"); }
getFamilyName
71,309
void (@NotNull Project project, @NotNull PsiElement element, @NotNull ModPsiUpdater updater) { PsiDocTag myTag = PsiTreeUtil.getParentOfType(element, PsiDocTag.class); if (myTag != null) { myTag.delete(); } }
applyFix
71,310
PsiElementVisitor (@NotNull ProblemsHolder holder, boolean isOnTheFly) { return new JavaElementVisitor() { @Override public void visitMethod(PsiMethod method) { PsiDocComment comment = method.getDocComment(); if (comment == null) { return; } List<ReturnItem> items = extractValues(comment); String commentText = comment....
buildVisitor
71,311
void (PsiMethod method) { PsiDocComment comment = method.getDocComment(); if (comment == null) { return; } List<ReturnItem> items = extractValues(comment); String commentText = comment.getText(); for (ReturnItem item : items) { String valueText = item.range.substring(commentText); String incompatibleMessage = getIncomp...
visitMethod
71,312
List<ReturnItem> (PsiDocComment comment) { List<ReturnItem> ranges = new ArrayList<>(); for (PsiElement child : comment.getChildren()) { if (child instanceof PsiDocTag && ((PsiDocTag)child).getName().equals("return")) { processLine(RETURN_LINE_START, child, Kind.LIKELY_VALUE, ranges); processLine(RETURN_LINE_MIDDLE, ch...
extractValues
71,313
void (Pattern pattern, PsiElement child, Kind kind, List<ReturnItem> ranges) { String text = child.getText(); Matcher matcher = pattern.matcher(text); while (matcher.find()) { int start = matcher.start(1); int end = matcher.end(1); ranges.add(new ReturnItem(kind, TextRange.create(start, end).shiftRight(child.getStartOf...
processLine
71,314
void (@NotNull Project project, @NotNull PsiElement element, @NotNull ModPsiUpdater updater) { PsiDocComment docComment = PsiTreeUtil.getParentOfType(element, PsiDocComment.class); if (docComment != null) { PsiDocTag tag = JavaPsiFacade.getElementFactory(project).createDocTagFromText("@" + myTag + " " + myValue); PsiEl...
applyFix
71,315
PsiElement (PsiElement element) { return null; }
getAnchor
71,316
String () { return JavaBundle.message("inspection.javadoc.problem.add.tag", myTag, myValue); }
getName
71,317
String () { return JavaBundle.message("inspection.javadoc.problem.add.tag.family"); }
getFamilyName
71,318
String () { return JavaBundle.message("inspection.javadoc.problem.add.param.tag.family"); }
getFamilyName
71,319
PsiElement (PsiElement element) { PsiElement parent = element == null ? null : element.getParent(); if (!(parent instanceof PsiDocComment docComment)) return null; final PsiJavaDocumentedElement owner = docComment.getOwner(); if (!(owner instanceof PsiMethod)) return null; PsiParameter[] parameters = ((PsiMethod)owner)...
getAnchor
71,320
boolean (PsiParameter param, PsiDocTag tag) { PsiDocTagValue valueElement = tag.getValueElement(); String name = param.getName(); return valueElement != null && valueElement.getText().trim().startsWith(name); }
matches
71,321
String () { return JavaBundle.message("inspection.javadoc.problem.add.param.tag", myName); }
getName
71,322
void (@NotNull Project project, @NotNull ProblemDescriptor descriptor) { myInspection.registerAdditionalTag(myTag); ProjectInspectionProfileManager.getInstance(project).fireProfileChanged(); }
applyFix
71,323
String () { return QuickFixBundle.message("add.docTag.to.custom.tags", myTag); }
getName
71,324
IntentionPreviewInfo (@NotNull Project project, @NotNull ProblemDescriptor previewDescriptor) { return new IntentionPreviewInfo.Html(QuickFixBundle.message("add.docTag.to.custom.tags.preview")); }
generatePreview
71,325
boolean () { return false; }
startInWriteAction
71,326
String () { //noinspection DialogTitleCapitalization return QuickFixBundle.message("fix.javadoc.family"); }
getFamilyName
71,327
String () { return JavaBundle.message("quickfix.text.remove.javadoc.0", myTagName); }
getName
71,328
String () { return JavaBundle.message("quickfix.family.remove.javadoc.tag"); }
getFamilyName
71,329
void (@NotNull Project project, @NotNull PsiElement element, @NotNull ModPsiUpdater updater) { PsiDocTag tag = PsiTreeUtil.getParentOfType(element, PsiDocTag.class); if (tag != null) { tag.delete(); } }
applyFix
71,330
void (@NotNull Project project, @NotNull PsiElement element, @NotNull ModPsiUpdater updater) { final PsiElement enclosingTag = element.getParent(); if (enclosingTag == null) return; final PsiElement javadoc = enclosingTag.getParent(); if (javadoc == null) return; final PsiDocComment donorJavadoc = createDonorJavadoc(el...
applyFix
71,331
String () { return CommonQuickFixBundle.message("fix.replace.x.with.y", myName, "{@code " + myName + "}"); }
getFamilyName
71,332
PsiDocComment (@NotNull PsiElement element) { final PsiElementFactory instance = PsiElementFactory.getInstance(element.getProject()); return instance.createDocCommentFromText(String.format("/** {@code %s} */", element.getText())); }
createDonorJavadoc
71,333
String () { return CommonQuickFixBundle.message("fix.replace.x.with.y", myName, "&#064;" + myName.substring(1)); }
getFamilyName
71,334
PsiDocComment (@NotNull PsiElement element) { final PsiElementFactory instance = PsiElementFactory.getInstance(element.getProject()); return instance.createDocCommentFromText("/** &#064;" + element.getText().substring(1) + " */"); }
createDonorJavadoc
71,335
OptPane () { return pane( checkbox("IGNORE_DEPRECATED_ELEMENTS", JavaBundle.message("inspection.javadoc.option.ignore.deprecated")), checkbox("IGNORE_ACCESSORS", JavaBundle.message("inspection.javadoc.option.ignore.simple")), checkboxPanel( PACKAGE_SETTINGS.getComponent(JavaBundle.message("inspection.javadoc.option.tab...
getOptionsPane
71,336
boolean (String tag) { return REQUIRED_TAGS.contains(tag); }
isTagRequired
71,337
void (String tag, boolean value) { if (value) { if (!isTagRequired(tag)) REQUIRED_TAGS += tag; } else { REQUIRED_TAGS = REQUIRED_TAGS.replaceAll(tag, ""); } }
setTagRequired
71,338
OptionController () { return OptionController.fieldsOf(this) .onPrefix("REQUIRED_TAGS", OptionController.of(tag -> isTagRequired(tag), (tag, value) -> setTagRequired(tag, (boolean)value))); }
getOptionController
71,339
OptCheckbox (@NotNull @NlsContexts.Label String label, @NotNull List<@NlsSafe String> visibility, @NotNull List<@NlsSafe String> tags) { List<OptRegularComponent> controls = new ArrayList<>(); if (!visibility.isEmpty()) { controls.add(dropdown("MINIMAL_VISIBILITY", JavaBundle.message("inspection.missingJavadoc.label.mi...
getComponent
71,340
PsiElementVisitor (@NotNull ProblemsHolder holder, boolean isOnTheFly) { return new JavaElementVisitor() { @Override public void visitJavaFile(@NotNull PsiJavaFile file) { if (PsiPackage.PACKAGE_INFO_FILE.equals(file.getName())) { checkFile(file, holder, isOnTheFly); } } @Override public void visitModule(@NotNull PsiJa...
buildVisitor
71,341
void (@NotNull PsiJavaFile file) { if (PsiPackage.PACKAGE_INFO_FILE.equals(file.getName())) { checkFile(file, holder, isOnTheFly); } }
visitJavaFile
71,342
void (@NotNull PsiJavaModule module) { checkModule(module, holder, isOnTheFly); }
visitModule
71,343
void (@NotNull PsiClass aClass) { checkClass(aClass, holder, isOnTheFly); }
visitClass
71,344
void (@NotNull PsiField field) { checkField(field, holder, isOnTheFly); }
visitField
71,345
void (@NotNull PsiMethod method) { checkMethod(method, holder, isOnTheFly); }
visitMethod
71,346
void (PsiJavaFile file, ProblemsHolder delegate, boolean isOnTheFly) { PsiPackage pkg = JavaDirectoryService.getInstance().getPackage(file.getContainingDirectory()); if (pkg == null) return; PsiDocComment docComment = PsiTreeUtil.getChildOfType(file, PsiDocComment.class); if (IGNORE_DEPRECATED_ELEMENTS && isDeprecated(...
checkFile
71,347
void (PsiJavaModule module, ProblemsHolder delegate, boolean isOnTheFly) { PsiDocComment docComment = module.getDocComment(); if (IGNORE_DEPRECATED_ELEMENTS && isDeprecated(module, docComment)) { return; } if (!isJavadocRequired(MODULE_SETTINGS, module)) return; if (docComment != null) { checkRequiredTags(docComment.ge...
checkModule
71,348
void (PsiClass aClass, ProblemsHolder delegate, boolean isOnTheFly) { if (aClass instanceof PsiAnonymousClass || aClass instanceof PsiSyntheticClass || aClass instanceof PsiTypeParameter) { return; } if (IGNORE_DEPRECATED_ELEMENTS && aClass.isDeprecated()) { return; } Options options = ClassUtil.isTopLevelClass(aClass)...
checkClass
71,349
void (PsiField field, ProblemsHolder delegate, boolean isOnTheFly) { if (IGNORE_DEPRECATED_ELEMENTS && isDeprecated(field)) { return; } if (!isJavadocRequired(FIELD_SETTINGS, field)) return; PsiDocComment docComment = field.getDocComment(); if (docComment != null) { checkRequiredTags(docComment.getTags(), FIELD_SETTING...
checkField
71,350
void (PsiMethod method, ProblemsHolder delegate, boolean isOnTheFly) { if (method instanceof SyntheticElement) { return; } if (IGNORE_DEPRECATED_ELEMENTS && isDeprecated(method)) { return; } if (IGNORE_ACCESSORS && PropertyUtilBase.isSimplePropertyAccessor(method)) { return; } if (!isJavadocRequired(METHOD_SETTINGS, me...
checkMethod
71,351
boolean (PsiDocCommentOwner element) { return element.isDeprecated() || element.getContainingClass() != null && element.getContainingClass().isDeprecated(); }
isDeprecated
71,352
boolean (PsiDocComment docComment, PsiMethod psiMethod) { for (PsiElement descriptionElement : docComment.getDescriptionElements()) { if (descriptionElement instanceof PsiInlineDocTag && "inheritDoc".equals(((PsiInlineDocTag)descriptionElement).getName())) { return true; } } if (docComment.findTagByName("inheritDoc") !...
isInherited
71,353
boolean (PsiMethod method) { return EP_NAME.getExtensionList().stream().noneMatch(condition -> condition.value(method)); }
isJavadocRequired
71,354
boolean (@NotNull Options options, @NotNull PsiModifierListOwner element) { if (!options.ENABLED) return false; if (element instanceof PsiPackage) { return true; } if (element instanceof PsiJavaModule) { return true; } int actualAccess = getAccessNumber(RefJavaUtil.getInstance().getAccessModifier(element)); if (element...
isJavadocRequired
71,355
int (String accessModifier) { if (accessModifier.startsWith(PUBLIC)) return 1; if (accessModifier.startsWith(PROTECTED)) return 2; if (accessModifier.startsWith(PACKAGE_LOCAL)) return 3; if (accessModifier.startsWith(PRIVATE)) return 4; return 5; }
getAccessNumber
71,356
boolean (PsiModifierListOwner element, PsiDocComment docComment) { return PsiImplUtil.isDeprecatedByAnnotation(element) || docComment != null && docComment.findTagByName("deprecated") != null; }
isDeprecated
71,357
void (PsiDocTag @NotNull [] tags, @NotNull PsiMethod psiMethod, @NotNull PsiElement toHighlight, @NotNull ProblemsHolder holder) { if (!psiMethod.isConstructor() && !PsiTypes.voidType().equals(psiMethod.getReturnType())) { boolean hasReturnTag = ContainerUtil.exists(tags, tag -> "return".equals(tag.getName())); if (!ha...
checkMissingReturnTag
71,358
void (PsiDocTag @NotNull [] tags, @NotNull PsiMethod psiMethod, @NotNull PsiElement toHighlight, @NotNull ProblemsHolder holder) { PsiClassType[] thrownTypes = psiMethod.getThrowsList().getReferencedTypes(); if (thrownTypes.length <= 0) return; Map<PsiClassType, PsiClass> declaredExceptions = new LinkedHashMap<>(); for...
checkMissingThrowsTags
71,359
void (PsiDocTag @NotNull [] tags, @NotNull PsiMethod psiMethod, @NotNull PsiElement toHighlight, @NotNull ProblemsHolder holder) { List<PsiNamedElement> absentParameters = null; for (PsiParameter param : psiMethod.getParameterList().getParameters()) { if (!hasTagForParameter(tags, param)) { (absentParameters = list(abs...
checkMissingParamTags
71,360
void (@NotNull PsiElement toHighlight, @NotNull ProblemsHolder holder, boolean isOnTheFly) { String message = JavaBundle.message("inspection.javadoc.problem.descriptor"); LocalQuickFix fix = isOnTheFly ? IntentionWrapper.wrapToQuickFix(new AddJavadocIntention(), holder.getFile()) : null; problem(holder, toHighlight, me...
reportMissingJavadoc
71,361
void (@NotNull ProblemsHolder holder, @NotNull PsiElement toHighlight, @NotNull @Nls String message, @Nullable LocalQuickFix fix) { final LocalQuickFix[] fixes = fix != null ? new LocalQuickFix[] { fix } : null; holder.registerProblem(toHighlight, message, ProblemHighlightType.GENERIC_ERROR_OR_WARNING, fixes); }
problem
71,362
void (PsiDocTag @NotNull [] tags, @NotNull Options options, @NotNull PsiElement toHighlight, @NotNull ProblemsHolder holder) { boolean[] isTagRequired = new boolean[TAGS_TO_CHECK.length]; boolean[] isTagPresent = new boolean[TAGS_TO_CHECK.length]; boolean someTagsAreRequired = false; for (int i = 0; i < TAGS_TO_CHECK.l...
checkRequiredTags
71,363
void (@NotNull PsiTypeParameterListOwner owner, PsiDocTag @NotNull [] tags, @NotNull PsiElement toHighlight, @NotNull ProblemsHolder holder) { if (owner.hasTypeParameters()) { List<PsiTypeParameter> absentParameters = null; for (PsiTypeParameter typeParameter : owner.getTypeParameters()) { if (!hasTagForParameter(tags,...
checkMissingTypeParamTags
71,364
boolean (PsiDocTag @NotNull [] tags, PsiElement param) { for (PsiDocTag tag : tags) { if ("param".equals(tag.getName())) { PsiDocTagValue value = tag.getValueElement(); if (value instanceof PsiDocParamRef) { PsiReference psiReference = value.getReference(); if (psiReference != null && psiReference.isReferenceTo(param))...
hasTagForParameter
71,365
OptPane () { return pane( checkbox("CLASS", JavaBundle.message("inspection.unused.symbol.check.classes"), modifierSelector("myClassVisibility")), checkbox("INNER_CLASS", JavaBundle.message("inspection.unused.symbol.check.inner.classes"), modifierSelector("myInnerClassVisibility")), checkbox("FIELD", JavaBundle.message(...
getOptionsPane
71,366
AllowedValues (@NotNull PsiType type, @NotNull PsiAnnotation magic, @NotNull PsiManager manager, @Nullable PsiElement context) { PsiAnnotationMemberValue[] allowedValues = PsiAnnotationMemberValue.EMPTY_ARRAY; boolean values = false; boolean flags = false; if (TypeConversionUtil.getTypeRank(type) <= TypeConversionUtil....
getAllowedValuesFromMagic
71,367
PsiAnnotationMemberValue[] (@NonNls @NotNull String attributeName, @NotNull PsiAnnotation magic, @NotNull PsiType type, @NotNull PsiManager manager, @Nullable PsiElement context) { PsiAnnotationMemberValue fromClassAttr = magic.findAttributeValue(attributeName); PsiType fromClassType = fromClassAttr instanceof PsiClass...
readFromClass
71,368
AllowedValues (@NotNull PsiModifierListOwner element, @Nullable PsiType type, @Nullable PsiElement context) { return getAllowedValues(element, type, context, null); }
getAllowedValues
71,369
AllowedValues (@NotNull PsiModifierListOwner element, @Nullable PsiType type, @Nullable PsiElement context, @Nullable Set<? super PsiClass> visited) { PsiManager manager = element.getManager(); for (PsiAnnotation annotation : getAllAnnotations(element)) { if (type != null && MagicConstant.class.getName().equals(annotat...
getAllowedValues
71,370
PsiModifierListOwner (@NotNull PsiModifierListOwner element) { if (element instanceof PsiCompiledElement) { PsiElement navigationElement = element.getNavigationElement(); if (navigationElement instanceof PsiModifierListOwner) { return (PsiModifierListOwner)navigationElement; } } return element; }
getSourceElement
71,371
AllowedValues (@NotNull PsiModifierListOwner owner, @NotNull PsiManager manager) { PsiUtilCore.ensureValid(owner); PsiFile containingFile = owner.getContainingFile(); if (containingFile != null) { PsiUtilCore.ensureValid(containingFile); if (!containsBeanInfoText((PsiFile)containingFile.getNavigationElement())) { retur...
parseBeanInfo
71,372
boolean (@NotNull PsiFile file) { return CachedValuesManager.getCachedValue(file, () -> CachedValueProvider.Result.create(PsiSearchHelper.getInstance(file.getProject()).hasIdentifierInFile(file, "beaninfo") && PsiSearchHelper.getInstance(file.getProject()).hasIdentifierInFile(file, "enum"), file)); }
containsBeanInfoText
71,373
boolean (@NotNull PsiElement e1, @NotNull PsiElement e2, @NotNull PsiManager manager) { if (e1 instanceof PsiLiteralExpression && e2 instanceof PsiLiteralExpression) { return Comparing.equal(((PsiLiteralExpression)e1).getValue(), ((PsiLiteralExpression)e2).getValue()); } if (e1 instanceof PsiPrefixExpression && e2 inst...
same
71,374
boolean () { for (PsiAnnotationMemberValue value : values) { if (value instanceof PsiExpression) { Object evaluated = JavaConstantExpressionEvaluator.computeConstantExpression((PsiExpression)value, null, false); if (evaluated instanceof Integer && ((Integer)evaluated).intValue() == 0) { return true; } } } return false;...
resolvesToZero
71,375
boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; AllowedValues a2 = (AllowedValues)o; if (canBeOred != a2.canBeOred) { return false; } Set<PsiAnnotationMemberValue> v1 = ContainerUtil.newHashSet(values); Set<PsiAnnotationMemberValue> v2 = ContainerUtil.newHashS...
equals
71,376
int () { int result = Arrays.hashCode(values); result = 31 * result + (canBeOred ? 1 : 0); return result; }
hashCode
71,377
boolean () { return canBeOred; }
isFlagSet
71,378
boolean () { return resolvesToZero; }
hasZeroValue
71,379
String () { return InspectionsBundle.message("group.names.probable.bugs"); }
getGroupDisplayName
71,380
String () { return "MagicConstant"; }
getShortName
71,381
PsiElementVisitor (@NotNull final ProblemsHolder holder, boolean isOnTheFly, @NotNull LocalInspectionToolSession session) { return new JavaElementVisitor() { @Override public void visitJavaFile(@NotNull PsiJavaFile file) { if (!InjectedLanguageManager.getInstance(file.getProject()).isInjectedFragment(file)) { Runnable ...
buildVisitor
71,382
void (@NotNull PsiJavaFile file) { if (!InjectedLanguageManager.getInstance(file.getProject()).isInjectedFragment(file)) { Runnable fix = getAttachAnnotationsJarFix(file.getProject()); if (fix != null) { fix.run(); // try to attach automatically } } }
visitJavaFile
71,383
void (@NotNull PsiEnumConstant enumConstant) { checkCall(enumConstant, holder); }
visitEnumConstant
71,384
void (@NotNull PsiCallExpression callExpression) { checkCall(callExpression, holder); }
visitCallExpression
71,385
void (@NotNull PsiAssignmentExpression expression) { PsiExpression r = expression.getRExpression(); if (r != null && expression.getLExpression() instanceof PsiReferenceExpression ref && ref.resolve() instanceof PsiModifierListOwner owner) { PsiType type = expression.getType(); checkExpression(r, owner, type, holder); }...
visitAssignmentExpression
71,386
void (@NotNull PsiVariable variable) { PsiExpression initializer = variable.getInitializer(); if (initializer != null) { checkExpression(initializer, variable, variable.getType(), holder); } }
visitVariable
71,387
void (@NotNull PsiReturnStatement statement) { PsiExpression value = statement.getReturnValue(); if (value == null) return; PsiElement element = PsiTreeUtil.getParentOfType(statement, PsiMethod.class, PsiLambdaExpression.class); PsiMethod method = element instanceof PsiMethod ? (PsiMethod)element : LambdaUtil.getFuncti...
visitReturnStatement
71,388
void (@NotNull PsiNameValuePair pair) { PsiAnnotationMemberValue value = pair.getValue(); if (!(value instanceof PsiExpression expression)) return; PsiReference ref = pair.getReference(); if (ref == null) return; PsiMethod method = (PsiMethod)ref.resolve(); if (method == null) return; checkExpression(expression, method...
visitNameValuePair
71,389
void (@NotNull PsiBinaryExpression expression) { IElementType tokenType = expression.getOperationTokenType(); if (tokenType != JavaTokenType.EQEQ && tokenType != JavaTokenType.NE) return; PsiExpression l = expression.getLOperand(); PsiExpression r = expression.getROperand(); if (r == null) return; checkBinary(l, r); ch...
visitBinaryExpression
71,390
void (@NotNull PsiCaseLabelElementList list) { PsiSwitchBlock switchBlock = PsiTreeUtil.getParentOfType(list, PsiSwitchBlock.class); if (switchBlock == null) return; PsiExpression selector = switchBlock.getExpression(); PsiModifierListOwner owner = null; if (selector instanceof PsiReference ref) { owner = ObjectUtils.t...
visitCaseLabelElementList
71,391
void (@NotNull PsiExpression l, @NotNull PsiExpression r) { if (l instanceof PsiReference ref && ref.resolve() instanceof PsiModifierListOwner owner) { checkExpression(r, owner, PsiUtil.getTypeByPsiElement(owner), holder); } else if (l instanceof PsiMethodCallExpression call) { PsiMethod method = call.resolveMethod(); ...
checkBinary
71,392
void (@NotNull Project project) { super.cleanup(project); project.putUserData(ANNOTATIONS_BEING_ATTACHED, null); }
cleanup
71,393
Runnable (@NotNull Project project) { Boolean found = project.getUserData(ANNOTATIONS_BEING_ATTACHED); if (found != null) { return null; } Sdk jdk = getJDKToAnnotate(project); return jdk == null ? null : () -> attachAnnotationsLaterTo(project, jdk); }
getAttachAnnotationsJarFix
71,394
Sdk (@NotNull Project project) { PsiClass awtInputEvent = JavaPsiFacade.getInstance(project).findClass("java.awt.event.InputEvent", GlobalSearchScope.allScope(project)); if (awtInputEvent == null) return null; PsiMethod[] methods = awtInputEvent.findMethodsByName("getModifiers", false); if (methods.length != 1) return ...
getJDKToAnnotate
71,395
void (@NotNull Project project, @NotNull Sdk sdk) { project.putUserData(ANNOTATIONS_BEING_ATTACHED, Boolean.TRUE); ApplicationManager.getApplication().invokeLater(() -> { JavaSdkImpl.attachIDEAAnnotationsToJdkAsync(sdk) .onSuccess(success -> { // daemon will restart automatically if (success) { SdkModificator modificat...
attachAnnotationsLaterTo
71,396
void (@NotNull PsiExpression expression, @NotNull PsiModifierListOwner owner, @Nullable PsiType type, @NotNull ProblemsHolder holder) { AllowedValues allowed = MagicConstantUtils.getAllowedValues(owner, type, expression); checkExpression(expression, holder, allowed); }
checkExpression
71,397
void (@NotNull PsiExpression expression, @NotNull ProblemsHolder holder, AllowedValues allowed) { if (allowed == null) return; PsiElement scope = PsiUtil.getTopLevelEnclosingCodeBlock(expression, null); if (scope == null) scope = expression; if (!isAllowed(expression, scope, allowed, expression.getManager(), null)) { r...
checkExpression
71,398
void (@NotNull PsiCall methodCall, @NotNull ProblemsHolder holder) { PsiExpressionList argumentList = methodCall.getArgumentList(); if (argumentList == null) return; PsiMethod method = methodCall.resolveMethod(); if (method == null) return; PsiParameter[] parameters = method.getParameterList().getParameters(); PsiExpre...
checkCall
71,399
AllowedValues (PsiMethodCallExpression call) { Integer argument = ObjectUtils.tryCast(ExpressionUtils.computeConstantExpression(call.getArgumentList().getExpressions()[0]), Integer.class); PsiMethod method = call.resolveMethod(); if (method == null || argument == null) return null; return CachedValuesManager.getCachedV...
getCalendarGetValues