@Override public Map<String, String> getEnv() { Map<String, String> result = null; if (HostInfoUtils.isHostInfoAvailable(execEnv)) { try { result = HostInfoUtils.getHostInfo(execEnv).getEnvironment(); } catch (IOException ex) { } catch (CancellationException ex) { } } if (result == null) { result = System.getenv(); } return result; }
public MacroConverter(ExecutionEnvironment env) { envVariables = new HashMap<>(); if (HostInfoUtils.isHostInfoAvailable(env)) { try { HostInfo hostInfo = HostInfoUtils.getHostInfo(env); envVariables.putAll(hostInfo.getEnvironment()); } catch (IOException | CancellationException ex) { // should never == null occur if isHostInfoAvailable(env) => report Exceptions.printStackTrace(ex); } } BrokenReferencesSupport.addTemporaryEnv(env, envVariables); this.expander = (envVariables == null) ? null : MacroExpanderFactory.getExpander(env, false); }
public MacroConverter(ExecutionEnvironment env) { envVariables = new HashMap<>(); if (HostInfoUtils.isHostInfoAvailable(env)) { try { HostInfo hostInfo = HostInfoUtils.getHostInfo(env); envVariables.putAll(hostInfo.getEnvironment()); homeDir = hostInfo.getUserDir(); pathName = getPathName(env, hostInfo); pathSeparator = getPathSeparator(hostInfo); } catch (IOException | ConnectionManager.CancellationException ex) { // should never == null occur if isHostInfoAvailable(env) => report Exceptions.printStackTrace(ex); } } this.expander = MacroExpanderFactory.getExpander(env, false); }
public static String getDefaultDirectory(ExecutionEnvironment env) { String home; if (env.isLocal()) { home = System.getProperty("user.home"); // NOI18N } else if (!(HostInfoUtils.isHostInfoAvailable(env) && ConnectionManager.getInstance().isConnectedTo(env))) { home = null; } else { try { home = HostInfoUtils.getHostInfo(env).getUserDir(); } catch (IOException | ConnectionManager.CancellationException ex) { home = null; } } return home == null ? "" : home; // NOI18N }
private String getDefaultProjectDir(ExecutionEnvironment env) { String res = null; try { if (env.isLocal()) { res = ProjectChooser.getProjectsFolder().getPath(); } else if (HostInfoUtils.isHostInfoAvailable(env)) { res = HostInfoUtils.getHostInfo(env).getUserDir() + fsFileSeparator + ProjectChooser.getProjectsFolder().getName(); } } catch (IOException ex) { } catch (ConnectionManager.CancellationException ex) { } return res == null ? fileSystem.getRoot().getPath() : res; } // Variables declaration - do not modify//GEN-BEGIN:variables
public static String getDefaultDirectory(ExecutionEnvironment env) { String seed; if (env.isLocal()) { seed = System.getProperty("user.home"); // NOI18N } else if (!(HostInfoUtils.isHostInfoAvailable(env) && ConnectionManager.getInstance().isConnectedTo(env))) { seed = null; } else { try { seed = HostInfoUtils.getHostInfo(env).getUserDir(); } catch (IOException ex) { seed = null; } catch (ConnectionManager.CancellationException ex) { seed = null; } } return seed; } }
public static String getDefaultDirectory(ExecutionEnvironment env) { String seed; if (env.isLocal()) { seed = System.getProperty("user.home"); // NOI18N } else if (!(HostInfoUtils.isHostInfoAvailable(env) && ConnectionManager.getInstance().isConnectedTo(env))) { seed = null; } else { try { seed = HostInfoUtils.getHostInfo(env).getUserDir(); } catch (IOException ex) { seed = null; } catch (ConnectionManager.CancellationException ex) { seed = null; } } return seed; } }
if (HostInfoUtils.isHostInfoAvailable(execEnv)) { hostInfo = HostInfoUtils.getHostInfo(execEnv);
ExecutionEnvironment ee = activeConfiguration.getDevelopmentHost().getExecutionEnvironment(); HostInfo hostInfo = null; if (HostInfoUtils.isHostInfoAvailable(ee)) { try { hostInfo = HostInfoUtils.getHostInfo(ee);
if (HostInfoUtils.isHostInfoAvailable(env)) { hostInfo = HostInfoUtils.getHostInfo(env);
if (!HostInfoUtils.isHostInfoAvailable(execEnv)) { CndUtils.assertTrueInConsole(false, "Host unavailable?!"); //NOI18N return;
if (!isWindows() && HostInfoUtils.isHostInfoAvailable(targetEnv)) { try { String shell = HostInfoUtils.getHostInfo(targetEnv).getShell();