mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
WEB-11110 Wrong error message "Built-in HTTP Server on custom port disabled"
This commit is contained in:
+5
@@ -17,6 +17,11 @@ class BuiltInServerConfigurableUi implements ConfigurableUi<BuiltInServerOptions
|
||||
public BuiltInServerConfigurableUi() {
|
||||
portLabel.setLabelFor(builtInServerPort);
|
||||
builtInServerPort.setMin(1024);
|
||||
builtInServerPort.addChangeListener(e -> {
|
||||
boolean isEnabled = builtInServerPort.getNumber() != BuiltInServerOptions.DEFAULT_PORT;
|
||||
builtInServerAvailableExternallyCheckBox.setEnabled(isEnabled);
|
||||
builtInServerAvailableExternallyCheckBox.setToolTipText(isEnabled ? null : "Can’t be enabled for default port. Please change it.");
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ import java.util.Collections;
|
||||
storages = @Storage("other.xml")
|
||||
)
|
||||
public class BuiltInServerOptions implements PersistentStateComponent<BuiltInServerOptions>, Getter<BuiltInServerOptions> {
|
||||
private static final int DEFAULT_PORT = 63342;
|
||||
public static final int DEFAULT_PORT = 63342;
|
||||
|
||||
@Attribute
|
||||
public int builtInServerPort = DEFAULT_PORT;
|
||||
|
||||
@@ -74,7 +74,7 @@ public class BuiltInServerManagerImpl extends BuiltInServerManager implements Ap
|
||||
private static int getDefaultPort() {
|
||||
if (System.getProperty(PROPERTY_RPC_PORT) == null) {
|
||||
// Default port will be occupied by main idea instance - define the custom default to avoid searching of free port
|
||||
return ApplicationManager.getApplication().isUnitTestMode() ? 64463 : 63342;
|
||||
return ApplicationManager.getApplication().isUnitTestMode() ? 64463 : BuiltInServerOptions.DEFAULT_PORT;
|
||||
}
|
||||
else {
|
||||
return Integer.parseInt(System.getProperty(PROPERTY_RPC_PORT));
|
||||
|
||||
Reference in New Issue
Block a user