11/*******************************************************************************
2- * Copyright (c) 2008 Vlad Dumitrescu and others.
3- * All rights reserved. This program and the accompanying materials
4- * are made available under the terms of the Eclipse Public License v1.0
5- * which accompanies this distribution, and is available at
2+ * Copyright (c) 2008 Vlad Dumitrescu and others. All rights reserved. This program and
3+ * the accompanying materials are made available under the terms of the Eclipse Public
4+ * License v1.0 which accompanies this distribution, and is available at
65 * http://www.eclipse.org/legal/epl-v10.html
76 *
8- * Contributors:
9- * Vlad Dumitrescu
7+ * Contributors: Vlad Dumitrescu
108 *******************************************************************************/
119package org .erlide .backend .api ;
1210
4139import org .erlide .runtime .runtimeinfo .RuntimeVersion ;
4240import org .erlide .util .ErlLogger ;
4341import org .erlide .util .ErlangFunctionCall ;
44- import org .erlide .util .HostnameUtils ;
42+ import org .erlide .util .HostnameChecker ;
4543
4644import com .google .common .base .Charsets ;
4745import com .google .common .collect .Lists ;
@@ -71,8 +69,8 @@ public BackendData(@NonNull final RuntimeInfo info,
7169 nodeName = config .getAttribute (ErlRuntimeAttributes .NODE_NAME , nodeName );
7270 longName = config .getAttribute (ErlRuntimeAttributes .USE_LONG_NAME , longName );
7371 extraArgs = config .getAttribute (ErlRuntimeAttributes .EXTRA_ARGS , extraArgs );
74- workingDir = config
75- . getAttribute ( ErlRuntimeAttributes . WORKING_DIR , workingDir );
72+ workingDir = config . getAttribute ( ErlRuntimeAttributes . WORKING_DIR ,
73+ workingDir );
7674 env = config .getAttribute (ILaunchManager .ATTR_ENVIRONMENT_VARIABLES , env );
7775 initialCall = createInitialCall (config );
7876 debugFlags = ErlDebugFlags .makeSet (config .getAttribute (
@@ -83,8 +81,8 @@ public BackendData(@NonNull final RuntimeInfo info,
8381
8482 projects = getProjects (config );
8583 final List <String > defList = Lists .newArrayList ();
86- final List <String > intMods = config . getAttribute (
87- ErlRuntimeAttributes .DEBUG_INTERPRET_MODULES , defList );
84+ final List <String > intMods = config
85+ . getAttribute ( ErlRuntimeAttributes .DEBUG_INTERPRET_MODULES , defList );
8886 initialInterpretedModules = addBreakpointProjectsAndModules (getProjects (),
8987 intMods );
9088 } catch (final CoreException e1 ) {
@@ -157,8 +155,8 @@ public void setLaunch(final ILaunch launch) {
157155
158156 public ILaunchConfiguration asLaunchConfiguration () {
159157 final ILaunchManager manager = DebugPlugin .getDefault ().getLaunchManager ();
160- final ILaunchConfigurationType type = manager
161- . getLaunchConfigurationType ( IErlangLaunchDelegateConstants .CONFIGURATION_TYPE_INTERNAL );
158+ final ILaunchConfigurationType type = manager . getLaunchConfigurationType (
159+ IErlangLaunchDelegateConstants .CONFIGURATION_TYPE_INTERNAL );
162160 ILaunchConfigurationWorkingCopy workingCopy ;
163161 try {
164162 final RuntimeInfo info = getRuntimeInfo ();
@@ -198,8 +196,8 @@ private Collection<IProject> getProjects(final ILaunchConfiguration config)
198196 throws CoreException {
199197 String prjs ;
200198 prjs = config .getAttribute (ErlRuntimeAttributes .PROJECTS , "" );
201- final String [] projectNames = prjs .length () == 0 ? new String [] {} : prjs
202- .split (PROJECT_NAME_SEPARATOR );
199+ final String [] projectNames = prjs .length () == 0 ? new String [] {}
200+ : prjs .split (PROJECT_NAME_SEPARATOR );
203201 return gatherProjects (projectNames );
204202 }
205203
@@ -213,7 +211,8 @@ public IBeamLocator getBeamLocator() {
213211
214212 @ Override
215213 public String getQualifiedNodeName () {
216- final String erlangHostName = HostnameUtils .getErlangHostName (hasLongName ());
214+ final String erlangHostName = HostnameChecker .getInstance ()
215+ .getErlangHostName (hasLongName ());
217216 final String name = getNodeName ();
218217 final boolean hasHost = name .contains ("@" );
219218 return hasHost ? name : name + "@" + erlangHostName ;
0 commit comments