built-in server: minor fixes for WEB-49146

GitOrigin-RevId: 13816720a9c982c799bb431bd2909b4abf9c7cba
This commit is contained in:
Andrey Starovoyt
2021-05-17 16:50:18 +03:00
committed by intellij-monorepo-bot
parent 3b91bf4146
commit a7b4ea138b
2 changed files with 10 additions and 3 deletions

View File

@@ -6,4 +6,4 @@ notification.content.built.in.web.server.is.deactivated=Built-in web server is d
notification.content.cannot.start.built.in.http.server.on.custom.port=Cannot start built-in HTTP server on custom port {0}. Please ensure that port is free (or check your firewall settings) and restart {1}
notification.content.cannot.start.internal.http.server.and.ask.for.restart.0=Cannot start internal HTTP server. Git integration, JavaScript debugger and LiveEdit may operate with errors. Please check your firewall settings and restart {0}.
reload.on.save.got.it.title=Reloading in Browser on Save
reload.on.save.got.it.content=Pages opened in the browser on the IDE web server will be reloaded automatically when the changes are saved.
reload.on.save.got.it.content=The page will be reloaded automatically in the browser when the changes are saved.

View File

@@ -11,6 +11,7 @@ import com.intellij.openapi.diagnostic.Logger
import com.intellij.openapi.editor.impl.EditorComponentImpl
import com.intellij.openapi.fileEditor.FileDocumentManager
import com.intellij.openapi.options.ShowSettingsUtil
import com.intellij.openapi.options.SimpleConfigurable
import com.intellij.openapi.ui.popup.Balloon
import com.intellij.openapi.util.Disposer
import com.intellij.openapi.util.text.StringUtil
@@ -26,6 +27,8 @@ import io.netty.buffer.Unpooled
import io.netty.handler.codec.http.FullHttpRequest
import io.netty.handler.codec.http.QueryStringDecoder
import io.netty.util.CharsetUtil
import org.jetbrains.builtInWebServer.BuiltInServerConfigurableUi
import org.jetbrains.builtInWebServer.BuiltInServerOptions
import org.jetbrains.ide.BuiltInServerBundle
import org.jetbrains.io.jsonRpc.Client
import org.jetbrains.io.jsonRpc.ClientManager
@@ -184,8 +187,12 @@ class WebServerPageConnectionService {
if (!modifiedFiles.contains(editorFile)) return
gotItTooltip.withLink(CommonBundle.message("action.text.configure.ellipsis")) {
ShowSettingsUtil.getInstance().showSettingsDialog(editorComponent.editor.project,
XmlBundle.message("setting.builtin.server.category.label"))
ShowSettingsUtil.getInstance().editConfigurable(
editorComponent.editor.project, SimpleConfigurable.create(
"builtInServer",
XmlBundle.message("setting.builtin.server.category.label"),
BuiltInServerConfigurableUi::class.java
) { BuiltInServerOptions.getInstance() })
}
gotItTooltip.show(editorComponent) { component, _ ->