try {
// TODO there should be a nicer API for creating this, and also a central place for defaults
// TODO - we should not be creating runtimes, but maybe matching against existing ones
IRuntime runtime = serverRuntime.createRuntime(null, monitor);
runtime = runtime.createWorkingCopy().save(true, monitor);
IServerWorkingCopy wc = serverType.createServer(null, null, runtime, monitor);
wc.setHost(getHostname());
wc.setName(newServerName.getText());
wc.setAttribute(ISlingLaunchpadServer.PROP_PORT, getPort());
wc.setAttribute(ISlingLaunchpadServer.PROP_DEBUG_PORT, Integer.parseInt(newServerDebugPort.getText()));
wc.setAttribute(ISlingLaunchpadServer.PROP_INSTALL_LOCALLY, installToolingSupportBundle.getSelection());