mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Rename debuggerPort to debuggerAddress as it's not a port in case of shared-memory debugging process
GitOrigin-RevId: 8df123004efd8f013500385aea92afc2628b12a9
This commit is contained in:
committed by
intellij-monorepo-bot
parent
4d9cb46b3f
commit
89647051ea
@@ -45,7 +45,7 @@ public class DefaultDebugEnvironment implements DebugEnvironment {
|
||||
myPollTimeout = pollTimeout;
|
||||
|
||||
mySearchScope = createSearchScope(environment.getProject(), environment.getRunProfile());
|
||||
myNeedParametersSet = remoteConnection.isServerMode() && remoteConnection.isUseSockets() && "0".equals(remoteConnection.getApplicationPort());
|
||||
myNeedParametersSet = remoteConnection.isServerMode() && remoteConnection.isUseSockets() && "0".equals(remoteConnection.getApplicationAddress());
|
||||
}
|
||||
|
||||
private static GlobalSearchScope createSearchScope(@NotNull Project project, @Nullable RunProfile runProfile) {
|
||||
@@ -75,7 +75,7 @@ public class DefaultDebugEnvironment implements DebugEnvironment {
|
||||
DebuggerManagerImpl.createDebugParameters(((JavaCommandLine)state).getJavaParameters(),
|
||||
true,
|
||||
DebuggerSettings.SOCKET_TRANSPORT,
|
||||
myRemoteConnection.getApplicationPort(),
|
||||
myRemoteConnection.getApplicationAddress(),
|
||||
false);
|
||||
}
|
||||
return state.execute(environment.getExecutor(), environment.getRunner());
|
||||
|
||||
@@ -456,7 +456,7 @@ public abstract class DebugProcessImpl extends UserDataHolderBase implements Deb
|
||||
throw new IOException(DebuggerBundle.message("error.debugger.already.listening"));
|
||||
}
|
||||
|
||||
final String port = myConnection.getDebuggerPort();
|
||||
final String port = myConnection.getDebuggerAddress();
|
||||
|
||||
if (myConnection instanceof PidRemoteConnection && !((PidRemoteConnection)myConnection).isFixedAddress()) {
|
||||
PidRemoteConnection pidRemoteConnection = (PidRemoteConnection)myConnection;
|
||||
@@ -555,7 +555,7 @@ public abstract class DebugProcessImpl extends UserDataHolderBase implements Deb
|
||||
if (port != null) {
|
||||
listeningAddress = port;
|
||||
}
|
||||
myConnection.setApplicationPort(listeningAddress);
|
||||
myConnection.setApplicationAddress(listeningAddress);
|
||||
|
||||
myDebugProcessDispatcher.getMulticaster().connectorIsReady();
|
||||
|
||||
|
||||
@@ -135,7 +135,7 @@ public class GenericDebuggerRunner extends JavaPatchableProgramRunner<GenericDeb
|
||||
|
||||
if (debuggerRunnerSettings != null) {
|
||||
remoteConnection.setUseSockets(debuggerRunnerSettings.getTransport() == DebuggerSettings.SOCKET_TRANSPORT);
|
||||
remoteConnection.setDebuggerPort(debuggerRunnerSettings.getDebugPort());
|
||||
remoteConnection.setDebuggerAddress(debuggerRunnerSettings.getDebugPort());
|
||||
}
|
||||
|
||||
return remoteConnection;
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ public class SAJDWPRemoteConnection extends PidRemoteConnection {
|
||||
public SAJDWPRemoteConnection(String pid, List<String> commands) {
|
||||
super(pid);
|
||||
setServerMode(true);
|
||||
setDebuggerPort("0");
|
||||
setDebuggerAddress("0");
|
||||
myCommands = commands;
|
||||
}
|
||||
|
||||
|
||||
@@ -39,8 +39,8 @@ public class DebuggerBundle {
|
||||
}
|
||||
|
||||
public static String getAddressDisplayName(final RemoteConnection connection) {
|
||||
return connection.isUseSockets() ? StringUtil.notNullize(connection.getDebuggerHostName()) + ":" + connection.getDebuggerPort()
|
||||
: connection.getDebuggerPort();
|
||||
return connection.isUseSockets() ? StringUtil.notNullize(connection.getDebuggerHostName()) + ":" + connection.getDebuggerAddress()
|
||||
: connection.getDebuggerAddress();
|
||||
}
|
||||
|
||||
public static String getTransportName(final RemoteConnection connection) {
|
||||
|
||||
@@ -70,7 +70,7 @@ public class RemoteConfigurable extends SettingsEditor<RemoteConfiguration> {
|
||||
String getLaunchCommandLine(RemoteConnection connection) {
|
||||
String commandLine = JDK5to8.getLaunchCommandLine(connection);
|
||||
if (connection.isUseSockets() && !connection.isServerMode()) {
|
||||
commandLine = commandLine.replace(connection.getApplicationPort(), "*:" + connection.getApplicationPort());
|
||||
commandLine = commandLine.replace(connection.getApplicationAddress(), "*:" + connection.getApplicationAddress());
|
||||
}
|
||||
return commandLine;
|
||||
}
|
||||
|
||||
+18
-18
@@ -13,9 +13,9 @@ public class RemoteConnection {
|
||||
private boolean myServerMode;
|
||||
|
||||
private String myApplicationHostName;
|
||||
private String myApplicationPort;
|
||||
private String myApplicationAddress;
|
||||
private String myDebuggerHostName;
|
||||
private String myDebuggerPort;
|
||||
private String myDebuggerAddress;
|
||||
|
||||
public static final String ONTHROW = ",onthrow=<FQ exception class name>";
|
||||
public static final String ONUNCAUGHT = ",onuncaught=<y/n>";
|
||||
@@ -25,8 +25,8 @@ public class RemoteConnection {
|
||||
myServerMode = serverMode;
|
||||
myApplicationHostName = hostName;
|
||||
myDebuggerHostName = hostName;
|
||||
myApplicationPort = address;
|
||||
myDebuggerPort = address;
|
||||
myApplicationAddress = address;
|
||||
myDebuggerAddress = address;
|
||||
}
|
||||
|
||||
public boolean isUseSockets() {
|
||||
@@ -55,12 +55,12 @@ public class RemoteConnection {
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #getApplicationPort()} or {@link #getDebuggerPort()} instead depending on your needs
|
||||
* @deprecated use {@link #getApplicationAddress()} or {@link #getDebuggerAddress()} instead depending on your needs
|
||||
*/
|
||||
@Deprecated
|
||||
@ApiStatus.ScheduledForRemoval(inVersion = "2020.2")
|
||||
public String getAddress() {
|
||||
return myApplicationPort;
|
||||
return myApplicationAddress;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -74,13 +74,13 @@ public class RemoteConnection {
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #setApplicationPort(String)} or {@link #setDebuggerPort(String)} instead depending on your needs
|
||||
* @deprecated use {@link #setApplicationAddress(String)} or {@link #setDebuggerAddress(String)} instead depending on your needs
|
||||
*/
|
||||
@Deprecated
|
||||
@ApiStatus.ScheduledForRemoval(inVersion = "2020.2")
|
||||
public void setAddress(String address) {
|
||||
myApplicationPort = address;
|
||||
myDebuggerPort = address;
|
||||
myApplicationAddress = address;
|
||||
myDebuggerAddress = address;
|
||||
}
|
||||
|
||||
public String getApplicationHostName() {
|
||||
@@ -99,24 +99,24 @@ public class RemoteConnection {
|
||||
myDebuggerHostName = debuggerHostName;
|
||||
}
|
||||
|
||||
public String getApplicationPort() {
|
||||
return myApplicationPort;
|
||||
public String getApplicationAddress() {
|
||||
return myApplicationAddress;
|
||||
}
|
||||
|
||||
public void setApplicationPort(String applicationPort) {
|
||||
myApplicationPort = applicationPort;
|
||||
public void setApplicationAddress(String applicationAddress) {
|
||||
myApplicationAddress = applicationAddress;
|
||||
}
|
||||
|
||||
public String getDebuggerPort() {
|
||||
return myDebuggerPort;
|
||||
public String getDebuggerAddress() {
|
||||
return myDebuggerAddress;
|
||||
}
|
||||
|
||||
public void setDebuggerPort(String debuggerPort) {
|
||||
myDebuggerPort = debuggerPort;
|
||||
public void setDebuggerAddress(String debuggerAddress) {
|
||||
myDebuggerAddress = debuggerAddress;
|
||||
}
|
||||
|
||||
public String getLaunchCommandLine() {
|
||||
final String address = getApplicationPort();
|
||||
final String address = getApplicationAddress();
|
||||
final boolean shmem = !isUseSockets();
|
||||
final boolean serverMode = isServerMode();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user