Search in sources :

Example 1 with JstdServerSettings

use of com.google.jstestdriver.idea.server.JstdServerSettings in project intellij-plugins by JetBrains.

the class JstdServerSettingsTab method saveSettings.

public void saveSettings() {
    JstdServerSettings settings = getSettings();
    JstdServerSettingsManager.saveSettings(settings);
}
Also used : JstdServerSettings(com.google.jstestdriver.idea.server.JstdServerSettings)

Example 2 with JstdServerSettings

use of com.google.jstestdriver.idea.server.JstdServerSettings in project intellij-plugins by JetBrains.

the class JstdServerSettingsTab method update.

private void update() {
    if (myTrackChanges) {
        JstdServerSettings settings = getSettings();
        JstdServerSettingsManager.saveSettings(settings);
    }
}
Also used : JstdServerSettings(com.google.jstestdriver.idea.server.JstdServerSettings)

Example 3 with JstdServerSettings

use of com.google.jstestdriver.idea.server.JstdServerSettings in project intellij-plugins by JetBrains.

the class JstdServerStatusView method attachToServer.

public void attachToServer(@NotNull final JstdServer server) {
    setInfoBodyHtml("Starting up...");
    server.addLifeCycleListener(new JstdServerLifeCycleAdapter() {

        @Override
        public void onServerStarted() {
            JstdServerSettings settings = server.getSettings();
            String url = "http://127.0.0.1:" + settings.getPort() + "/capture";
            setInfoBodyHtml("To capture a browser open <a href='" + url + "'>" + url + "</a>");
            updateCapturedBrowsersCount(server);
        }

        @Override
        public void onServerStopped() {
            setInfoBodyHtml("Not running");
            updateCapturedBrowsersCount(server);
        }

        @Override
        public void onBrowserCaptured(@NotNull JstdBrowserInfo info) {
            updateCapturedBrowsersCount(server);
        }

        @Override
        public void onBrowserPanicked(@NotNull JstdBrowserInfo info) {
            updateCapturedBrowsersCount(server);
        }
    }, myDisposable);
}
Also used : JstdServerSettings(com.google.jstestdriver.idea.server.JstdServerSettings) JstdServerLifeCycleAdapter(com.google.jstestdriver.idea.server.JstdServerLifeCycleAdapter) JstdBrowserInfo(com.google.jstestdriver.idea.server.JstdBrowserInfo)

Aggregations

JstdServerSettings (com.google.jstestdriver.idea.server.JstdServerSettings)3 JstdBrowserInfo (com.google.jstestdriver.idea.server.JstdBrowserInfo)1 JstdServerLifeCycleAdapter (com.google.jstestdriver.idea.server.JstdServerLifeCycleAdapter)1