Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
63,400
boolean (DomElement element, @NonNls String attributeName) { final GenericAttributeValue<?> attribute = DevKitDomUtil.getAttribute(element, attributeName); return attribute != null && !DomUtil.hasXml(attribute); }
hasMissingAttribute
63,401
void (DomElement element, @InspectionMessage String message, ProblemHighlightType highlightType, DomElementAnnotationHolder holder) { holder.createProblem(element, highlightType, message, null, new RemoveDomElementQuickFix(element)).highlightWholeElement(); }
highlightRedundant
63,402
boolean (@NotNull PsiElement element) { if (element instanceof PsiClass psiClass) { return isDomElementClass(psiClass); } if (element instanceof PsiMethod psiMethod) { return isDomElementMethod(psiMethod); } return false; }
isImplicitUsage
63,403
boolean (@NotNull PsiElement element) { return false; }
isImplicitRead
63,404
boolean (@NotNull PsiElement element) { return false; }
isImplicitWrite
63,405
boolean (PsiClass psiClass) { if (psiClass.isEnum() || psiClass.isAnnotationType() || psiClass.hasModifierProperty(PsiModifier.PRIVATE)) { return false; } return isDomElementInheritor(psiClass); }
isDomElementClass
63,406
boolean (PsiMethod psiMethod) { if (!psiMethod.hasModifierProperty(PsiModifier.PUBLIC) || psiMethod.hasModifierProperty(PsiModifier.STATIC) || psiMethod.isConstructor() || psiMethod.getParameterList().getParametersCount() > 1) { return false; } final PsiClass containingClass = psiMethod.getContainingClass(); if (contai...
isDomElementMethod
63,407
boolean (PsiMethod method, PsiClass containingClass) { if (!PsiTypes.voidType().equals(method.getReturnType()) || !method.getName().startsWith("visit") || method.getParameterList().getParametersCount() != 1 || !InheritanceUtil.isInheritor(containingClass, "com.intellij.util.xml.DomElementVisitor")) { return false; } fi...
isDomElementVisitorMethod
63,408
boolean (@Nullable PsiType psiType) { return InheritanceUtil.isInheritor(psiType, "com.intellij.util.xml.DomElement"); }
isDomElementInheritor
63,409
boolean (@Nullable PsiClass psiClass) { return InheritanceUtil.isInheritor(psiClass, "com.intellij.util.xml.DomElement"); }
isDomElementInheritor
63,410
boolean (@NotNull UMethod method) { if (!"getFamilyName".equals(method.getName()) || !method.getUastParameters().isEmpty()) return false; if (!method.getJavaPsi().hasModifierProperty(PsiModifier.ABSTRACT)) { UClass containingClass = UastContextKt.getUastParentOfType(method.getSourcePsi(), UClass.class, true); if (conta...
isQuickFixGetFamilyNameImplementation
63,411
boolean (@NotNull UMethod method, @NotNull Set<UMethod> processedMethods) { PsiMethod methodJavaPsi = method.getJavaPsi(); if (!processedMethods.add(method) || methodJavaPsi.hasModifierProperty(PsiModifier.STATIC)) return false; if (isContextDependentType(method.getReturnType())) { return true; } return checkMethodBody...
doesMethodViolate
63,412
boolean (@NotNull UMethod method, @NotNull Set<UMethod> processedMethods) { UExpression body = method.getUastBody(); if (body == null) return false; Ref<Boolean> violates = Ref.create(Boolean.FALSE); body.accept(new AbstractUastVisitor() { @Override public boolean visitQualifiedReferenceExpression(@NotNull UQualifiedRe...
checkMethodBody
63,413
boolean (@NotNull UQualifiedReferenceExpression node) { if (violates.get()) return SKIP_CHILDREN; UExpression receiver = node.getReceiver(); if (receiver instanceof UResolvable resolvable) { UElement resolvedUElement = UastContextKt.toUElement(resolvable.resolve()); if (resolvedUElement != null && isViolation(resolvedU...
visitQualifiedReferenceExpression
63,414
boolean (@NotNull USimpleNameReferenceExpression node) { if (violates.get()) return SKIP_CHILDREN; UElement resolvedUElement = UastContextKt.toUElement(node.resolve()); if (resolvedUElement != null && isViolation(resolvedUElement)) { violates.set(Boolean.TRUE); return SKIP_CHILDREN; } return super.visitSimpleNameRefere...
visitSimpleNameReferenceExpression
63,415
boolean (@NotNull UCallExpression node) { if (violates.get()) return SKIP_CHILDREN; if (node.getKind() == UastCallKind.METHOD_CALL) { UElement resolvedUElement = UastContextKt.toUElement(node.resolve()); if (resolvedUElement != null && isViolation(resolvedUElement)) { violates.set(Boolean.TRUE); return SKIP_CHILDREN; }...
visitCallExpression
63,416
boolean (@NotNull UElement uElement) { if (uElement instanceof UVariable resolvedUVariable) { if (!isStaticField(resolvedUVariable) && isContextDependentType((resolvedUVariable).getType())) { return true; } } else if (uElement instanceof UMethod calledMethod) { UClass callingContainingClass = UastContextKt.getUastParen...
isViolation
63,417
boolean (@NotNull UVariable uVariable) { if (!(uVariable instanceof UField)) return false; PsiElement variableJavaPsi = uVariable.getJavaPsi(); if (variableJavaPsi instanceof PsiField field) { return field.hasModifierProperty(PsiModifier.STATIC); } return false; }
isStaticField
63,418
boolean (@Nullable PsiType type) { if (type == null) return false; for (String aClass : BASE_CONTEXT_AWARE_CLASSES) { if (InheritanceUtil.isInheritor(type, aClass)) { return true; } } return false; }
isContextDependentType
63,419
OptPane () { return pane( checkbox("IGNORE_NON_PUBLIC", DevKitBundle.message("inspections.component.not.registered.option.ignore.non.public")), checkbox("CHECK_ACTIONS", DevKitBundle.message("inspections.component.not.registered.option.check.actions")) ); }
getOptionsPane
63,420
JvmElementVisitor<Boolean> (@NotNull Project project, @NotNull HighlightSink sink, boolean isOnTheFly) { return new DefaultJvmElementVisitor<>() { @Override public Boolean visitClass(@NotNull JvmClass clazz) { PsiElement sourceElement = clazz.getSourceElement(); if (!(sourceElement instanceof PsiClass)) { return null; ...
buildVisitor
63,421
Boolean (@NotNull JvmClass clazz) { PsiElement sourceElement = clazz.getSourceElement(); if (!(sourceElement instanceof PsiClass)) { return null; } checkClass(project, (PsiClass)sourceElement, sink); return false; }
visitClass
63,422
void (@NotNull Project project, @NotNull PsiClass checkedClass, @NotNull HighlightSink sink) { if (checkedClass.getQualifiedName() == null || checkedClass.getContainingFile().getVirtualFile() == null || checkedClass.hasModifierProperty(PsiModifier.ABSTRACT) || checkedClass.isEnum() || checkedClass.isDeprecated() || Psi...
checkClass
63,423
boolean (@NotNull PsiClass checkedClass, @NotNull HighlightSink sink, @NotNull ComponentType componentType) { if (findRegistrationType(checkedClass, COMPONENT_TYPE_TO_REGISTRATION_TYPE.get(componentType)) != null) { return true; } if (!canFix(checkedClass)) { return true; } LocalQuickFix fix = new RegisterComponentFix(...
checkComponentRegistration
63,424
PsiClass (@NotNull PsiClass checkedClass, @NotNull RegistrationCheckerUtil.RegistrationType type) { final Set<PsiClass> types = RegistrationCheckerUtil.getRegistrationTypes(checkedClass, type); return ContainerUtil.getFirstItem(types); }
findRegistrationType
63,425
boolean (@NotNull PsiClass psiClass) { if (!CHECK_ACTIONS) return false; if (IGNORE_NON_PUBLIC && !psiClass.hasModifierProperty(PsiModifier.PUBLIC)) return false; return true; }
shouldCheckActionClass
63,426
boolean (@NotNull PsiClass actionClass) { final PsiClass registrationType = findRegistrationType(actionClass, RegistrationCheckerUtil.RegistrationType.ACTION); if (registrationType != null) { return true; } // search code usages: 1) own CTOR calls 2) usage via "new ActionClass()" for (PsiMethod method : actionClass.get...
isActionRegistered
63,427
boolean (@NotNull PsiClass psiClass) { Project project = psiClass.getProject(); PsiFile psiFile = psiClass.getContainingFile(); LOG.assertTrue(psiFile != null); Module module = ModuleUtilCore.findModuleForFile(psiFile.getVirtualFile(), project); return PluginModuleType.isPluginModuleOrDependency(module) || module != nu...
canFix
63,428
boolean (ExternalAnnotator annotator, PsiFile file) { if (!(annotator instanceof XMLExternalAnnotator)) { return false; } return ReadAction.compute(() -> DescriptorUtil.isPluginXml(file)); }
isProhibited
63,429
PsiElement (PsiField field) { UField uField = UastContextKt.toUElement(field, UField.class); if (uField == null) return null; UElement anchor = uField.getUastAnchor(); if (anchor == null) return null; return anchor.getSourcePsi(); }
getAnchor
63,430
PsiElement (PsiAnnotation field) { UAnnotation uAnnotation = UastContextKt.toUElement(field, UAnnotation.class); if (uAnnotation == null) return null; return uAnnotation.getSourcePsi(); }
getAnchor
63,431
boolean (PsiField field) { PsiType type = field.getType().getDeepComponentType(); if (type instanceof PsiPrimitiveType) return true; if (!(type instanceof PsiClassType)) return false; PsiClass fieldClass = ((PsiClassType)type).resolve(); if (fieldClass == null) return true; if (fieldClass.isEnum()) return true; if (fie...
hasSafeType
63,432
boolean (PsiClass psiClass) { for (String methodName : METHODS_TO_IGNORE_CLASS) { for (PsiMethod method : psiClass.findMethodsByName(methodName, true)) { PsiClass containingClass = method.getContainingClass(); if (containingClass != null) { String className = containingClass.getQualifiedName(); boolean standardPreviewM...
hasCustomPreviewStrategy
63,433
boolean (PsiMethod method) { Predicate<PsiMethod> predicate = m -> { PsiCodeBlock body = m.getBody(); if (body == null) return false; PsiStatement[] statements = body.getStatements(); if (statements.length != 1 || !(statements[0] instanceof PsiReturnStatement)) return false; PsiExpression value = ((PsiReturnStatement)s...
returnsTrue
63,434
InspectionDescriptionInfo (Module module, PsiClass psiClass) { PsiMethod getShortNameMethod = PsiUtil.findNearestMethod("getShortName", psiClass); if (getShortNameMethod != null && Objects.requireNonNull(getShortNameMethod.getContainingClass()).hasModifierProperty(PsiModifier.ABSTRACT)) { getShortNameMethod = null; } b...
create
63,435
Extension (PsiClass psiClass) { return CachedValuesManager.getCachedValue(psiClass, () -> { Module module = ModuleUtilCore.findModuleForPsiElement(psiClass); Extension extension = module == null ? null : doFindExtension(module, psiClass); return CachedValueProvider.Result.create(extension, UastModificationTracker.getIn...
findExtension
63,436
Extension (Module module, PsiClass psiClass) { // Try search in narrow scopes first Project project = module.getProject(); Set<DomFileElement<IdeaPlugin>> processed = new HashSet<>(); for (GlobalSearchScope scope : DescriptionCheckerUtil.searchScopes(module)) { List<DomFileElement<IdeaPlugin>> origElements = DomService...
doFindExtension
63,437
PsiFile (Module module, @Nullable String filename) { if (filename == null) return null; String nameWithSuffix = filename + ".html"; return DescriptionCheckerUtil.allDescriptionDirs(module, DescriptionType.INSPECTION) .map(directory -> directory.findFile(nameWithSuffix)).nonNull().findFirst().orElse(null); }
resolveInspectionDescriptionFile
63,438
boolean () { return myFilename != null; }
isValid
63,439
String () { assert isValid(); return myFilename; }
getFilename
63,440
PsiMethod () { return myMethod; }
getShortNameMethod
63,441
PsiFile () { return myDescriptionFile; }
getDescriptionFile
63,442
boolean () { return getDescriptionFile() != null; }
hasDescriptionFile
63,443
boolean () { return myShortNameInXml; }
isShortNameInXml
63,444
String (PsiMethod method, PsiClass cls) { final UExpression expression = PsiUtil.getReturnedExpression(method); if (expression == null) return null; if (expression instanceof UReferenceExpression) { final String methodName = ((UReferenceExpression)expression).getResolvedName(); if ("getSimpleName".equals(methodName)) {...
getReturnedLiteral
63,445
PsiElementVisitor (@NotNull ProblemsHolder holder, boolean isOnTheFly) { return isAllowed(holder) ? buildInternalVisitor(holder, isOnTheFly) : PsiElementVisitor.EMPTY_VISITOR; }
buildVisitor
63,446
boolean (@NotNull ProblemsHolder holder) { return DevKitInspectionUtil.isAllowed(holder.getFile()); }
isAllowed
63,447
PsiElementVisitor (@NotNull ProblemsHolder holder, boolean isOnTheFly) { return super.buildVisitor(holder, isOnTheFly); }
buildInternalVisitor
63,448
ProblemsHolder (@NotNull UElement uElement, @NotNull InspectionManager manager, boolean isOnTheFly) { PsiElement sourcePsi = uElement.getSourcePsi(); if (sourcePsi != null) { return new ProblemsHolder(manager, sourcePsi.getContainingFile(), isOnTheFly); } throw new IllegalStateException("Could not create problems holde...
createProblemsHolder
63,449
boolean (PsiClass checkedClass) { final PsiMethod[] constructors = checkedClass.getConstructors(); if (constructors.length == 0) return true; // default constructor for (PsiMethod constructor : constructors) { if (constructor.getParameterList().isEmpty()) { return true; } } return false; }
hasNoArgConstructor
63,450
String () { return "ComponentRegistrationProblems"; }
getShortName
63,451
IntentionPreviewInfo (@NotNull Project project, @NotNull ProblemDescriptor previewDescriptor) { return IntentionPreviewInfo.EMPTY; }
generatePreview
63,452
void (@NotNull Project project, @NotNull ProblemDescriptor descriptor) { // can happen during batch-inspection if resolution has already been applied to plugin.xml or java class PsiElement element = myPointer.getElement(); if (element == null || !element.isValid()) return; boolean external = descriptor.getPsiElement()....
applyFix
63,453
String () { return DevKitBundle.message("inspections.registration.problems.quickfix.create.constructor"); }
getFamilyName
63,454
boolean (PsiClass epClass) { return false; }
skipIfNotRegistered
63,455
String (Module module, PsiClass psiClass) { return DevKitBundle.message("inspections.postfix.description.not.found"); }
getHasNotDescriptionError
63,456
String () { return DevKitBundle.message("inspections.postfix.description.no.before.after.template"); }
getHasNotBeforeAfterError
63,457
boolean (@NotNull ProblemsHolder holder) { return super.isAllowed(holder) && DevKitInspectionUtil.isClassAvailable(holder, OPT_PANE); }
isAllowed
63,458
boolean (UCallExpression callExpression, String className) { if (callExpression.getKind() != UastCallKind.CONSTRUCTOR_CALL) return false; PsiMethod target = callExpression.resolve(); return target != null && target.getName().equals(className); }
isConstructor
63,459
String () { return DevKitBundle.message("inspection.migrate.to.opt.control.fix"); }
getFamilyName
63,460
void (@NotNull Project project, @NotNull ProblemDescriptor descriptor) { PsiElement element = descriptor.getPsiElement(); UMethod method = UastContextKt.findUElementAt(element.getContainingFile(), element.getTextOffset(), UMethod.class); if (method == null) return; PsiElement psi = method.getSourcePsi(); if (psi == nul...
applyFix
63,461
void (@NotNull UastCodeGenerationPlugin plugin, @NotNull PsiElement element) { var refProcessor = new PsiRecursiveElementWalkingVisitor() { final List<UReferenceExpression> list = new ArrayList<>(); @Override public void visitElement(@NotNull PsiElement element) { super.visitElement(element); ContainerUtil.addIfNotNull...
shortenReferences
63,462
void (@NotNull PsiElement element) { super.visitElement(element); ContainerUtil.addIfNotNull(list, UastContextKt.toUElement(element, UReferenceExpression.class)); }
visitElement
63,463
void (@NotNull PsiElement element) { super.visitElement(element); UQualifiedReferenceExpression expression = UastContextKt.toUElement(element, UQualifiedReferenceExpression.class); if (expression != null && expression.getReceiver() instanceof UReferenceExpression qualifier) { PsiElement target = qualifier.resolve(); if...
visitElement
63,464
OptPane () { return super.getOptionsPane(); }
getOptionsPane
63,465
void (@NotNull OptPane pane, @NotNull StringBuilder builder) { builder.append(OPT_PANE + ".pane(\n"); var components = pane.components(); for (OptComponent component : components) { serialize(component, builder); builder.append(",\n"); } builder.setLength(builder.length() - (components.isEmpty() ? 1 : 2)); builder.appe...
serialize
63,466
void (OptComponent component, StringBuilder builder) { if (component instanceof OptCheckbox checkbox) { builder.append(OPT_PANE + ".checkbox("); builder.append(checkbox.bindId()).append(", "); builder.append(checkbox.label().label()); for (OptComponent child : checkbox.children()) { builder.append(",\n"); serialize(chi...
serialize
63,467
OptPane () { return pane( checkbox("highlightNonDynamicEPUsages", DevKitBundle.message("inspections.plugin.xml.dynamic.plugin.option.highlight.usages.ep"))); }
getOptionsPane
63,468
void (@NotNull DomElement element, @NotNull DomElementAnnotationHolder holder, @NotNull DomHighlightingHelper helper) { if (!isAllowed(holder)) return; if (element instanceof ApplicationComponents || element instanceof ProjectComponents || element instanceof ModuleComponents) { highlightComponents(holder, element); } e...
checkDomElement
63,469
void (DomElementAnnotationHolder holder, DomElement component) { holder.createProblem(component, new HtmlBuilder() .append(DevKitBundle.message("inspections.plugin.xml.dynamic.plugin.component.usage")) .nbsp() .append(HtmlChunk .link("https://plugins.jetbrains.com/docs/intellij/plugin-components.html?from=DevkitPluginX...
highlightComponents
63,470
void (DomElementAnnotationHolder holder, ExtensionPoint extensionPoint) { if (!DomUtil.hasXml(extensionPoint.getDynamic())) { final LocalQuickFix[] fixes = holder.isOnTheFly() && ApplicationManager.getApplication().isInternal() ? new LocalQuickFix[]{ createAnalyzeEPFix("AnalyzeEPUsage", extensionPoint), createAnalyzeEP...
highlightExtensionPoint
63,471
IntentionAndQuickFixAction (String actionId, ExtensionPoint extensionPoint) { final AnAction action = ActionManager.getInstance().getAction(actionId); assert action != null : actionId; String name = DevKitBundle.message("inspections.plugin.xml.dynamic.plugin.analyze.extension.point", action.getTemplateText(), extension...
createAnalyzeEPFix
63,472
IntentionPreviewInfo (@NotNull Project project, @NotNull ProblemDescriptor previewDescriptor) { return IntentionPreviewInfo.EMPTY; }
generatePreview
63,473
String () { return name; }
getName
63,474
String () { return Objects.requireNonNull(action.getTemplateText()); }
getFamilyName
63,475
void (@NotNull Project project, PsiFile file, @Nullable Editor editor) { assert editor != null; action.actionPerformed(AnActionEvent.createFromDataContext(ActionPlaces.UNKNOWN, null, EditorUtil.getEditorDataContext(editor))); }
applyFix
63,476
void (DomElementAnnotationHolder holder, Group group) { if (!DomUtil.hasXml(group.getId())) { holder.createProblem(group, DevKitBundle.message("inspections.plugin.xml.dynamic.plugin.id.required.for.group"), new AddDomElementQuickFix<>(group.getId())); } }
highlightGroup
63,477
void (DomElementAnnotationHolder holder, Extension extension) { final ExtensionPoint extensionPoint = extension.getExtensionPoint(); if (extensionPoint != null && Boolean.TRUE != extensionPoint.getDynamic().getValue()) { holder.createProblem(extension, DevKitBundle.message("inspections.plugin.xml.dynamic.plugin.usage.o...
highlightExtension
63,478
OptPane () { OptStringList ignoreClassList = stringList("myRegistrationCheckIgnoreClassList", DevKitBundle.message("inspections.plugin.xml.ignore.classes.title"), new JavaClassValidator().withTitle(DevKitBundle.message("inspections.plugin.xml.add.ignored.class.title"))); if (ApplicationManager.getApplication().isIntern...
getOptionsPane
63,479
OptionController () { return super.getOptionController() .onValue("PLUGINS_MODULES", () -> StreamEx.of(PLUGINS_MODULES).map(set -> String.join(",", set.modules)).toMutableList(), newList -> { PLUGINS_MODULES.clear(); StreamEx.of(newList).map(line -> { PluginModuleSet set = new PluginModuleSet(); set.modules = StreamEx....
getOptionController
63,480
void (@NotNull Element node) { super.readSettings(node); myPluginModuleSetByModuleName.drop(); }
readSettings
63,481
String () { return "PluginXmlValidity"; }
getShortName
63,482
void (@NotNull DomElement element, @NotNull DomElementAnnotationHolder holder, @NotNull DomHighlightingHelper helper) { if (!isAllowed(holder)) return; super.checkDomElement(element, holder, helper); ComponentModuleRegistrationChecker componentModuleRegistrationChecker = new ComponentModuleRegistrationChecker(myPluginM...
checkDomElement
63,483
void (DependencyDescriptor descriptor, DomElementAnnotationHolder holder) { if (!isIdeaProjectOrJetBrains(descriptor)) { highlightJetbrainsOnly(descriptor, holder); return; } if (descriptor.getModuleEntry().isEmpty() && descriptor.getPlugin().isEmpty()) { holder.createProblem(descriptor, HighlightSeverity.ERROR, DevKit...
annotateDependencyDescriptor
63,484
void (ContentDescriptor descriptor, DomElementAnnotationHolder holder) { if (!isIdeaProjectOrJetBrains(descriptor)) { highlightJetbrainsOnly(descriptor, holder); return; } if (descriptor.getModuleEntry().isEmpty()) { holder.createProblem(descriptor, HighlightSeverity.ERROR, DevKitBundle.message("inspections.plugin.xml....
annotateContentDescriptor
63,485
boolean (DomElement element) { final Module module = element.getModule(); if (module == null) return true; if (PsiUtil.isIdeaProject(module.getProject())) return true; final IdeaPlugin ideaPlugin = element.getParentOfType(IdeaPlugin.class, false); assert ideaPlugin != null; return PluginManagerCore.isDevelopedByJetBrai...
isIdeaProjectOrJetBrains
63,486
void (GenericDomValue<PsiClass> psiClassDomValue, DomElementAnnotationHolder holder) { final PsiClass psiClass = psiClassDomValue.getValue(); if (psiClass == null) return; if (psiClass.getContainingClass() != null && !StringUtil.containsChar(StringUtil.notNullize(psiClassDomValue.getRawText()), '$')) { holder.createPro...
annotatePsiClassValue
63,487
boolean (DomElement domElement, @NotNull Module module) { VirtualFile virtualFile = DomUtil.getFile(domElement).getVirtualFile(); return virtualFile != null && ModuleRootManager.getInstance(module).getFileIndex().isUnderSourceRootOfType(virtualFile, JavaModuleSourceRootTypes.PRODUCTION); }
isUnderProductionSources
63,488
void (Listener listener, DomElementAnnotationHolder holder) { final PsiClass listenerClass = listener.getListenerClassName().getValue(); final PsiClass topicClass = listener.getTopicClassName().getValue(); if (listenerClass == null || topicClass == null) return; if (!listenerClass.isInheritor(topicClass, true)) { holde...
annotateListener
63,489
void (Listeners listeners, DomElementAnnotationHolder holder) { final Module module = listeners.getModule(); if (module == null || PsiUtil.isIdeaProject(module.getProject())) return; PluginPlatformInfo platformInfo = PluginPlatformInfo.forDomElement(listeners); final PluginPlatformInfo.PlatformResolveStatus resolveStat...
annotateListeners
63,490
void (Dependency dependency, DomElementAnnotationHolder holder) { final GenericAttributeValue<Boolean> optional = dependency.getOptional(); if (optional.getValue() == Boolean.FALSE) { highlightRedundant(optional, DevKitBundle.message("inspections.plugin.xml.dependency.superfluous.optional"), ProblemHighlightType.WARNIN...
annotateDependency
63,491
void (IdeaPlugin ideaPlugin, DomElementAnnotationHolder holder, @NotNull Module module) { //noinspection deprecation highlightAttributeNotUsedAnymore(ideaPlugin.getIdeaPluginVersion(), holder); //noinspection deprecation if (DomUtil.hasXml(ideaPlugin.getUseIdeaClassloader())) { //noinspection deprecation highlightDepre...
annotateIdeaPlugin
63,492
void (IdeaPlugin ideaPlugin, DomElementAnnotationHolder holder, @NotNull Module module) { if (!PsiUtil.isIdeaProject(module.getProject())) return; if (DomUtil.hasXml(ideaPlugin.getUrl())) { String url = ideaPlugin.getUrl().getStringValue(); if ("https://www.jetbrains.com/idea".equals(url)) { highlightRedundant(ideaPlug...
checkJetBrainsPlugin
63,493
void (IdeaPlugin ideaPlugin, DomElementAnnotationHolder holder, Module module) { if (!ideaPlugin.hasRealPluginId()) return; if (!isUnderProductionSources(ideaPlugin, module)) return; if (Boolean.TRUE == ideaPlugin.getImplementationDetail().getValue()) return; Collection<VirtualFile> pluginIconFiles = FilenameIndex.getV...
checkPluginIcon
63,494
void (ExtensionPoint extensionPoint, DomElementAnnotationHolder holder, ComponentModuleRegistrationChecker componentModuleRegistrationChecker) { if (extensionPoint.getWithElements().isEmpty() && !extensionPoint.collectMissingWithTags().isEmpty()) { holder.createProblem(extensionPoint, DevKitBundle.message("inspections....
annotateExtensionPoint
63,495
void (@NotNull Project project, @NotNull ProblemDescriptor descriptor) { ExtensionPoint fixExtensionPoint = DomUtil.findDomElement(descriptor.getPsiElement(), ExtensionPoint.class); if (fixExtensionPoint == null) return; fixExtensionPoint.getQualifiedName().undefine(); fixExtensionPoint.getName().setStringValue(StringU...
applyFix
63,496
void (ExtensionPoint extensionPoint, DomElementAnnotationHolder holder) { boolean hasBeanClass = DomUtil.hasXml(extensionPoint.getBeanClass()); boolean hasInterface = DomUtil.hasXml(extensionPoint.getInterface()); if (hasBeanClass && hasInterface) { highlightRedundant(extensionPoint.getBeanClass(), DevKitBundle.message...
checkEpBeanClassAndInterface
63,497
void (ExtensionPoint extensionPoint, DomElementAnnotationHolder holder) { GenericAttributeValue<String> name = extensionPoint.getName(); GenericAttributeValue<String> qualifiedName = extensionPoint.getQualifiedName(); boolean hasName = DomUtil.hasXml(name); boolean hasQualifiedName = DomUtil.hasXml(qualifiedName); if (...
checkEpNameAndQualifiedName
63,498
boolean (GenericAttributeValue<String> nameAttrValue) { if (!nameAttrValue.exists()) { return true; } @NonNls String name = nameAttrValue.getValue(); // skip some known offenders in IJ project if (name != null && (StringUtil.startsWith(name, "Pythonid.") || StringUtil.startsWith(name, "DevKit.")) // NON-NLS && PsiUtil....
isValidEpName
63,499
void (Extensions extensions, DomElementAnnotationHolder holder) { final GenericAttributeValue<IdeaPlugin> xmlnsAttribute = extensions.getXmlns(); if (DomUtil.hasXml(xmlnsAttribute)) { highlightDeprecated(xmlnsAttribute, DevKitBundle.message("inspections.plugin.xml.use.defaultExtensionNs"), holder, false, true); return;...
annotateExtensions