mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 14:23:28 +07:00
CR-IC-1923#CFR-48484
This commit is contained in:
@@ -25,6 +25,7 @@ import com.intellij.openapi.options.SettingsEditor;
|
||||
import com.intellij.openapi.options.ShowSettingsUtil;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.openapi.util.text.StringUtilRt;
|
||||
import com.intellij.ui.PortField;
|
||||
import com.intellij.xdebugger.impl.settings.DebuggerConfigurable;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -153,9 +154,8 @@ public class GenericDebuggerParametersRunnerConfigurable extends SettingsEditor<
|
||||
}
|
||||
|
||||
private void checkPort() throws ConfigurationException {
|
||||
final int port = myPortField.getNumber();
|
||||
if (isSocket() && port > 0 && (port < 0 || port > 0xffff)) {
|
||||
throw new ConfigurationException(DebuggerBundle.message("error.text.invalid.port.0", port));
|
||||
if (isSocket() && !myPortField.isSpecified()) {
|
||||
throw new ConfigurationException(DebuggerBundle.message("error.text.invalid.port"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -172,7 +172,7 @@ public class GenericDebuggerParametersRunnerConfigurable extends SettingsEditor<
|
||||
|
||||
private void setPort(String port) {
|
||||
if (isSocket()) {
|
||||
myPortField.setNumber(StringUtil.parseInt(port, 0));
|
||||
myPortField.setNumber(StringUtilRt.parseInt(port, 0));
|
||||
}
|
||||
else {
|
||||
myAddressField.setText(port);
|
||||
|
||||
@@ -38,4 +38,8 @@ public class PortField extends JSpinner {
|
||||
public int getNumber() {
|
||||
return ((SpinnerNumberModel)getModel()).getNumber().intValue();
|
||||
}
|
||||
|
||||
public boolean isSpecified() {
|
||||
return getNumber() != 0;
|
||||
}
|
||||
}
|
||||
@@ -424,7 +424,7 @@ label.breakpoint.properties.panel.group.actions=Actions
|
||||
label.breakpoint.properties.panel.group.suspend.policy=Suspend policy
|
||||
active.tooltip.title=Evaluation of {0}
|
||||
active.tooltip.suggestion=Click here to view object tree
|
||||
error.text.invalid.port.0=Invalid port: ''{0,number,#}''
|
||||
error.text.invalid.port=Port is not specified
|
||||
error.cannot.invoke.method.in.collected.thread=Cannot invoke method: the invocation thread has been collected
|
||||
title.smart.step.popup=Method to Step Into
|
||||
action.show.watches.description=Shows or hides 'watches' pane
|
||||
|
||||
Reference in New Issue
Block a user