mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
PY-17447 PyRemoteDebugSessionCreator renamed to *Factory resolving review comment
This commit is contained in:
@@ -630,7 +630,7 @@
|
||||
<extensionPoint qualifiedName="Pythonid.pyCustomSdkUiProvider" interface="com.jetbrains.python.sdk.PyCustomSdkUiProvider"/>
|
||||
<extensionPoint qualifiedName="Pythonid.pep8ProblemSuppressor" interface="com.jetbrains.python.validation.Pep8ProblemSuppressor"/>
|
||||
<extensionPoint qualifiedName="Pythonid.pythonFlavorProvider" interface="com.jetbrains.python.sdk.flavors.PythonFlavorProvider"/>
|
||||
<extensionPoint qualifiedName="Pythonid.pyRemoteDebugSessionCreator" interface="com.jetbrains.python.debugger.PyRemoteDebugSessionCreator"/>
|
||||
<extensionPoint qualifiedName="Pythonid.debugSessionFactory" interface="com.jetbrains.python.debugger.PyDebugSessionFactory"/>
|
||||
</extensionPoints>
|
||||
|
||||
<extensions defaultExtensionNs="Pythonid">
|
||||
|
||||
@@ -127,7 +127,7 @@ public class PyDebugRunner extends GenericProgramRunner {
|
||||
Sdk sdk = pyState.getSdk();
|
||||
if (sdk != null && sdk.getSdkAdditionalData() instanceof RemoteSdkAdditionalData) {
|
||||
RemoteSdkAdditionalData remoteSdkAdditionalData = (RemoteSdkAdditionalData)sdk.getSdkAdditionalData();
|
||||
PyRemoteDebugSessionCreator sessionCreator = PyRemoteDebugSessionCreator.findExtension(remoteSdkAdditionalData);
|
||||
PyDebugSessionFactory sessionCreator = PyDebugSessionFactory.findExtension(remoteSdkAdditionalData);
|
||||
if (sessionCreator != null) {
|
||||
return sessionCreator.createSession(this, pyState, environment);
|
||||
}
|
||||
|
||||
+5
-5
@@ -28,9 +28,9 @@ import org.jetbrains.annotations.Nullable;
|
||||
/**
|
||||
* @author Alexander Koshevoy
|
||||
*/
|
||||
public abstract class PyRemoteDebugSessionCreator {
|
||||
public static final ExtensionPointName<PyRemoteDebugSessionCreator> EP_NAME
|
||||
= ExtensionPointName.create("Pythonid.pyRemoteDebugSessionCreator");
|
||||
public abstract class PyDebugSessionFactory {
|
||||
public static final ExtensionPointName<PyDebugSessionFactory> EP_NAME
|
||||
= ExtensionPointName.create("Pythonid.debugSessionFactory");
|
||||
|
||||
protected abstract boolean appliesTo(@NotNull RemoteSdkAdditionalData remoteSdkAdditionalData);
|
||||
|
||||
@@ -42,11 +42,11 @@ public abstract class PyRemoteDebugSessionCreator {
|
||||
|
||||
@Contract("null -> null")
|
||||
@Nullable
|
||||
public static PyRemoteDebugSessionCreator findExtension(@Nullable RemoteSdkAdditionalData remoteSdkAdditionalData) {
|
||||
public static PyDebugSessionFactory findExtension(@Nullable RemoteSdkAdditionalData remoteSdkAdditionalData) {
|
||||
if (remoteSdkAdditionalData == null) {
|
||||
return null;
|
||||
}
|
||||
for (PyRemoteDebugSessionCreator sessionCreator : EP_NAME.getExtensions()) {
|
||||
for (PyDebugSessionFactory sessionCreator : EP_NAME.getExtensions()) {
|
||||
if (sessionCreator.appliesTo(remoteSdkAdditionalData)) {
|
||||
return sessionCreator;
|
||||
}
|
||||
Reference in New Issue
Block a user