mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-05 08:06:56 +07:00
IJPL-310 mark extensions as obsolete (part 11)
GitOrigin-RevId: ef915fa2bf11f9fbcdf9ebbf80bc553129314335
This commit is contained in:
committed by
intellij-monorepo-bot
parent
4c010ba621
commit
69fc441f6e
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
@@ -207,7 +207,7 @@ public final class CompileDriver {
|
||||
private List<TargetTypeBuildScope> mergeScopesFromProviders(CompileScope scope,
|
||||
List<TargetTypeBuildScope> scopes,
|
||||
boolean forceBuild) {
|
||||
for (BuildTargetScopeProvider provider : BuildTargetScopeProvider.EP_NAME.getExtensions()) {
|
||||
for (BuildTargetScopeProvider provider : BuildTargetScopeProvider.EP_NAME.getExtensionList()) {
|
||||
List<TargetTypeBuildScope> providerScopes = ReadAction.compute(
|
||||
() -> myProject.isDisposed() ? Collections.emptyList()
|
||||
: provider.getBuildTargetScopes(scope, myProject, forceBuild));
|
||||
|
||||
@@ -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<String> moduleNames) {
|
||||
List<TargetTypeBuildScope> 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));
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ public class CompilerUIConfigurable implements SearchableConfigurable, Configura
|
||||
}
|
||||
|
||||
private void tweakControls(@NotNull Project project) {
|
||||
CompilerOptionsFilter[] managers = CompilerOptionsFilter.EP_NAME.getExtensions();
|
||||
List<CompilerOptionsFilter> managers = CompilerOptionsFilter.EP_NAME.getExtensionList();
|
||||
boolean showExternalBuildSetting = true;
|
||||
for (CompilerOptionsFilter manager : managers) {
|
||||
showExternalBuildSetting = manager.isAvailable(Setting.EXTERNAL_BUILD, project);
|
||||
|
||||
@@ -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<DirectoryCopyPackagingElement> DIRECTORY_COPY_ELEMENT_TYPE = new DirectoryCopyElementType();
|
||||
public static final PackagingElementType<ExtractedDirectoryPackagingElement> EXTRACTED_DIRECTORY_ELEMENT_TYPE = new ExtractedDirectoryElementType();
|
||||
public static final PackagingElementType<ArtifactRootElement<?>> ARTIFACT_ROOT_ELEMENT_TYPE = new ArtifactRootElementType();
|
||||
private static final PackagingElementType[] STANDARD_TYPES = {
|
||||
private static final List<PackagingElementType<?>> 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<PackagingElementType> 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('/');
|
||||
|
||||
@@ -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<String> outputUrls = new SmartList<>();
|
||||
|
||||
@@ -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<PackagingElementType> getAllElementTypes();
|
||||
|
||||
public abstract ComplexPackagingElementType<?> @NotNull [] getComplexElementTypes();
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ public final class ErrorFixExtensionPoint implements PluginAware {
|
||||
private static Map<String, List<ErrorFixExtensionPoint>> getCodeToFixMap() {
|
||||
Map<String, List<ErrorFixExtensionPoint>> 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;
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -12,7 +12,7 @@ public interface PropertyAccessorDetector {
|
||||
ExtensionPointName<PropertyAccessorDetector> 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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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<AnnotationsLocation> {
|
||||
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) }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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<IntentionAction> {
|
||||
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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -43,9 +43,11 @@ public abstract class JavaCompilerConfigurationProxy {
|
||||
}
|
||||
|
||||
public static void setAdditionalOptions(@NotNull Project project, @NotNull Module module, @NotNull List<String> options) {
|
||||
JavaCompilerConfigurationProxy[] extensions = EP_NAME.getExtensions();
|
||||
if (extensions.length == 0) return;
|
||||
extensions[0].setAdditionalOptionsImpl(project, module, options);
|
||||
List<JavaCompilerConfigurationProxy> extensions = EP_NAME.getExtensionList();
|
||||
if (extensions.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
extensions.get(0).setAdditionalOptionsImpl(project, module, options);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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<String, RepositoryLibraryDescription> 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));
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ interface NotebookEditorAppearanceProvider {
|
||||
val EP_NAME = ExtensionPointName.create<NotebookEditorAppearanceProvider>(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)!!)
|
||||
|
||||
@@ -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()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -639,7 +639,7 @@ public final class PostprocessReformattingAspectImpl extends PostprocessReformat
|
||||
|
||||
private static Iterable<TextRange> getEnabledRanges(@NotNull PsiElement element) {
|
||||
List<TextRange> disabledRanges = new ArrayList<>();
|
||||
for (DisabledIndentRangesProvider rangesProvider : DisabledIndentRangesProvider.EP_NAME.getExtensions()) {
|
||||
for (DisabledIndentRangesProvider rangesProvider : DisabledIndentRangesProvider.EP_NAME.getExtensionList()) {
|
||||
Collection<TextRange> providedDisabledRanges = rangesProvider.getDisabledIndentRanges(element);
|
||||
if (providedDisabledRanges != null) {
|
||||
disabledRanges.addAll(providedDisabledRanges);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -276,7 +276,7 @@ public final class DocumentImpl extends UserDataHolderBase implements DocumentEx
|
||||
}
|
||||
List<StripTrailingSpacesFilter> 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)) {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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<ColorBlindness, ColorBlindnessSupport> map, ColorBlindness blindness, String extensionName) {
|
||||
ColorBlindnessSupport[] extensions = (ColorBlindnessSupport[])Extensions.getRootArea().getExtensionPoint(extensionName)
|
||||
.getExtensions();
|
||||
List<ColorBlindnessSupport>
|
||||
extensions = Extensions.getRootArea().<ColorBlindnessSupport>getExtensionPoint(extensionName)
|
||||
.getExtensionList();
|
||||
ColorBlindnessSupport support = null;
|
||||
for (ColorBlindnessSupport ext : extensions) {
|
||||
if (support == null) support = ext;
|
||||
|
||||
@@ -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<BreadcrumbsProvider> providers = BreadcrumbsProvider.EP_NAME.getExtensionList();
|
||||
while (language != null) {
|
||||
for (BreadcrumbsProvider provider : providers) {
|
||||
for (Language supported : provider.getLanguages()) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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<PsiEle
|
||||
|
||||
static {
|
||||
INSTANCE.registerExecutor((queryParameters, consumer) -> {
|
||||
for (QueryExecutor<PsiElement, PsiElement> executor : DEFINITIONS_SEARCH_EP_NAME.getExtensions()) {
|
||||
for (QueryExecutor<PsiElement, PsiElement> executor : DEFINITIONS_SEARCH_EP_NAME.getExtensionList()) {
|
||||
if (!executor.execute(queryParameters.getElement(), consumer))
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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<String, ? extends Tools> tools,
|
||||
@NotNull List<? extends File> inspectionsResults,
|
||||
@NotNull Project project) {
|
||||
for (InspectResultsConsumer extension : EP_NAME.getExtensions()) {
|
||||
for (InspectResultsConsumer extension : EP_NAME.getExtensionList()) {
|
||||
extension.consume(tools, inspectionsResults, project);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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<String> args) throws InspectionApplicationException {
|
||||
for (InspectionApplicationFactory extension : EP_NAME.getExtensions()) {
|
||||
for (InspectionApplicationFactory extension : EP_NAME.getExtensionList()) {
|
||||
if (extension.id().equals(id)) {
|
||||
return extension.getApplication(args);
|
||||
}
|
||||
|
||||
@@ -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<InlayGroupSettingProvider> =
|
||||
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 }
|
||||
}
|
||||
}
|
||||
@@ -81,7 +81,7 @@ public final class EditSourceUtil {
|
||||
* Collect original elements from all filters.
|
||||
*/
|
||||
private static PsiElement processAllOriginalElements(@NotNull PsiElement element, @NotNull Function<? super PsiElement, ? extends PsiElement> 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;
|
||||
|
||||
@@ -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<LineMarkerProvider> extension : LineMarkerProviders.EP_NAME.getExtensions()) {
|
||||
for (KeyedLazyInstance<LineMarkerProvider> extension : LineMarkerProviders.EP_NAME.getExtensionList()) {
|
||||
LineMarkerProvider instance = extension.getInstance();
|
||||
if (instance instanceof LineMarkerProviderDescriptor) {
|
||||
String name = ((LineMarkerProviderDescriptor)instance).getName();
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -37,7 +37,7 @@ internal class NewUiOnboardingService(private val project: Project, private val
|
||||
|
||||
private fun getSteps(): List<Pair<String, NewUiOnboardingStep>> {
|
||||
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) {
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ public final class SchemeImporterEP <S extends Scheme> extends SchemeConvertorEP
|
||||
*/
|
||||
public static @NotNull <S extends Scheme> Collection<SchemeImporterEP<S>> getExtensions(Class<S> schemeClass) {
|
||||
List<SchemeImporterEP<S>> 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<S>)importerEP);
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
@@ -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<Configurable> configurables = new SmartList<>();
|
||||
configurables.add(new DataViewsConfigurable());
|
||||
|
||||
DebuggerConfigurableProvider[] providers = DebuggerConfigurableProvider.EXTENSION_POINT.getExtensions();
|
||||
List<DebuggerConfigurableProvider> 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<? super Configurable> result) {
|
||||
private static void computeMergedConfigurables(List<DebuggerConfigurableProvider> providers, @NotNull List<? super Configurable> result) {
|
||||
for (DebuggerSettingsCategory category : MERGED_CATEGORIES) {
|
||||
List<Configurable> 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<DebuggerConfigurableProvider> providers) {
|
||||
List<Configurable> 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<Configurable> getConfigurables(@NotNull DebuggerSettingsCategory category) {
|
||||
return getConfigurables(category, DebuggerConfigurableProvider.EXTENSION_POINT.getExtensions());
|
||||
static @NotNull List<Configurable> getConfigurables(@NotNull DebuggerSettingsCategory category) {
|
||||
return getConfigurables(category, DebuggerConfigurableProvider.EXTENSION_POINT.getExtensionList());
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private static List<Configurable> getConfigurables(@NotNull DebuggerSettingsCategory category, DebuggerConfigurableProvider @NotNull [] providers) {
|
||||
private static @NotNull List<Configurable> getConfigurables(@NotNull DebuggerSettingsCategory category,
|
||||
List<DebuggerConfigurableProvider> providers) {
|
||||
List<Configurable> configurables = null;
|
||||
for (DebuggerConfigurableProvider provider : providers) {
|
||||
Collection<? extends Configurable> 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");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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<ByteCodeVi
|
||||
|
||||
@Nullable
|
||||
public static PsiClass getContainingClass(@NotNull PsiElement psiElement) {
|
||||
for (ClassSearcher searcher : CLASS_SEARCHER_EP.getExtensions()) {
|
||||
for (ClassSearcher searcher : CLASS_SEARCHER_EP.getExtensionList()) {
|
||||
PsiClass aClass = searcher.findClass(psiElement);
|
||||
if (aClass != null) {
|
||||
return aClass;
|
||||
|
||||
@@ -60,7 +60,6 @@ import org.jetbrains.annotations.Nullable;
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@@ -87,7 +86,7 @@ public class InjectLanguageAction implements IntentionAction, LowPriorityAction
|
||||
for (Language language : languages) {
|
||||
list.add(Injectable.fromLanguage(language));
|
||||
}
|
||||
list.addAll(Arrays.asList(ReferenceInjector.EXTENSION_POINT_NAME.getExtensions()));
|
||||
list.addAll(ReferenceInjector.EXTENSION_POINT_NAME.getExtensionList());
|
||||
Collections.sort(list);
|
||||
return list;
|
||||
}
|
||||
|
||||
@@ -204,7 +204,7 @@ public class GenerateToStringActionHandlerImpl implements GenerateToStringAction
|
||||
}
|
||||
|
||||
//exclude interfaces, non-java classes etc
|
||||
for (GenerateToStringClassFilter filter : GenerateToStringClassFilter.EP_NAME.getExtensions()) {
|
||||
for (GenerateToStringClassFilter filter : GenerateToStringClassFilter.EP_NAME.getExtensionList()) {
|
||||
if (!filter.canGenerateToString(clazz)) return null;
|
||||
}
|
||||
return clazz;
|
||||
|
||||
@@ -457,9 +457,9 @@ class NewLogicDelegate(private val project: Project) : LogicDelegate() {
|
||||
|
||||
private fun getSources(): List<ScriptDefinitionsSource> {
|
||||
@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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user