diff --git a/images/src/org/intellij/images/thumbnail/actions/FilterByThemeComboBoxAction.java b/images/src/org/intellij/images/thumbnail/actions/FilterByThemeComboBoxAction.java index 094a106ca943..a20c2377f621 100644 --- a/images/src/org/intellij/images/thumbnail/actions/FilterByThemeComboBoxAction.java +++ b/images/src/org/intellij/images/thumbnail/actions/FilterByThemeComboBoxAction.java @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package org.intellij.images.thumbnail.actions; @@ -45,7 +31,7 @@ public final class FilterByThemeComboBoxAction extends ComboBoxAction { Project project = e.getProject(); ThumbnailView view = ThumbnailViewActionUtil.getVisibleThumbnailView(e); boolean hasApplicableExtension = - ContainerUtil.and(ThemeFilter.EP_NAME.getExtensions(), filter -> project != null && filter.isApplicableToProject(project)); + ContainerUtil.and(ThemeFilter.EP_NAME.getExtensionList(), filter -> project != null && filter.isApplicableToProject(project)); e.getPresentation().setVisible(view != null && hasApplicableExtension); ThemeFilter filter = view != null ? view.getFilter() : null; e.getPresentation().setText(filter == null ? CommonBundle.message("action.text.all") : filter.getDisplayName()); @@ -76,7 +62,7 @@ public final class FilterByThemeComboBoxAction extends ComboBoxAction { view.setFilter(this); } })); - for (ThemeFilter filter : ThemeFilter.EP_NAME.getExtensions()) { + for (ThemeFilter filter : ThemeFilter.EP_NAME.getExtensionList()) { group.add(new FilterImagesAction(filter)); } diff --git a/java/compiler/impl/src/com/intellij/compiler/impl/CompileDriver.java b/java/compiler/impl/src/com/intellij/compiler/impl/CompileDriver.java index 83a6cb10983f..f9503c2a0468 100644 --- a/java/compiler/impl/src/com/intellij/compiler/impl/CompileDriver.java +++ b/java/compiler/impl/src/com/intellij/compiler/impl/CompileDriver.java @@ -207,7 +207,7 @@ public final class CompileDriver { private List mergeScopesFromProviders(CompileScope scope, List scopes, boolean forceBuild) { - for (BuildTargetScopeProvider provider : BuildTargetScopeProvider.EP_NAME.getExtensions()) { + for (BuildTargetScopeProvider provider : BuildTargetScopeProvider.EP_NAME.getExtensionList()) { List providerScopes = ReadAction.compute( () -> myProject.isDisposed() ? Collections.emptyList() : provider.getBuildTargetScopes(scope, myProject, forceBuild)); diff --git a/java/compiler/impl/src/com/intellij/compiler/impl/CompileScopeUtil.java b/java/compiler/impl/src/com/intellij/compiler/impl/CompileScopeUtil.java index 1ff39e415b61..182a0a4c9a76 100644 --- a/java/compiler/impl/src/com/intellij/compiler/impl/CompileScopeUtil.java +++ b/java/compiler/impl/src/com/intellij/compiler/impl/CompileScopeUtil.java @@ -1,4 +1,4 @@ -// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.compiler.impl; import com.intellij.compiler.ModuleSourceSet; @@ -29,7 +29,7 @@ public final class CompileScopeUtil { public static void setResourcesScopeForExternalBuild(@NotNull CompileScope scope, @NotNull List moduleNames) { List resourceScopes = new ArrayList<>(); - for (UpdateResourcesBuildContributor provider : UpdateResourcesBuildContributor.EP_NAME.getExtensions()) { + for (UpdateResourcesBuildContributor provider : UpdateResourcesBuildContributor.EP_NAME.getExtensionList()) { for (BuildTargetType type : provider.getResourceTargetTypes()) { resourceScopes.add(CmdlineProtoUtil.createTargetsScope(type.getTypeId(), moduleNames, false)); } diff --git a/java/compiler/impl/src/com/intellij/compiler/options/CompilerUIConfigurable.java b/java/compiler/impl/src/com/intellij/compiler/options/CompilerUIConfigurable.java index 0fe53941e9c2..44b37a357c49 100644 --- a/java/compiler/impl/src/com/intellij/compiler/options/CompilerUIConfigurable.java +++ b/java/compiler/impl/src/com/intellij/compiler/options/CompilerUIConfigurable.java @@ -107,7 +107,7 @@ public class CompilerUIConfigurable implements SearchableConfigurable, Configura } private void tweakControls(@NotNull Project project) { - CompilerOptionsFilter[] managers = CompilerOptionsFilter.EP_NAME.getExtensions(); + List managers = CompilerOptionsFilter.EP_NAME.getExtensionList(); boolean showExternalBuildSetting = true; for (CompilerOptionsFilter manager : managers) { showExternalBuildSetting = manager.isAvailable(Setting.EXTERNAL_BUILD, project); diff --git a/java/compiler/impl/src/com/intellij/packaging/impl/elements/PackagingElementFactoryImpl.java b/java/compiler/impl/src/com/intellij/packaging/impl/elements/PackagingElementFactoryImpl.java index dea7fd40d411..4c6d183144c2 100644 --- a/java/compiler/impl/src/com/intellij/packaging/impl/elements/PackagingElementFactoryImpl.java +++ b/java/compiler/impl/src/com/intellij/packaging/impl/elements/PackagingElementFactoryImpl.java @@ -1,4 +1,4 @@ -// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.packaging.impl.elements; import com.intellij.openapi.diagnostic.Logger; @@ -21,7 +21,6 @@ import com.intellij.packaging.artifacts.ArtifactPointerManager; import com.intellij.packaging.elements.*; import com.intellij.packaging.ui.ArtifactEditorContext; import com.intellij.platform.workspace.jps.entities.LibraryEntity; -import com.intellij.util.ArrayUtil; import com.intellij.util.PathUtil; import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.NotNull; @@ -31,6 +30,8 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; +import static kotlinx.collections.immutable.ExtensionsKt.persistentListOf; +import static kotlinx.collections.immutable.ExtensionsKt.toPersistentList; import static org.jetbrains.jps.model.serialization.library.JpsLibraryTableSerializer.APPLICATION_LEVEL; import static org.jetbrains.jps.model.serialization.library.JpsLibraryTableSerializer.PROJECT_LEVEL; @@ -42,14 +43,14 @@ public class PackagingElementFactoryImpl extends PackagingElementFactory { public static final PackagingElementType DIRECTORY_COPY_ELEMENT_TYPE = new DirectoryCopyElementType(); public static final PackagingElementType EXTRACTED_DIRECTORY_ELEMENT_TYPE = new ExtractedDirectoryElementType(); public static final PackagingElementType> ARTIFACT_ROOT_ELEMENT_TYPE = new ArtifactRootElementType(); - private static final PackagingElementType[] STANDARD_TYPES = { + private static final List> STANDARD_TYPES = persistentListOf( DIRECTORY_ELEMENT_TYPE, ARCHIVE_ELEMENT_TYPE, LibraryElementType.LIBRARY_ELEMENT_TYPE, ProductionModuleOutputElementType.ELEMENT_TYPE, TestModuleOutputElementType.ELEMENT_TYPE, ProductionModuleSourceElementType.ELEMENT_TYPE, ArtifactElementType.ARTIFACT_ELEMENT_TYPE, FILE_COPY_ELEMENT_TYPE, DIRECTORY_COPY_ELEMENT_TYPE, EXTRACTED_DIRECTORY_ELEMENT_TYPE - }; + ); @Override public PackagingElementType @NotNull [] getNonCompositeElementTypes() { @@ -98,9 +99,8 @@ public class PackagingElementFactoryImpl extends PackagingElementFactory { } @Override - public PackagingElementType @NotNull [] getAllElementTypes() { - final PackagingElementType[] types = PackagingElementType.EP_NAME.getExtensions(); - return ArrayUtil.mergeArrays(STANDARD_TYPES, types); + public @NotNull List getAllElementTypes() { + return toPersistentList(PackagingElementType.EP_NAME.getExtensionList()).addAll(STANDARD_TYPES); } @NotNull @@ -166,7 +166,7 @@ public class PackagingElementFactoryImpl extends PackagingElementFactory { @NotNull @NonNls String path, final boolean directory, boolean addAsFirstChild) { path = StringUtil.trimStart(StringUtil.trimEnd(path, "/"), "/"); - if (path.length() == 0) { + if (path.isEmpty()) { return root; } int index = path.lastIndexOf('/'); diff --git a/java/compiler/openapi/src/com/intellij/openapi/compiler/CompilerPaths.java b/java/compiler/openapi/src/com/intellij/openapi/compiler/CompilerPaths.java index 9b9f45b11ec7..e23dbddf3543 100644 --- a/java/compiler/openapi/src/com/intellij/openapi/compiler/CompilerPaths.java +++ b/java/compiler/openapi/src/com/intellij/openapi/compiler/CompilerPaths.java @@ -1,4 +1,4 @@ -// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.openapi.compiler; import com.intellij.compiler.CompilerConfiguration; @@ -161,7 +161,7 @@ public class CompilerPaths { } ModuleRootManager moduleRootManager = ModuleRootManager.getInstance(module); - for (OrderEnumerationHandler.Factory handlerFactory : OrderEnumerationHandler.EP_NAME.getExtensions()) { + for (OrderEnumerationHandler.Factory handlerFactory : OrderEnumerationHandler.EP_NAME.getExtensionList()) { if (handlerFactory.isApplicable(module)) { OrderEnumerationHandler handler = handlerFactory.createHandler(module); List outputUrls = new SmartList<>(); diff --git a/java/compiler/openapi/src/com/intellij/packaging/elements/PackagingElementFactory.java b/java/compiler/openapi/src/com/intellij/packaging/elements/PackagingElementFactory.java index b50e44cc8667..d8b556274c40 100644 --- a/java/compiler/openapi/src/com/intellij/packaging/elements/PackagingElementFactory.java +++ b/java/compiler/openapi/src/com/intellij/packaging/elements/PackagingElementFactory.java @@ -1,4 +1,4 @@ -// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.packaging.elements; import com.intellij.openapi.application.ApplicationManager; @@ -109,7 +109,7 @@ public abstract class PackagingElementFactory { public abstract PackagingElementType @NotNull [] getNonCompositeElementTypes(); - public abstract PackagingElementType @NotNull [] getAllElementTypes(); + public abstract @NotNull List getAllElementTypes(); public abstract ComplexPackagingElementType @NotNull [] getComplexElementTypes(); } diff --git a/java/java-analysis-impl/src/com/intellij/codeInsight/daemon/impl/analysis/ErrorFixExtensionPoint.java b/java/java-analysis-impl/src/com/intellij/codeInsight/daemon/impl/analysis/ErrorFixExtensionPoint.java index f09db314ec66..2fd0392498ff 100644 --- a/java/java-analysis-impl/src/com/intellij/codeInsight/daemon/impl/analysis/ErrorFixExtensionPoint.java +++ b/java/java-analysis-impl/src/com/intellij/codeInsight/daemon/impl/analysis/ErrorFixExtensionPoint.java @@ -64,7 +64,7 @@ public final class ErrorFixExtensionPoint implements PluginAware { private static Map> getCodeToFixMap() { Map> map = ourCodeToFix; if (map == null) { - ourCodeToFix = map = StreamEx.of(ERROR_FIX_EXTENSION_POINT.getExtensions()).groupingBy(fix -> fix.errorCode); + ourCodeToFix = map = StreamEx.of(ERROR_FIX_EXTENSION_POINT.getExtensionList()).groupingBy(fix -> fix.errorCode); } return map; } diff --git a/java/java-analysis-impl/src/com/intellij/codeInsight/daemon/impl/analysis/HighlightUtil.java b/java/java-analysis-impl/src/com/intellij/codeInsight/daemon/impl/analysis/HighlightUtil.java index 04abb9fd3848..7ddf80ba6172 100644 --- a/java/java-analysis-impl/src/com/intellij/codeInsight/daemon/impl/analysis/HighlightUtil.java +++ b/java/java-analysis-impl/src/com/intellij/codeInsight/daemon/impl/analysis/HighlightUtil.java @@ -2206,7 +2206,7 @@ public final class HighlightUtil { @Nullable String symbolName, @Nullable String containerName) { ErrorWithFixes error = null; - for (JavaModuleSystem moduleSystem : JavaModuleSystem.EP_NAME.getExtensions()) { + for (JavaModuleSystem moduleSystem : JavaModuleSystem.EP_NAME.getExtensionList()) { if (moduleSystem instanceof JavaModuleSystemEx) { error = checkAccess((JavaModuleSystemEx)moduleSystem, target, place); } @@ -2235,7 +2235,7 @@ public final class HighlightUtil { } private static PsiElement getContainer(@NotNull PsiModifierListOwner refElement) { - for (ContainerProvider provider : ContainerProvider.EP_NAME.getExtensions()) { + for (ContainerProvider provider : ContainerProvider.EP_NAME.getExtensionList()) { PsiElement container = provider.getContainer(refElement); if (container != null) return container; } @@ -3780,7 +3780,7 @@ public final class HighlightUtil { if (module != null) { LanguageLevel moduleLanguageLevel = LanguageLevelUtil.getEffectiveLanguageLevel(module); if (moduleLanguageLevel.isAtLeast(feature.level) && !feature.isLimited()) { - for (FilePropertyPusher pusher : FilePropertyPusher.EP_NAME.getExtensions()) { + for (FilePropertyPusher pusher : FilePropertyPusher.EP_NAME.getExtensionList()) { if (pusher instanceof JavaLanguageLevelPusher) { String newMessage = ((JavaLanguageLevelPusher)pusher).getInconsistencyLanguageLevelMessage(message, level, file); if (newMessage != null) { diff --git a/java/java-analysis-impl/src/com/intellij/codeInspection/visibility/AccessCanBeTightenedInspection.java b/java/java-analysis-impl/src/com/intellij/codeInspection/visibility/AccessCanBeTightenedInspection.java index 8a1bfa6e295f..12fdca6b4a36 100644 --- a/java/java-analysis-impl/src/com/intellij/codeInspection/visibility/AccessCanBeTightenedInspection.java +++ b/java/java-analysis-impl/src/com/intellij/codeInspection/visibility/AccessCanBeTightenedInspection.java @@ -178,7 +178,7 @@ public class AccessCanBeTightenedInspection extends AbstractBaseJavaLocalInspect } // If class will be subclassed by some framework then it could apply some specific requirements for methods visibility // so we just skip it here (IDEA-182709, IDEA-160602) - for (ImplicitSubclassProvider subclassProvider : ImplicitSubclassProvider.EP_NAME.getExtensions()) { + for (ImplicitSubclassProvider subclassProvider : ImplicitSubclassProvider.EP_NAME.getExtensionList()) { if (!subclassProvider.isApplicableTo(memberClass)) continue; ImplicitSubclassProvider.SubclassingInfo info = subclassProvider.getSubclassingInfo(memberClass); if (info == null) continue; diff --git a/java/java-analysis-impl/src/com/intellij/codeInspection/visibility/VisibilityInspection.java b/java/java-analysis-impl/src/com/intellij/codeInspection/visibility/VisibilityInspection.java index f8ecf9c67eb9..edc55cc1bfb1 100644 --- a/java/java-analysis-impl/src/com/intellij/codeInspection/visibility/VisibilityInspection.java +++ b/java/java-analysis-impl/src/com/intellij/codeInspection/visibility/VisibilityInspection.java @@ -62,7 +62,7 @@ public final class VisibilityInspection extends GlobalJavaBatchInspectionTool { checkbox("SUGGEST_PRIVATE_FOR_INNERS", JavaAnalysisBundle.message("inspection.visibility.private.inner.members")), checkbox("SUGGEST_FOR_CONSTANTS", JavaAnalysisBundle.message("inspection.visibility.option.constants")) )); - for (EntryPoint entryPoint : EntryPointsManagerBase.DEAD_CODE_EP_NAME.getExtensions()) { + for (EntryPoint entryPoint : EntryPointsManagerBase.DEAD_CODE_EP_NAME.getExtensionList()) { if (entryPoint instanceof EntryPointWithVisibilityLevel epWithLevel) { checkboxes.add(checkbox(epWithLevel.getId(), epWithLevel.getTitle()).prefix("ep")); } @@ -213,7 +213,7 @@ public final class VisibilityInspection extends GlobalJavaBatchInspectionTool { @EntryPointWithVisibilityLevel.VisibilityLevelResult int getMinVisibilityLevel(@NotNull PsiMember member) { //noinspection MagicConstant - return StreamEx.of(EntryPointsManagerBase.DEAD_CODE_EP_NAME.getExtensions()) + return StreamEx.of(EntryPointsManagerBase.DEAD_CODE_EP_NAME.getExtensionList()) .select(EntryPointWithVisibilityLevel.class) .filter(point -> isEntryPointEnabled(point)) .mapToInt(point -> point.getMinVisibilityLevel(member)) diff --git a/java/java-analysis-impl/src/com/intellij/psi/util/PropertyAccessorDetector.java b/java/java-analysis-impl/src/com/intellij/psi/util/PropertyAccessorDetector.java index ee97fafed0ac..d8195babf6f6 100644 --- a/java/java-analysis-impl/src/com/intellij/psi/util/PropertyAccessorDetector.java +++ b/java/java-analysis-impl/src/com/intellij/psi/util/PropertyAccessorDetector.java @@ -12,7 +12,7 @@ public interface PropertyAccessorDetector { ExtensionPointName EP_NAME = ExtensionPointName.create("com.intellij.propertyAccessorDetector"); static @Nullable PropertyAccessorInfo detectFrom(@NotNull PsiMethod method) { - for (PropertyAccessorDetector detector : EP_NAME.getExtensions()) { + for (PropertyAccessorDetector detector : EP_NAME.getExtensionList()) { PropertyAccessorInfo accessorInfo = detector.detectPropertyAccessor(method); if (accessorInfo != null) { return accessorInfo; diff --git a/java/java-analysis-impl/src/com/siyeh/ig/psiutils/InheritanceUtil.java b/java/java-analysis-impl/src/com/siyeh/ig/psiutils/InheritanceUtil.java index e3c9d283e619..16ab07dc99be 100644 --- a/java/java-analysis-impl/src/com/siyeh/ig/psiutils/InheritanceUtil.java +++ b/java/java-analysis-impl/src/com/siyeh/ig/psiutils/InheritanceUtil.java @@ -122,7 +122,7 @@ public final class InheritanceUtil { } public static boolean hasImplementation(@NotNull PsiClass aClass) { - for (ImplicitSubclassProvider provider : ImplicitSubclassProvider.EP_NAME.getExtensions()) { + for (ImplicitSubclassProvider provider : ImplicitSubclassProvider.EP_NAME.getExtensionList()) { if (!provider.isApplicableTo(aClass)) { continue; } diff --git a/java/java-analysis-impl/src/com/siyeh/ig/psiutils/TestUtils.java b/java/java-analysis-impl/src/com/siyeh/ig/psiutils/TestUtils.java index 1dfd438018f9..1a4d01f87782 100644 --- a/java/java-analysis-impl/src/com/siyeh/ig/psiutils/TestUtils.java +++ b/java/java-analysis-impl/src/com/siyeh/ig/psiutils/TestUtils.java @@ -184,7 +184,7 @@ public final class TestUtils { Module classModule = containingClass.isValid() ? ModuleUtilCore.findModuleForPsiElement(containingClass) : null; if (classModule == null) return false; final GlobalSearchScope globalSearchScope = GlobalSearchScope.moduleRuntimeScope(classModule, true); - for (PropertiesProvider provider : PropertiesProvider.EP_NAME.getExtensions()) { + for (PropertiesProvider provider : PropertiesProvider.EP_NAME.getExtensionList()) { if ("PER_CLASS".equalsIgnoreCase(provider.getPropertyValue(PER_CLASS_PROPERTY_KEY, globalSearchScope))) return true; } return false; diff --git a/java/java-analysis-impl/src/com/siyeh/ig/psiutils/UtilityClassUtil.java b/java/java-analysis-impl/src/com/siyeh/ig/psiutils/UtilityClassUtil.java index b8e7c4961c05..5b39a4dabb8a 100644 --- a/java/java-analysis-impl/src/com/siyeh/ig/psiutils/UtilityClassUtil.java +++ b/java/java-analysis-impl/src/com/siyeh/ig/psiutils/UtilityClassUtil.java @@ -64,7 +64,7 @@ public final class UtilityClassUtil { return false; } if (fullCheck) { - for (ImplicitSubclassProvider subclassProvider : ImplicitSubclassProvider.EP_NAME.getExtensions()) { + for (ImplicitSubclassProvider subclassProvider : ImplicitSubclassProvider.EP_NAME.getExtensionList()) { if (subclassProvider.isApplicableTo(aClass) && subclassProvider.getSubclassingInfo(aClass) != null) { return false; } diff --git a/java/java-impl-inspections/src/com/intellij/codeInspection/DefaultAnnotationParamInspection.java b/java/java-impl-inspections/src/com/intellij/codeInspection/DefaultAnnotationParamInspection.java index f51e7256deec..0fe4dc01197c 100644 --- a/java/java-impl-inspections/src/com/intellij/codeInspection/DefaultAnnotationParamInspection.java +++ b/java/java-impl-inspections/src/com/intellij/codeInspection/DefaultAnnotationParamInspection.java @@ -55,7 +55,7 @@ public class DefaultAnnotationParamInspection extends AbstractBaseJavaLocalInspe if (elementParent instanceof PsiClass) { final String qualifiedName = ((PsiClass)elementParent).getQualifiedName(); final String name = ((PsiAnnotationMethod)element).getName(); - if (ContainerUtil.exists(IgnoreAnnotationParamSupport.EP_NAME.getExtensions(), + if (ContainerUtil.exists(IgnoreAnnotationParamSupport.EP_NAME.getExtensionList(), ext -> ext.ignoreAnnotationParam(qualifiedName, name))) { return; } diff --git a/java/java-impl/src/com/intellij/codeInsight/completion/CheckInitialized.java b/java/java-impl/src/com/intellij/codeInsight/completion/CheckInitialized.java index 4fc25baa325d..c9d1e7753197 100644 --- a/java/java-impl/src/com/intellij/codeInsight/completion/CheckInitialized.java +++ b/java/java-impl/src/com/intellij/codeInsight/completion/CheckInitialized.java @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2016 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.codeInsight.completion; import com.intellij.codeInsight.ExpressionUtil; @@ -49,7 +35,7 @@ class CheckInitialized implements ElementFilter { private static boolean isInitializedImplicitly(PsiField field) { field = CompletionUtil.getOriginalOrSelf(field); - for(ImplicitUsageProvider provider: ImplicitUsageProvider.EP_NAME.getExtensions()) { + for(ImplicitUsageProvider provider: ImplicitUsageProvider.EP_NAME.getExtensionList()) { if (provider.isImplicitWrite(field)) { return true; } diff --git a/java/java-impl/src/com/intellij/codeInsight/externalAnnotation/location/AnnotationsLocationSearcher.kt b/java/java-impl/src/com/intellij/codeInsight/externalAnnotation/location/AnnotationsLocationSearcher.kt index cf18e0835cae..472c0240761b 100644 --- a/java/java-impl/src/com/intellij/codeInsight/externalAnnotation/location/AnnotationsLocationSearcher.kt +++ b/java/java-impl/src/com/intellij/codeInsight/externalAnnotation/location/AnnotationsLocationSearcher.kt @@ -1,4 +1,4 @@ -// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.codeInsight.externalAnnotation.location import com.intellij.openapi.project.Project @@ -14,7 +14,7 @@ class AnnotationsLocationSearcher { artifactId: String?, groupId: String?, version: String?): Collection { - return AnnotationsLocationProvider.EP_NAME.extensions.flatMap { it.getLocations(project, library, artifactId, groupId, version) } + return AnnotationsLocationProvider.EP_NAME.extensionList.flatMap { it.getLocations(project, library, artifactId, groupId, version) } } } } \ No newline at end of file diff --git a/java/java-impl/src/com/intellij/codeInsight/javadoc/DocumentationDelegateProvider.java b/java/java-impl/src/com/intellij/codeInsight/javadoc/DocumentationDelegateProvider.java index 02067652f0cd..2053f5efac81 100644 --- a/java/java-impl/src/com/intellij/codeInsight/javadoc/DocumentationDelegateProvider.java +++ b/java/java-impl/src/com/intellij/codeInsight/javadoc/DocumentationDelegateProvider.java @@ -1,4 +1,4 @@ -// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.codeInsight.javadoc; import com.intellij.openapi.extensions.ExtensionPointName; @@ -49,7 +49,7 @@ public abstract class DocumentationDelegateProvider { @Nullable public static PsiDocCommentOwner findDocumentationDelegate(@NotNull PsiMember method) { - for (DocumentationDelegateProvider delegator : EP_NAME.getExtensions()) { + for (DocumentationDelegateProvider delegator : EP_NAME.getExtensionList()) { PsiDocCommentOwner type = delegator.computeDocumentationDelegate(method); if (type != null) { return type; diff --git a/java/java-impl/src/com/intellij/codeInsight/template/macro/VariableTypeCalculator.java b/java/java-impl/src/com/intellij/codeInsight/template/macro/VariableTypeCalculator.java index 14901ec03d39..56879795ccf9 100644 --- a/java/java-impl/src/com/intellij/codeInsight/template/macro/VariableTypeCalculator.java +++ b/java/java-impl/src/com/intellij/codeInsight/template/macro/VariableTypeCalculator.java @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2011 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.codeInsight.template.macro; import com.intellij.openapi.extensions.ExtensionPointName; @@ -40,7 +26,7 @@ public abstract class VariableTypeCalculator { */ @NotNull public static PsiType getVarTypeAt(@NotNull PsiVariable var, @NotNull PsiElement place) { - for (VariableTypeCalculator calculator : EP_NAME.getExtensions()) { + for (VariableTypeCalculator calculator : EP_NAME.getExtensionList()) { final PsiType type = calculator.inferVarTypeAt(var, place); if (type != null) return type; } diff --git a/java/java-impl/src/com/intellij/ide/hierarchy/call/CallerMethodsTreeStructure.java b/java/java-impl/src/com/intellij/ide/hierarchy/call/CallerMethodsTreeStructure.java index e240f16c97f8..5fefc7dbed73 100644 --- a/java/java-impl/src/com/intellij/ide/hierarchy/call/CallerMethodsTreeStructure.java +++ b/java/java-impl/src/com/intellij/ide/hierarchy/call/CallerMethodsTreeStructure.java @@ -110,7 +110,7 @@ public final class CallerMethodsTreeStructure extends HierarchyTreeStructure { // ignore impossible candidates. E.g. when A < B,A < C and we invoked call hierarchy for method in C we should filter out methods in B because B and C are assignment-incompatible return true; } - for (CallReferenceProcessor processor : CallReferenceProcessor.EP_NAME.getExtensions()) { + for (CallReferenceProcessor processor : CallReferenceProcessor.EP_NAME.getExtensionList()) { if (!processor.process(reference, data)) break; } return true; diff --git a/java/java-impl/src/com/intellij/lang/java/request/createFieldFromUsage.kt b/java/java-impl/src/com/intellij/lang/java/request/createFieldFromUsage.kt index e3ebd603689c..10cdf4f57c55 100644 --- a/java/java-impl/src/com/intellij/lang/java/request/createFieldFromUsage.kt +++ b/java/java-impl/src/com/intellij/lang/java/request/createFieldFromUsage.kt @@ -1,4 +1,4 @@ -// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. @file:JvmName("CreateFieldFromUsage") package com.intellij.lang.java.request @@ -23,7 +23,7 @@ import com.intellij.psi.util.parentOfType fun generateActions(ref: PsiReferenceExpression): List { if (!checkReference(ref)) return emptyList() val fieldRequests = CreateFieldRequests(ref).collectRequests() - val extensions = EP_NAME.extensions + val extensions = EP_NAME.extensionList return fieldRequests.flatMap { (clazz, request) -> extensions.flatMap { ext -> ext.createAddFieldActions(clazz, request) diff --git a/java/java-impl/src/com/intellij/openapi/roots/LibraryDependencyScopeSuggester.java b/java/java-impl/src/com/intellij/openapi/roots/LibraryDependencyScopeSuggester.java index b0cb22fb47d2..caa0cb8ce3d5 100644 --- a/java/java-impl/src/com/intellij/openapi/roots/LibraryDependencyScopeSuggester.java +++ b/java/java-impl/src/com/intellij/openapi/roots/LibraryDependencyScopeSuggester.java @@ -1,4 +1,4 @@ -// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.openapi.roots; import com.intellij.openapi.extensions.ExtensionPointName; @@ -25,7 +25,7 @@ public abstract class LibraryDependencyScopeSuggester { @NotNull public static DependencyScope getDefaultScope(@NotNull Library library) { - for (LibraryDependencyScopeSuggester suggester : EP_NAME.getExtensions()) { + for (LibraryDependencyScopeSuggester suggester : EP_NAME.getExtensionList()) { DependencyScope scope = suggester.getDefaultDependencyScope(library); if (scope != null) { return scope; diff --git a/java/java-impl/src/com/intellij/refactoring/chainCall/ChainCallExtractor.java b/java/java-impl/src/com/intellij/refactoring/chainCall/ChainCallExtractor.java index 6d4a198e0f91..7b949ccc5b1e 100644 --- a/java/java-impl/src/com/intellij/refactoring/chainCall/ChainCallExtractor.java +++ b/java/java-impl/src/com/intellij/refactoring/chainCall/ChainCallExtractor.java @@ -1,4 +1,4 @@ -// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.refactoring.chainCall; import com.intellij.codeInspection.LambdaCanBeMethodReferenceInspection; @@ -111,7 +111,7 @@ public interface ChainCallExtractor { } PsiMethodCallExpression call = tryCast(args.getParent(), PsiMethodCallExpression.class); if (call == null) return null; - for(ChainCallExtractor extractor : KEY.getExtensions()) { + for(ChainCallExtractor extractor : KEY.getExtensionList()) { if(extractor.canExtractChainCall(call, expression, targetType) && StringUtil.isNotEmpty(extractor.getMethodName(parameter, expression, targetType))) { return extractor; diff --git a/java/java-impl/src/com/intellij/testIntegration/createTest/CreateTestDialog.java b/java/java-impl/src/com/intellij/testIntegration/createTest/CreateTestDialog.java index 02dab73380c0..d5b5b3ea2da8 100644 --- a/java/java-impl/src/com/intellij/testIntegration/createTest/CreateTestDialog.java +++ b/java/java-impl/src/com/intellij/testIntegration/createTest/CreateTestDialog.java @@ -1,4 +1,4 @@ -// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.testIntegration.createTest; import com.intellij.CommonBundle; @@ -113,7 +113,7 @@ public class CreateTestDialog extends DialogWrapper { return false; } - for (TestFramework framework : TestFramework.EXTENSION_NAME.getExtensions()) { + for (TestFramework framework : TestFramework.EXTENSION_NAME.getExtensionList()) { if (superClass.equals(framework.getDefaultSuperClass())) { return false; } diff --git a/java/java-impl/src/com/intellij/unscramble/UnscrambleDialog.java b/java/java-impl/src/com/intellij/unscramble/UnscrambleDialog.java index 0ae6ff1c3f5c..ef8a20c8fc28 100644 --- a/java/java-impl/src/com/intellij/unscramble/UnscrambleDialog.java +++ b/java/java-impl/src/com/intellij/unscramble/UnscrambleDialog.java @@ -1,4 +1,4 @@ -// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.unscramble; import com.intellij.execution.ui.RunContentDescriptor; @@ -169,7 +169,7 @@ public class UnscrambleDialog extends DialogWrapper { private UnscrambleSupport getSavedUnscrambler() { final String savedUnscramblerName = getPropertyValue(PROPERTY_UNSCRAMBLER_NAME_USED); UnscrambleSupport selectedUnscrambler = null; - for (UnscrambleSupport unscrambleSupport : UnscrambleSupport.EP_NAME.getExtensions()) { + for (UnscrambleSupport unscrambleSupport : UnscrambleSupport.EP_NAME.getExtensionList()) { if (Comparing.strEqual(unscrambleSupport.getPresentableName(), savedUnscramblerName)) { selectedUnscrambler = unscrambleSupport; } @@ -229,7 +229,7 @@ public class UnscrambleDialog extends DialogWrapper { } private void populateRegisteredUnscramblerList() { - for (UnscrambleSupport unscrambleSupport : UnscrambleSupport.EP_NAME.getExtensions()) { + for (UnscrambleSupport unscrambleSupport : UnscrambleSupport.EP_NAME.getExtensionList()) { myUnscrambleChooser.addItem(unscrambleSupport); } myUnscrambleChooser.setRenderer(SimpleListCellRenderer.create( diff --git a/java/java-psi-api/src/com/intellij/codeInsight/ImportFilter.java b/java/java-psi-api/src/com/intellij/codeInsight/ImportFilter.java index 1fc48c964e3f..17daab126df6 100644 --- a/java/java-psi-api/src/com/intellij/codeInsight/ImportFilter.java +++ b/java/java-psi-api/src/com/intellij/codeInsight/ImportFilter.java @@ -1,3 +1,4 @@ +// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.codeInsight; import com.intellij.openapi.extensions.ExtensionPointName; @@ -18,7 +19,7 @@ public abstract class ImportFilter { public abstract boolean shouldUseFullyQualifiedName(@NotNull PsiFile targetFile, @NotNull String classQualifiedName); public static boolean shouldImport(@NotNull PsiFile targetFile, @NotNull String classQualifiedName) { - for (ImportFilter filter : EP_NAME.getExtensions()) { + for (ImportFilter filter : EP_NAME.getExtensionList()) { if (filter.shouldUseFullyQualifiedName(targetFile, classQualifiedName)) { return false; } diff --git a/java/java-psi-api/src/com/intellij/psi/JavaCompilerConfigurationProxy.java b/java/java-psi-api/src/com/intellij/psi/JavaCompilerConfigurationProxy.java index 02db6c0b3699..42ea54163d9d 100644 --- a/java/java-psi-api/src/com/intellij/psi/JavaCompilerConfigurationProxy.java +++ b/java/java-psi-api/src/com/intellij/psi/JavaCompilerConfigurationProxy.java @@ -43,9 +43,11 @@ public abstract class JavaCompilerConfigurationProxy { } public static void setAdditionalOptions(@NotNull Project project, @NotNull Module module, @NotNull List options) { - JavaCompilerConfigurationProxy[] extensions = EP_NAME.getExtensions(); - if (extensions.length == 0) return; - extensions[0].setAdditionalOptionsImpl(project, module, options); + List extensions = EP_NAME.getExtensionList(); + if (extensions.isEmpty()) { + return; + } + extensions.get(0).setAdditionalOptionsImpl(project, module, options); } /** diff --git a/java/java-tests/testSrc/com/intellij/java/codeInspection/Java9UnusedServiceImplementationsTest.kt b/java/java-tests/testSrc/com/intellij/java/codeInspection/Java9UnusedServiceImplementationsTest.kt index 141b0f412351..7604d18ee3d9 100644 --- a/java/java-tests/testSrc/com/intellij/java/codeInspection/Java9UnusedServiceImplementationsTest.kt +++ b/java/java-tests/testSrc/com/intellij/java/codeInspection/Java9UnusedServiceImplementationsTest.kt @@ -1,4 +1,4 @@ -// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.java.codeInspection import com.intellij.codeInspection.ex.EntryPointsManagerBase @@ -86,7 +86,7 @@ class Java9UnusedServiceImplementationsTest : LightJava9ModulesCodeInsightFixtur else addFile("my/ext/MyServiceExt.java", implText, EXT) - val moduleEntryPoint = EntryPointsManagerBase.DEAD_CODE_EP_NAME.extensions.find { it is Java9ModuleEntryPoint } + val moduleEntryPoint = EntryPointsManagerBase.DEAD_CODE_EP_NAME.extensionList.find { it is Java9ModuleEntryPoint } val wasSelected = moduleEntryPoint?.isSelected ?: true try { diff --git a/java/openapi/src/org/jetbrains/idea/maven/utils/library/RepositoryLibraryDescription.java b/java/openapi/src/org/jetbrains/idea/maven/utils/library/RepositoryLibraryDescription.java index 7d45d4a5a92c..3231c9c1622a 100644 --- a/java/openapi/src/org/jetbrains/idea/maven/utils/library/RepositoryLibraryDescription.java +++ b/java/openapi/src/org/jetbrains/idea/maven/utils/library/RepositoryLibraryDescription.java @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package org.jetbrains.idea.maven.utils.library; import com.intellij.codeInsight.CodeInsightBundle; @@ -20,7 +6,6 @@ import com.intellij.jarRepository.RepositoryLibraryDefinition; import com.intellij.openapi.roots.DependencyScope; import com.intellij.openapi.util.NlsContexts; import com.intellij.openapi.util.NlsSafe; -import com.intellij.ui.LayeredIcon; import com.intellij.util.containers.ContainerUtil; import icons.OpenapiIcons; import org.jetbrains.annotations.NonNls; @@ -81,7 +66,7 @@ public class RepositoryLibraryDescription { String bindToRemoteRepository, boolean sha256sumCheckEnabled) { if (ourStaticallyDefinedLibraries == null) { final HashMap map = new HashMap<>(); - for (RepositoryLibraryDefinition def : RepositoryLibraryDefinition.EP_NAME.getExtensions()) { + for (RepositoryLibraryDefinition def : RepositoryLibraryDefinition.EP_NAME.getExtensionList()) { final String id = def.groupId + ":" + def.artifactId; map.put(id, new RepositoryLibraryDescription(def.groupId, def.artifactId, def.name)); } diff --git a/notebooks/visualization/src/org/jetbrains/plugins/notebooks/visualization/NotebookEditorAppearanceProvider.kt b/notebooks/visualization/src/org/jetbrains/plugins/notebooks/visualization/NotebookEditorAppearanceProvider.kt index e8661cb395c6..f565c3d2fc81 100644 --- a/notebooks/visualization/src/org/jetbrains/plugins/notebooks/visualization/NotebookEditorAppearanceProvider.kt +++ b/notebooks/visualization/src/org/jetbrains/plugins/notebooks/visualization/NotebookEditorAppearanceProvider.kt @@ -16,7 +16,7 @@ interface NotebookEditorAppearanceProvider { val EP_NAME = ExtensionPointName.create(ID) fun create(editor: Editor): NotebookEditorAppearance? = - EP_NAME.extensions.asSequence().mapNotNull { it.create(editor) }.firstOrNull() + EP_NAME.extensionList.asSequence().mapNotNull { it.create(editor) }.firstOrNull() fun install(editor: Editor) { NOTEBOOK_APPEARANCE_KEY.set(editor, create(editor)!!) diff --git a/platform/analysis-api/src/com/intellij/psi/injection/ReferenceInjector.java b/platform/analysis-api/src/com/intellij/psi/injection/ReferenceInjector.java index 8b9e969114fd..93e1513e009f 100644 --- a/platform/analysis-api/src/com/intellij/psi/injection/ReferenceInjector.java +++ b/platform/analysis-api/src/com/intellij/psi/injection/ReferenceInjector.java @@ -30,6 +30,6 @@ public abstract class ReferenceInjector extends Injectable { public abstract PsiReference @NotNull [] getReferences(@NotNull PsiElement element, final @NotNull ProcessingContext context, @NotNull TextRange range); public static ReferenceInjector findById(@NotNull String id) { - return ContainerUtil.find(EXTENSION_POINT_NAME.getExtensions(), injector -> id.equals(injector.getId())); + return ContainerUtil.find(EXTENSION_POINT_NAME.getExtensionList(), injector -> id.equals(injector.getId())); } } diff --git a/platform/built-in-server/src/org/jetbrains/builtInWebServer/WebServerPathToFileManager.kt b/platform/built-in-server/src/org/jetbrains/builtInWebServer/WebServerPathToFileManager.kt index 915866f2fca2..d933cbed812b 100644 --- a/platform/built-in-server/src/org/jetbrains/builtInWebServer/WebServerPathToFileManager.kt +++ b/platform/built-in-server/src/org/jetbrains/builtInWebServer/WebServerPathToFileManager.kt @@ -1,4 +1,4 @@ -// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package org.jetbrains.builtInWebServer import com.github.benmanes.caffeine.cache.CacheLoader @@ -73,7 +73,7 @@ class WebServerPathToFileManager(private val project: Project) { for (event in events) { if (event is VFileContentChangeEvent) { val file = event.file - for (rootsProvider in WebServerRootsProvider.EP_NAME.extensions) { + for (rootsProvider in WebServerRootsProvider.EP_NAME.extensionList) { if (rootsProvider.isClearCacheOnFileContentChanged(file)) { clearCache() break diff --git a/platform/code-style-impl/src/com/intellij/psi/impl/source/PostprocessReformattingAspectImpl.java b/platform/code-style-impl/src/com/intellij/psi/impl/source/PostprocessReformattingAspectImpl.java index 4788b5486544..ae032631b1e5 100644 --- a/platform/code-style-impl/src/com/intellij/psi/impl/source/PostprocessReformattingAspectImpl.java +++ b/platform/code-style-impl/src/com/intellij/psi/impl/source/PostprocessReformattingAspectImpl.java @@ -639,7 +639,7 @@ public final class PostprocessReformattingAspectImpl extends PostprocessReformat private static Iterable getEnabledRanges(@NotNull PsiElement element) { List disabledRanges = new ArrayList<>(); - for (DisabledIndentRangesProvider rangesProvider : DisabledIndentRangesProvider.EP_NAME.getExtensions()) { + for (DisabledIndentRangesProvider rangesProvider : DisabledIndentRangesProvider.EP_NAME.getExtensionList()) { Collection providedDisabledRanges = rangesProvider.getDisabledIndentRanges(element); if (providedDisabledRanges != null) { disabledRanges.addAll(providedDisabledRanges); diff --git a/platform/code-style-impl/src/com/intellij/psi/impl/source/codeStyle/CodeFormatterFacade.java b/platform/code-style-impl/src/com/intellij/psi/impl/source/codeStyle/CodeFormatterFacade.java index 042578fac142..f9921adc54d6 100644 --- a/platform/code-style-impl/src/com/intellij/psi/impl/source/codeStyle/CodeFormatterFacade.java +++ b/platform/code-style-impl/src/com/intellij/psi/impl/source/codeStyle/CodeFormatterFacade.java @@ -371,7 +371,7 @@ public final class CodeFormatterFacade { private static boolean shouldDelegateToTopLevel(@NotNull PsiFile file) { - for (var provider: InjectedFormattingOptionsProvider.EP_NAME.getExtensions()) { + for (var provider: InjectedFormattingOptionsProvider.EP_NAME.getExtensionList()) { var result = provider.shouldDelegateToTopLevel(file); if (result == null) continue; return result; diff --git a/platform/core-impl/src/com/intellij/openapi/editor/impl/DocumentImpl.java b/platform/core-impl/src/com/intellij/openapi/editor/impl/DocumentImpl.java index f2ac5c30de49..5aa83dc797fb 100644 --- a/platform/core-impl/src/com/intellij/openapi/editor/impl/DocumentImpl.java +++ b/platform/core-impl/src/com/intellij/openapi/editor/impl/DocumentImpl.java @@ -276,7 +276,7 @@ public final class DocumentImpl extends UserDataHolderBase implements DocumentEx } List filters = new ArrayList<>(); StripTrailingSpacesFilter specialFilter = null; - for (StripTrailingSpacesFilterFactory filterFactory : StripTrailingSpacesFilterFactory.EXTENSION_POINT.getExtensions()) { + for (StripTrailingSpacesFilterFactory filterFactory : StripTrailingSpacesFilterFactory.EXTENSION_POINT.getExtensionList()) { StripTrailingSpacesFilter filter = filterFactory.createFilter(project, this); if (specialFilter == null && (filter == StripTrailingSpacesFilter.NOT_ALLOWED || filter == StripTrailingSpacesFilter.POSTPONED)) { diff --git a/platform/duplicates-analysis/src/com/intellij/dupLocator/equivalence/EquivalenceDescriptorProvider.java b/platform/duplicates-analysis/src/com/intellij/dupLocator/equivalence/EquivalenceDescriptorProvider.java index 6ca9ee6e2d0e..44539941eeca 100644 --- a/platform/duplicates-analysis/src/com/intellij/dupLocator/equivalence/EquivalenceDescriptorProvider.java +++ b/platform/duplicates-analysis/src/com/intellij/dupLocator/equivalence/EquivalenceDescriptorProvider.java @@ -17,22 +17,20 @@ public abstract class EquivalenceDescriptorProvider { public abstract boolean isMyContext(@NotNull PsiElement context); - @Nullable - public abstract EquivalenceDescriptor buildDescriptor(@NotNull PsiElement element); + public abstract @Nullable EquivalenceDescriptor buildDescriptor(@NotNull PsiElement element); // by default only PsiWhitespace ignored public TokenSet getIgnoredTokens() { return TokenSet.EMPTY; } - @Nullable - public static EquivalenceDescriptorProvider getInstance(@NotNull PsiElement context) { + public static @Nullable EquivalenceDescriptorProvider getInstance(@NotNull PsiElement context) { //noinspection TestOnlyProblems if (ourUseDefaultEquivalence) { return null; } - for (EquivalenceDescriptorProvider descriptorProvider : EP_NAME.getExtensions()) { + for (EquivalenceDescriptorProvider descriptorProvider : EP_NAME.getExtensionList()) { if (descriptorProvider.isMyContext(context)) { return descriptorProvider; } diff --git a/platform/editor-ui-api/src/com/intellij/ide/ui/ColorBlindnessSupport.java b/platform/editor-ui-api/src/com/intellij/ide/ui/ColorBlindnessSupport.java index 154fb391da3a..6d2d04ae5a88 100644 --- a/platform/editor-ui-api/src/com/intellij/ide/ui/ColorBlindnessSupport.java +++ b/platform/editor-ui-api/src/com/intellij/ide/ui/ColorBlindnessSupport.java @@ -7,6 +7,7 @@ import org.jetbrains.annotations.Nullable; import java.awt.image.ImageFilter; import java.util.EnumMap; +import java.util.List; /** * This is a base class for plugin extensions supporting color-blindness. @@ -49,8 +50,9 @@ public class ColorBlindnessSupport { } private static void init(EnumMap map, ColorBlindness blindness, String extensionName) { - ColorBlindnessSupport[] extensions = (ColorBlindnessSupport[])Extensions.getRootArea().getExtensionPoint(extensionName) - .getExtensions(); + List + extensions = Extensions.getRootArea().getExtensionPoint(extensionName) + .getExtensionList(); ColorBlindnessSupport support = null; for (ColorBlindnessSupport ext : extensions) { if (support == null) support = ext; diff --git a/platform/editor-ui-api/src/com/intellij/ui/breadcrumbs/BreadcrumbsUtil.java b/platform/editor-ui-api/src/com/intellij/ui/breadcrumbs/BreadcrumbsUtil.java index ccc94c5a68ed..2133a55be8c1 100644 --- a/platform/editor-ui-api/src/com/intellij/ui/breadcrumbs/BreadcrumbsUtil.java +++ b/platform/editor-ui-api/src/com/intellij/ui/breadcrumbs/BreadcrumbsUtil.java @@ -1,13 +1,14 @@ -// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.ui.breadcrumbs; import com.intellij.lang.Language; import org.jetbrains.annotations.NotNull; -public final class BreadcrumbsUtil { +import java.util.List; +public final class BreadcrumbsUtil { public static BreadcrumbsProvider getInfoProvider(@NotNull Language language) { - BreadcrumbsProvider[] providers = BreadcrumbsProvider.EP_NAME.getExtensions(); + List providers = BreadcrumbsProvider.EP_NAME.getExtensionList(); while (language != null) { for (BreadcrumbsProvider provider : providers) { for (Language supported : provider.getLanguages()) { diff --git a/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/project/manage/ExternalSystemKeymapExtension.java b/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/project/manage/ExternalSystemKeymapExtension.java index c093a058011b..041efe1b6f16 100644 --- a/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/project/manage/ExternalSystemKeymapExtension.java +++ b/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/project/manage/ExternalSystemKeymapExtension.java @@ -1,4 +1,4 @@ -// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.openapi.externalSystem.service.project.manage; import com.intellij.execution.ProgramRunnerUtil; @@ -144,7 +144,7 @@ public final class ExternalSystemKeymapExtension implements KeymapExtension { } } - for (ActionsProvider extension : ActionsProvider.EP_NAME.getExtensions()) { + for (ActionsProvider extension : ActionsProvider.EP_NAME.getExtensionList()) { KeymapGroup keymapGroup = extension.createGroup(condition, project); if (isGroupFiltered(condition, keymapGroup)) { result.addGroup(keymapGroup); diff --git a/platform/indexing-api/src/com/intellij/psi/search/searches/DefinitionsScopedSearch.java b/platform/indexing-api/src/com/intellij/psi/search/searches/DefinitionsScopedSearch.java index 037c14105df0..da6df49ec160 100644 --- a/platform/indexing-api/src/com/intellij/psi/search/searches/DefinitionsScopedSearch.java +++ b/platform/indexing-api/src/com/intellij/psi/search/searches/DefinitionsScopedSearch.java @@ -1,4 +1,4 @@ -// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.psi.search.searches; @@ -32,7 +32,7 @@ public final class DefinitionsScopedSearch extends ExtensibleQueryFactory { - for (QueryExecutor executor : DEFINITIONS_SEARCH_EP_NAME.getExtensions()) { + for (QueryExecutor executor : DEFINITIONS_SEARCH_EP_NAME.getExtensionList()) { if (!executor.execute(queryParameters.getElement(), consumer)) return false; } diff --git a/platform/inspect/src/com/intellij/codeInspection/AbstractInspectionCmdlineOptions.java b/platform/inspect/src/com/intellij/codeInspection/AbstractInspectionCmdlineOptions.java index d0c662e3bca6..0cf67c5cc6a9 100644 --- a/platform/inspect/src/com/intellij/codeInspection/AbstractInspectionCmdlineOptions.java +++ b/platform/inspect/src/com/intellij/codeInspection/AbstractInspectionCmdlineOptions.java @@ -1,4 +1,4 @@ -// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.codeInspection; import com.intellij.codeInspection.ex.PlainTextFormatter; @@ -104,14 +104,14 @@ public abstract class AbstractInspectionCmdlineOptions implements InspectionTool final String outputFormat = getOutputFormatProperty(); if (outputFormat != null) { StringBuilder builder = new StringBuilder(); - for (InspectionsReportConverter converter : InspectionsReportConverter.EP_NAME.getExtensions()) { + for (InspectionsReportConverter converter : InspectionsReportConverter.EP_NAME.getExtensionList()) { final String converterFormat = converter.getFormatName(); if (outputFormat.equals(converterFormat)) { builder = null; break; } else { - if (builder.length() != 0) { + if (!builder.isEmpty()) { builder.append(", "); } builder.append(converterFormat); diff --git a/platform/inspect/src/com/intellij/codeInspection/InspectResultsConsumer.java b/platform/inspect/src/com/intellij/codeInspection/InspectResultsConsumer.java index 097ae82b0a77..6936bc65dab7 100644 --- a/platform/inspect/src/com/intellij/codeInspection/InspectResultsConsumer.java +++ b/platform/inspect/src/com/intellij/codeInspection/InspectResultsConsumer.java @@ -1,4 +1,4 @@ -// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.codeInspection; import com.intellij.codeInspection.ex.Tools; @@ -23,7 +23,7 @@ public interface InspectResultsConsumer { static void runConsumers(@NotNull Map tools, @NotNull List inspectionsResults, @NotNull Project project) { - for (InspectResultsConsumer extension : EP_NAME.getExtensions()) { + for (InspectResultsConsumer extension : EP_NAME.getExtensionList()) { extension.consume(tools, inspectionsResults, project); } } diff --git a/platform/inspect/src/com/intellij/codeInspection/InspectionApplicationFactory.java b/platform/inspect/src/com/intellij/codeInspection/InspectionApplicationFactory.java index 846b2c38d9cd..2c28ac4ac15b 100644 --- a/platform/inspect/src/com/intellij/codeInspection/InspectionApplicationFactory.java +++ b/platform/inspect/src/com/intellij/codeInspection/InspectionApplicationFactory.java @@ -1,4 +1,4 @@ -// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.codeInspection; import com.intellij.openapi.extensions.ExtensionPointName; @@ -18,7 +18,7 @@ public interface InspectionApplicationFactory { @NotNull static InspectionApplicationBase getApplication(@NotNull String id, @NotNull List args) throws InspectionApplicationException { - for (InspectionApplicationFactory extension : EP_NAME.getExtensions()) { + for (InspectionApplicationFactory extension : EP_NAME.getExtensionList()) { if (extension.id().equals(id)) { return extension.getApplication(args); } diff --git a/platform/lang-api/src/com/intellij/codeInsight/hints/settings/InlayGroupSettingProvider.kt b/platform/lang-api/src/com/intellij/codeInsight/hints/settings/InlayGroupSettingProvider.kt index 47d783d97259..3aff341c2cdf 100644 --- a/platform/lang-api/src/com/intellij/codeInsight/hints/settings/InlayGroupSettingProvider.kt +++ b/platform/lang-api/src/com/intellij/codeInsight/hints/settings/InlayGroupSettingProvider.kt @@ -1,4 +1,4 @@ -// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.codeInsight.hints.settings import com.intellij.codeInsight.hints.InlayGroup @@ -35,6 +35,6 @@ interface InlayGroupSettingProvider { val EXTENSION_POINT_NAME: ExtensionPointName = ExtensionPointName.create("com.intellij.config.inlayGroupSettingProvider") - fun findForGroup(group: InlayGroup): InlayGroupSettingProvider? = EXTENSION_POINT_NAME.extensions.singleOrNull { it.group == group } + fun findForGroup(group: InlayGroup): InlayGroupSettingProvider? = EXTENSION_POINT_NAME.extensionList.singleOrNull { it.group == group } } } \ No newline at end of file diff --git a/platform/lang-api/src/com/intellij/ide/util/EditSourceUtil.java b/platform/lang-api/src/com/intellij/ide/util/EditSourceUtil.java index d5fb12d4f844..cc50db4a71e2 100644 --- a/platform/lang-api/src/com/intellij/ide/util/EditSourceUtil.java +++ b/platform/lang-api/src/com/intellij/ide/util/EditSourceUtil.java @@ -81,7 +81,7 @@ public final class EditSourceUtil { * Collect original elements from all filters. */ private static PsiElement processAllOriginalElements(@NotNull PsiElement element, @NotNull Function processor) { - for (GeneratedSourcesFilter filter : GeneratedSourcesFilter.EP_NAME.getExtensions()) { + for (GeneratedSourcesFilter filter : GeneratedSourcesFilter.EP_NAME.getExtensionList()) { for (PsiElement originalElement: filter.getOriginalElements(element)) { PsiElement apply = processor.apply(originalElement); if (apply != null) return apply; diff --git a/platform/lang-impl/src/com/intellij/application/options/editor/GutterIconsSearchableOptionContributor.java b/platform/lang-impl/src/com/intellij/application/options/editor/GutterIconsSearchableOptionContributor.java index 9a4544d7e890..79e5dcde0be8 100644 --- a/platform/lang-impl/src/com/intellij/application/options/editor/GutterIconsSearchableOptionContributor.java +++ b/platform/lang-impl/src/com/intellij/application/options/editor/GutterIconsSearchableOptionContributor.java @@ -1,4 +1,4 @@ -// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.application.options.editor; import com.intellij.codeInsight.daemon.LineMarkerProvider; @@ -15,7 +15,7 @@ final class GutterIconsSearchableOptionContributor extends SearchableOptionContr @Override public void processOptions(@NotNull SearchableOptionProcessor processor) { String gutterIconsDisplayName = IdeBundle.message("configurable.GutterIconsConfigurable.display.name"); - for (KeyedLazyInstance extension : LineMarkerProviders.EP_NAME.getExtensions()) { + for (KeyedLazyInstance extension : LineMarkerProviders.EP_NAME.getExtensionList()) { LineMarkerProvider instance = extension.getInstance(); if (instance instanceof LineMarkerProviderDescriptor) { String name = ((LineMarkerProviderDescriptor)instance).getName(); diff --git a/platform/lang-impl/src/com/intellij/codeInsight/hints/settings/InlayHintsSettingsSearchableContributor.kt b/platform/lang-impl/src/com/intellij/codeInsight/hints/settings/InlayHintsSettingsSearchableContributor.kt index 0779f45414d7..53953466385e 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/hints/settings/InlayHintsSettingsSearchableContributor.kt +++ b/platform/lang-impl/src/com/intellij/codeInsight/hints/settings/InlayHintsSettingsSearchableContributor.kt @@ -1,4 +1,4 @@ -// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.codeInsight.hints.settings import com.intellij.codeInsight.codeVision.CodeVisionProvider @@ -37,7 +37,7 @@ private class InlayHintsSettingsSearchableContributor : SearchableOptionContribu PluginException.createByClass("provider: ${provider.key.id}", e, provider.javaClass) } } - InlayParameterHintsExtension.point?.extensions?.flatMap { it.instance.supportedOptions }?.forEach { addOption(processor, it.name, null) } + InlayParameterHintsExtension.point?.extensionList?.flatMap { it.instance.supportedOptions }?.forEach { addOption(processor, it.name, null) } } private fun getId(language: Language) = "inlay.hints." + language.id diff --git a/platform/lang-impl/src/com/intellij/model/psi/impl/references.kt b/platform/lang-impl/src/com/intellij/model/psi/impl/references.kt index 1a65a0a61fdb..20a1c3cd62db 100644 --- a/platform/lang-impl/src/com/intellij/model/psi/impl/references.kt +++ b/platform/lang-impl/src/com/intellij/model/psi/impl/references.kt @@ -78,7 +78,7 @@ private fun referencesInElement(element: PsiElement, offsetInElement: Int): Coll } private fun implicitReference(element: PsiElement, offsetInElement: Int): PsiSymbolReference? { - for (handler in ImplicitReferenceProvider.EP_NAME.extensions) { + for (handler in ImplicitReferenceProvider.EP_NAME.extensionList) { return handler.getImplicitReference(element, offsetInElement) ?: continue } return null diff --git a/platform/new-ui-onboarding/src/com/intellij/platform/ide/newUiOnboarding/NewUiOnboardingService.kt b/platform/new-ui-onboarding/src/com/intellij/platform/ide/newUiOnboarding/NewUiOnboardingService.kt index 1d4d5778dfc7..9f778bcb59ab 100644 --- a/platform/new-ui-onboarding/src/com/intellij/platform/ide/newUiOnboarding/NewUiOnboardingService.kt +++ b/platform/new-ui-onboarding/src/com/intellij/platform/ide/newUiOnboarding/NewUiOnboardingService.kt @@ -37,7 +37,7 @@ internal class NewUiOnboardingService(private val project: Project, private val private fun getSteps(): List> { val stepIds = getStepOrder() - val stepExtensions = NewUiOnboardingStep.EP_NAME.extensions + val stepExtensions = NewUiOnboardingStep.EP_NAME.extensionList return stepIds.mapNotNull { id -> val step = stepExtensions.find { it.key == id }?.instance if (step?.isAvailable() == true) { diff --git a/platform/platform-api/src/com/intellij/ide/browsers/BrowserLauncherAppless.kt b/platform/platform-api/src/com/intellij/ide/browsers/BrowserLauncherAppless.kt index 7e4e99738b7c..e3ea449e9e27 100644 --- a/platform/platform-api/src/com/intellij/ide/browsers/BrowserLauncherAppless.kt +++ b/platform/platform-api/src/com/intellij/ide/browsers/BrowserLauncherAppless.kt @@ -153,7 +153,7 @@ open class BrowserLauncherAppless : BrowserLauncher() { // if a browser is not specified, `UrlOpener` should not be used for non-HTTP(S) URLs val effectiveBrowser = browser ?: getDefaultBrowser() if (effectiveBrowser != null) { - val handled = UrlOpener.EP_NAME.extensions.any { + val handled = UrlOpener.EP_NAME.extensionList.any { LOG.debug { "trying ${it.javaClass}" } it.openUrl(effectiveBrowser, url, project) } diff --git a/platform/platform-impl/src/com/intellij/openapi/options/SchemeImporterEP.java b/platform/platform-impl/src/com/intellij/openapi/options/SchemeImporterEP.java index 224db1a1624c..3ce55efbf5e0 100644 --- a/platform/platform-impl/src/com/intellij/openapi/options/SchemeImporterEP.java +++ b/platform/platform-impl/src/com/intellij/openapi/options/SchemeImporterEP.java @@ -35,7 +35,7 @@ public final class SchemeImporterEP extends SchemeConvertorEP */ public static @NotNull Collection> getExtensions(Class schemeClass) { List> importers = new ArrayList<>(); - for (SchemeImporterEP importerEP : EP_NAME.getExtensions()) { + for (SchemeImporterEP importerEP : EP_NAME.getExtensionList()) { if (schemeClass.getName().equals(importerEP.schemeClass)) { //noinspection unchecked importers.add((SchemeImporterEP)importerEP); diff --git a/platform/platform-util-netty/src/org/jetbrains/io/PortUnificationServerHandler.java b/platform/platform-util-netty/src/org/jetbrains/io/PortUnificationServerHandler.java index ecfdea54a4df..1bbc2b7a739c 100644 --- a/platform/platform-util-netty/src/org/jetbrains/io/PortUnificationServerHandler.java +++ b/platform/platform-util-netty/src/org/jetbrains/io/PortUnificationServerHandler.java @@ -158,7 +158,7 @@ final class PortUnificationServerHandler extends Decoder { } UUID uuid = new UUID(buffer.readLong(), buffer.readLong()); - for (BinaryRequestHandler customHandler : BinaryRequestHandler.EP_NAME.getExtensions()) { + for (BinaryRequestHandler customHandler : BinaryRequestHandler.EP_NAME.getExtensionList()) { if (uuid.equals(customHandler.getId())) { ChannelPipeline pipeline = context.pipeline(); pipeline.addLast(customHandler.getInboundHandler(context)); diff --git a/platform/projectModel-api/src/com/intellij/openapi/module/PrimaryModuleManager.java b/platform/projectModel-api/src/com/intellij/openapi/module/PrimaryModuleManager.java index 32b21680ae0f..8e10d1906989 100644 --- a/platform/projectModel-api/src/com/intellij/openapi/module/PrimaryModuleManager.java +++ b/platform/projectModel-api/src/com/intellij/openapi/module/PrimaryModuleManager.java @@ -1,4 +1,4 @@ -// Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.openapi.module; import com.intellij.openapi.extensions.ExtensionPointName; @@ -34,7 +34,7 @@ public abstract class PrimaryModuleManager { * otherwise use content roots of module to check if it's a main module. */ public static Module findPrimaryModule(@NotNull Project project) { - for (PrimaryModuleManager primaryModuleManager : EP_NAME.getExtensions()) { + for (PrimaryModuleManager primaryModuleManager : EP_NAME.getExtensionList()) { Module primaryModule = primaryModuleManager.getPrimaryModule(project); if (primaryModule != null) { return primaryModule; diff --git a/platform/statistics/src/com/intellij/internal/statistic/service/fus/collectors/FUStateUsagesLogger.kt b/platform/statistics/src/com/intellij/internal/statistic/service/fus/collectors/FUStateUsagesLogger.kt index 16ce6e18b41c..2f09328a916e 100644 --- a/platform/statistics/src/com/intellij/internal/statistic/service/fus/collectors/FUStateUsagesLogger.kt +++ b/platform/statistics/src/com/intellij/internal/statistic/service/fus/collectors/FUStateUsagesLogger.kt @@ -12,7 +12,6 @@ import com.intellij.internal.statistic.eventLog.StatisticsEventLogger import com.intellij.internal.statistic.eventLog.fus.FeatureUsageLogger.logState import com.intellij.internal.statistic.eventLog.fus.FeatureUsageStateEventTracker import com.intellij.internal.statistic.service.fus.collectors.FUStateUsagesLogger.Companion.LOG -import com.intellij.internal.statistic.updater.StatisticsStateCollectorsScheduler import com.intellij.internal.statistic.updater.allowExecution import com.intellij.internal.statistic.utils.StatisticsUploadAssistant import com.intellij.internal.statistic.utils.getPluginInfo @@ -25,7 +24,6 @@ import com.intellij.openapi.project.waitForSmartMode import kotlinx.coroutines.* import kotlinx.coroutines.future.asDeferred import org.jetbrains.annotations.ApiStatus.Internal -import org.jetbrains.concurrency.asDeferred import kotlin.time.Duration.Companion.hours import kotlin.time.Duration.Companion.minutes @@ -248,7 +246,7 @@ class ProjectFUStateUsagesLogger( logProjectState() } - for (extension in FeatureUsageStateEventTracker.EP_NAME.extensions) { + for (extension in FeatureUsageStateEventTracker.EP_NAME.extensionList) { launch { extension.reportNow() } diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/configurable/VcsManagerConfigurable.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/configurable/VcsManagerConfigurable.java index 60349c140a11..9923d3385738 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/configurable/VcsManagerConfigurable.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/configurable/VcsManagerConfigurable.java @@ -1,4 +1,4 @@ -// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.openapi.vcs.configurable; import com.intellij.application.options.colors.fileStatus.FileStatusColorsConfigurable; @@ -86,7 +86,7 @@ public final class VcsManagerConfigurable extends SearchableConfigurable.Parent. result.add(new ChangelistConflictConfigurable(myProject)); result.add(new CommitDialogConfigurable(myProject)); result.add(new ShelfProjectConfigurable(myProject)); - for (VcsConfigurableProvider provider : VcsConfigurableProvider.EP_NAME.getExtensions()) { + for (VcsConfigurableProvider provider : VcsConfigurableProvider.EP_NAME.getExtensionList()) { addIfNotNull(result, provider.getConfigurable(myProject)); } diff --git a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/settings/DebuggerConfigurable.java b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/settings/DebuggerConfigurable.java index 8524a30ff47a..2dbe0f3cd399 100644 --- a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/settings/DebuggerConfigurable.java +++ b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/settings/DebuggerConfigurable.java @@ -1,4 +1,4 @@ -// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.xdebugger.impl.settings; import com.intellij.openapi.options.Configurable; @@ -58,7 +58,7 @@ public class DebuggerConfigurable implements SearchableConfigurable.Parent { List configurables = new SmartList<>(); configurables.add(new DataViewsConfigurable()); - DebuggerConfigurableProvider[] providers = DebuggerConfigurableProvider.EXTENSION_POINT.getExtensions(); + List providers = DebuggerConfigurableProvider.EXTENSION_POINT.getExtensionList(); computeMergedConfigurables(providers, configurables); for (DebuggerConfigurableProvider provider : providers) { @@ -88,7 +88,7 @@ public class DebuggerConfigurable implements SearchableConfigurable.Parent { } } - private static void computeMergedConfigurables(DebuggerConfigurableProvider @NotNull [] providers, @NotNull List result) { + private static void computeMergedConfigurables(List providers, @NotNull List result) { for (DebuggerSettingsCategory category : MERGED_CATEGORIES) { List configurables = getConfigurables(category, providers); if (!configurables.isEmpty()) { @@ -99,8 +99,7 @@ public class DebuggerConfigurable implements SearchableConfigurable.Parent { } } - @Nullable - private MergedCompositeConfigurable computeGeneralConfigurables(DebuggerConfigurableProvider @NotNull [] providers) { + private @Nullable MergedCompositeConfigurable computeGeneralConfigurables(List providers) { List rootConfigurables = getConfigurables(DebuggerSettingsCategory.GENERAL, providers); if (rootConfigurables.isEmpty()) { return null; @@ -154,19 +153,16 @@ public class DebuggerConfigurable implements SearchableConfigurable.Parent { } @Override - @NotNull - @NonNls - public String getId() { + public @NotNull @NonNls String getId() { return "project.propDebugger"; } - @NotNull - static List getConfigurables(@NotNull DebuggerSettingsCategory category) { - return getConfigurables(category, DebuggerConfigurableProvider.EXTENSION_POINT.getExtensions()); + static @NotNull List getConfigurables(@NotNull DebuggerSettingsCategory category) { + return getConfigurables(category, DebuggerConfigurableProvider.EXTENSION_POINT.getExtensionList()); } - @NotNull - private static List getConfigurables(@NotNull DebuggerSettingsCategory category, DebuggerConfigurableProvider @NotNull [] providers) { + private static @NotNull List getConfigurables(@NotNull DebuggerSettingsCategory category, + List providers) { List configurables = null; for (DebuggerConfigurableProvider provider : providers) { Collection providerConfigurables = provider.getConfigurables(category); @@ -188,8 +184,7 @@ public class DebuggerConfigurable implements SearchableConfigurable.Parent { }; } - @Nls - public static String getDisplayNameText() { + public static @Nls String getDisplayNameText() { return XDebuggerBundle.message("debugger.configurable.display.name"); } } diff --git a/plugins/ByteCodeViewer/src/com/intellij/byteCodeViewer/ByteCodeViewerManager.java b/plugins/ByteCodeViewer/src/com/intellij/byteCodeViewer/ByteCodeViewerManager.java index 43407aa0fb80..4162c0317d03 100644 --- a/plugins/ByteCodeViewer/src/com/intellij/byteCodeViewer/ByteCodeViewerManager.java +++ b/plugins/ByteCodeViewer/src/com/intellij/byteCodeViewer/ByteCodeViewerManager.java @@ -1,4 +1,4 @@ -// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.byteCodeViewer; import com.intellij.codeInsight.documentation.DockablePopupManager; @@ -254,7 +254,7 @@ public final class ByteCodeViewerManager extends DockablePopupManager { @Suppress("DEPRECATION") - val fromDeprecatedEP = project.extensionArea.getExtensionPoint(ScriptTemplatesProvider.EP_NAME).extensions.toList() + val fromDeprecatedEP = project.extensionArea.getExtensionPoint(ScriptTemplatesProvider.EP_NAME).extensionList .map { ScriptTemplatesProviderAdapter(it).asSource() } - val fromNewEp = ScriptDefinitionContributor.EP_NAME.getPoint(project).extensions.toList() + val fromNewEp = ScriptDefinitionContributor.EP_NAME.getPoint(project).extensionList .map { it.asSource() } return fromNewEp.dropLast(1) + fromDeprecatedEP + fromNewEp.last() }