mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-15 02:59:33 +07:00
IJPL-310 mark extensions as obsolete (part 10)
GitOrigin-RevId: 5091c58ed62bccf2eefa765cdee1316b77e93b93
This commit is contained in:
committed by
intellij-monorepo-bot
parent
944a537a85
commit
4c010ba621
@@ -694,7 +694,7 @@ public final class DocumentImpl extends UserDataHolderBase implements DocumentEx
|
||||
throw new ReadOnlyModificationException(this, CoreBundle.message("attempt.to.modify.read.only.document.error.message"));
|
||||
}
|
||||
|
||||
for (DocumentWriteAccessGuard guard : DocumentWriteAccessGuard.EP_NAME.getExtensions()) {
|
||||
for (DocumentWriteAccessGuard guard : DocumentWriteAccessGuard.EP_NAME.getExtensionList()) {
|
||||
DocumentWriteAccessGuard.Result result = guard.isWritable(this);
|
||||
if (!result.isSuccess()) {
|
||||
throw new ReadOnlyModificationException(
|
||||
|
||||
@@ -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.diff;
|
||||
|
||||
import com.intellij.diff.chains.DiffRequestChain;
|
||||
@@ -102,7 +102,7 @@ public class DiffManagerImpl extends DiffManagerEx {
|
||||
@Override
|
||||
public List<DiffTool> getDiffTools() {
|
||||
List<DiffTool> result = new ArrayList<>();
|
||||
Collections.addAll(result, DiffTool.EP_NAME.getExtensions());
|
||||
result.addAll(DiffTool.EP_NAME.getExtensionList());
|
||||
result.add(SimpleDiffTool.INSTANCE);
|
||||
result.add(UnifiedDiffTool.INSTANCE);
|
||||
result.add(BinaryDiffTool.INSTANCE);
|
||||
|
||||
@@ -26,8 +26,8 @@ import kotlin.Unit;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import static com.intellij.internal.statistic.collectors.fus.actions.persistence.ToolWindowEventLogGroup.*;
|
||||
@@ -43,7 +43,7 @@ import static com.intellij.openapi.wm.ToolWindowId.*;
|
||||
*
|
||||
* <p>
|
||||
* If toolwindow is registered dynamically is <b>should</b> be explicitly whitelisted
|
||||
* in plugin.xml {@link #EP_NAME} or here in {@link ToolWindowCollector#ourToolwindowAllowList}
|
||||
* in plugin.xml {@link #EP_NAME} or here in {@link ToolWindowCollector#toolwindowAllowList}
|
||||
* </p>
|
||||
*/
|
||||
public final class ToolWindowCollector {
|
||||
@@ -63,12 +63,15 @@ public final class ToolWindowCollector {
|
||||
* If toolwindow is registered in plugin.xml, it's whitelisted automatically. <br/>
|
||||
* To whitelist dynamically registered plugin toolwindow use {@link #EP_NAME}
|
||||
*/
|
||||
private static final Map<String, PluginInfo> ourToolwindowAllowList = new HashMap<>();
|
||||
private static final Map<String, PluginInfo> toolwindowAllowList = new HashMap<>();
|
||||
|
||||
static {
|
||||
Arrays.asList(MESSAGES_WINDOW, DEBUG, RUN, FIND, HIERARCHY, ANALYZE_DEPENDENCIES, MODULES_DEPENDENCIES, DUPLICATES, EXTRACT_METHOD,
|
||||
DOCUMENTATION, PREVIEW, SERVICES, ENDPOINTS, BuildContentManager.TOOL_WINDOW_ID, "CVS", BUILD_DEPENDENCIES)
|
||||
.forEach(id -> ourToolwindowAllowList.put(id, getPlatformPlugin()));
|
||||
for (String id : List.of(MESSAGES_WINDOW, DEBUG, RUN, FIND, HIERARCHY, ANALYZE_DEPENDENCIES, MODULES_DEPENDENCIES, DUPLICATES,
|
||||
EXTRACT_METHOD,
|
||||
DOCUMENTATION, PREVIEW, SERVICES, ENDPOINTS, BuildContentManager.TOOL_WINDOW_ID, "CVS",
|
||||
BUILD_DEPENDENCIES)) {
|
||||
toolwindowAllowList.put(id, getPlatformPlugin());
|
||||
}
|
||||
}
|
||||
|
||||
private ToolWindowCollector() {
|
||||
@@ -87,7 +90,7 @@ public final class ToolWindowCollector {
|
||||
private static void addToolwindowToWhitelist(@NotNull ToolWindowAllowlistEP extension, @NotNull PluginDescriptor pluginDescriptor) {
|
||||
PluginInfo info = PluginInfoDetectorKt.getPluginInfoByDescriptor(pluginDescriptor);
|
||||
if (info.isDevelopedByJetBrains()) {
|
||||
ourToolwindowAllowList.put(extension.id, info);
|
||||
toolwindowAllowList.put(extension.id, info);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -132,21 +135,21 @@ public final class ToolWindowCollector {
|
||||
}
|
||||
|
||||
private static @NotNull PluginInfo getToolWindowInfo(@NotNull String toolWindowId) {
|
||||
if (ourToolwindowAllowList.containsKey(toolWindowId)) {
|
||||
return ourToolwindowAllowList.get(toolWindowId);
|
||||
if (toolwindowAllowList.containsKey(toolWindowId)) {
|
||||
return toolwindowAllowList.get(toolWindowId);
|
||||
}
|
||||
|
||||
PluginInfo info = getToolWindowInfo(toolWindowId, ToolWindowEP.EP_NAME.getExtensions());
|
||||
PluginInfo info = getToolWindowInfo(toolWindowId, ToolWindowEP.EP_NAME.getExtensionList());
|
||||
if (info == null) {
|
||||
info = getToolWindowInfo(toolWindowId, LibraryDependentToolWindow.EXTENSION_POINT_NAME.getExtensions());
|
||||
info = getToolWindowInfo(toolWindowId, LibraryDependentToolWindow.EXTENSION_POINT_NAME.getExtensionList());
|
||||
}
|
||||
if (info == null) {
|
||||
info = getToolWindowInfo(toolWindowId, FacetDependentToolWindow.EXTENSION_POINT_NAME.getExtensions());
|
||||
info = getToolWindowInfo(toolWindowId, FacetDependentToolWindow.EXTENSION_POINT_NAME.getExtensionList());
|
||||
}
|
||||
return info != null ? info : getUnknownPlugin();
|
||||
}
|
||||
|
||||
private static @Nullable PluginInfo getToolWindowInfo(@NotNull String toolWindowId, ToolWindowEP @NotNull [] toolWindows) {
|
||||
private static @Nullable PluginInfo getToolWindowInfo(@NotNull String toolWindowId, @NotNull List<? extends ToolWindowEP> toolWindows) {
|
||||
for (ToolWindowEP ep : toolWindows) {
|
||||
if (StringUtil.equals(toolWindowId, ep.id)) {
|
||||
PluginDescriptor pluginDescriptor = ep.getPluginDescriptor();
|
||||
|
||||
@@ -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.remoteServer.impl.configuration.deployment;
|
||||
|
||||
import com.intellij.configurationStore.ComponentSerializationUtil;
|
||||
@@ -6,7 +6,6 @@ import com.intellij.execution.ExecutionException;
|
||||
import com.intellij.execution.Executor;
|
||||
import com.intellij.execution.configurations.*;
|
||||
import com.intellij.execution.runners.ExecutionEnvironment;
|
||||
import com.intellij.openapi.application.ReadAction;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.options.SettingsEditor;
|
||||
import com.intellij.openapi.options.SettingsEditorGroup;
|
||||
@@ -203,7 +202,7 @@ public class DeployToServerRunConfiguration<S extends ServerConfiguration, D ext
|
||||
|
||||
@Nullable
|
||||
private static DeploymentSourceType<?> findDeploymentSourceType(@Nullable String id) {
|
||||
for (DeploymentSourceType<?> type : DeploymentSourceType.EP_NAME.getExtensions()) {
|
||||
for (DeploymentSourceType<?> type : DeploymentSourceType.EP_NAME.getExtensionList()) {
|
||||
if (type.getId().equals(id)) {
|
||||
return type;
|
||||
}
|
||||
|
||||
@@ -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 com.jetbrains.javascript.debugger
|
||||
|
||||
import com.intellij.javascript.debugger.ExpressionInfoFactory
|
||||
@@ -33,7 +19,7 @@ import org.jetbrains.debugger.MemberFilter
|
||||
*/
|
||||
abstract class JavaScriptDebugAware {
|
||||
companion object {
|
||||
val EP_NAME: ExtensionPointName<JavaScriptDebugAware> = ExtensionPointName.create("com.jetbrains.javaScriptDebugAware")
|
||||
val EP_NAME: ExtensionPointName<JavaScriptDebugAware> = ExtensionPointName("com.jetbrains.javaScriptDebugAware")
|
||||
|
||||
@JvmStatic
|
||||
fun isBreakpointAware(fileType: FileType): Boolean {
|
||||
@@ -42,12 +28,7 @@ abstract class JavaScriptDebugAware {
|
||||
}
|
||||
|
||||
fun getBreakpointAware(fileType: FileType): JavaScriptDebugAware? {
|
||||
for (debugAware in EP_NAME.extensions) {
|
||||
if (fileType == debugAware.fileType) {
|
||||
return debugAware
|
||||
}
|
||||
}
|
||||
return null
|
||||
return EP_NAME.extensionList.firstOrNull { fileType == it.fileType }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,8 +39,8 @@ abstract class JavaScriptDebugAware {
|
||||
get() = null
|
||||
|
||||
/**
|
||||
* Return false if you language could be natively executed in the VM
|
||||
* You must not specify it and it doesn't matter if you use not own breakpoint type - (Kotlin or GWT use java breakpoint type, for example)
|
||||
* Return false if your language could be natively executed in the VM
|
||||
* You must not specify it, and it doesn't matter if you use not own breakpoint type - (Kotlin or GWT use a java breakpoint type, for example)
|
||||
*/
|
||||
open val isOnlySourceMappedBreakpoints: Boolean
|
||||
get() = true
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
// 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.openapi.vcs.impl
|
||||
|
||||
import com.intellij.openapi.vcs.AbstractVcs
|
||||
import com.intellij.openapi.vcs.checkin.BaseCheckinHandlerFactory
|
||||
import com.intellij.openapi.vcs.checkin.CheckinHandlerFactory
|
||||
import com.intellij.openapi.vcs.checkin.VcsCheckinHandlerFactory
|
||||
import com.intellij.util.containers.ContainerUtil.unmodifiableOrEmptyList
|
||||
import kotlinx.collections.immutable.mutate
|
||||
import kotlinx.collections.immutable.persistentListOf
|
||||
|
||||
class CheckinHandlersManagerImpl : CheckinHandlersManager() {
|
||||
override fun getRegisteredCheckinHandlerFactories(vcses: Array<AbstractVcs>): List<BaseCheckinHandlerFactory> {
|
||||
val vcsesKeys = vcses.mapTo(mutableSetOf()) { it.keyInstanceMethod }
|
||||
|
||||
return unmodifiableOrEmptyList(
|
||||
VcsCheckinHandlerFactory.EP_NAME.extensions.filter { it.key in vcsesKeys } +
|
||||
CheckinHandlerFactory.EP_NAME.extensions
|
||||
)
|
||||
val vcsesKeys = vcses.mapTo(HashSet()) { it.keyInstanceMethod }
|
||||
return persistentListOf<BaseCheckinHandlerFactory>().mutate { builder ->
|
||||
VcsCheckinHandlerFactory.EP_NAME.extensionList.filterTo(builder) { it.key in vcsesKeys }
|
||||
builder.addAll(CheckinHandlerFactory.EP_NAME.extensionList)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user