1 /*******************************************************************************
\r
2 * Copyright (c) 2016 Association for Decentralized Information Management
\r
3 * in Industry THTH ry.
\r
4 * All rights reserved. This program and the accompanying materials
\r
5 * are made available under the terms of the Eclipse Public License v1.0
\r
6 * which accompanies this distribution, and is available at
\r
7 * http://www.eclipse.org/legal/epl-v10.html
\r
10 * THTH ry - initial API and implementation
\r
11 *******************************************************************************/
\r
12 package org.simantics.debug.browser.internal;
\r
14 import java.net.URL;
\r
16 import org.simantics.scl.runtime.reporting.SCLReporting;
\r
19 * @author Tuukka Lehtonen / Semantum Oy
\r
23 public static void startDebugServer() throws Exception {
\r
24 Activator activator = Activator.getDefault();
\r
25 DebugBrowserServer server = activator.getDebugServer();
\r
26 if (server == null) {
\r
27 server = activator.startDebugServer();
\r
28 SCLReporting.print("Started debug server at " + server.getURL());
\r
30 SCLReporting.print("Debug server is already running at " + server.getURL());
\r
34 public static void stopDebugServer() throws Exception {
\r
35 Activator activator = Activator.getDefault();
\r
36 DebugBrowserServer server = activator.getDebugServer();
\r
37 if (server != null) {
\r
38 URL url = server.getURL();
\r
39 activator.stopDebugServer();
\r
40 SCLReporting.print("Stopped debug server that was running at " + url);
\r
42 SCLReporting.print("Debug server is not running.");
\r