@Override public void run() { try { if (stdout) { ProcessUtils.readProcessError(process); } else { ProcessUtils.readProcessOutput(process); } } catch (Throwable ex) { } } });
public boolean hasPublicKey() { for (AuthenticationCheckboxListItem item : list) { if (item.isSelected && item.method.hasKeyFile()) { return true; } } return false; }
@Override public String engineToWorld(String path) { if (path == null) { return null; } String res = WindowsSupport.getInstance().convertFromMSysPath(path); if (res != null) { return res; } else { return path; } }
@Override public String call() throws Exception { String tmpDir; try { tmpDir = HostInfoUtils.getHostInfo(execEnv).getTempDir(); } catch (Exception iOException) { tmpDir = "/tmp"; // NOI18N } String name = tmpDir + '/' + FILENAME_PREFIX + "$$" + FILENAME_EXTENSION; // NOI18N ExitStatus status = ProcessUtils.execute(execEnv, "sh", "-c", "mkfifo " + name + ";echo " + name); //NOI18N if (status.isOK()) { return status.output; } return null; } });
private ConnectionHelper(){ ConnectionManager.getInstance().addConnectionListener(this); }
public static boolean isMacOSX(ExecutionEnvironment execEnv) { try { HostInfo info = HostInfoUtils.getHostInfo(execEnv); return info.getOSFamily() == HostInfo.OSFamily.MACOSX; } catch (IOException ex) { } catch (CancellationException ex) { } return false; }
@Override public String worldToEngine(String path) { if (path == null) { return null; } String res = WindowsSupport.getInstance().convertToCygwinPath(path); if (res != null) { return res; } else { return path; } }
@Override public String engineToWorld(String path) { if (path == null) { return null; } String res = WindowsSupport.getInstance().convertFromCygwinPath(path); if (res != null) { return res; } else { return path; } }
@Override public void setupEnvironment(DLightTarget target, MacroMap env) { env.putAll(envs); }
public static String findCommand(String name) { String path = Path.findCommand(name); if (path == null) { String dir = ToolUtils.getCommandFolder(null); if (dir != null) { path = findCommand(name, dir); // NOI18N } } return path; }
public String expand(String in) { try { return expander != null ? expander.expandMacros(in, envVariables) : in; } catch (ParseException ex) { Exceptions.printStackTrace(ex); } return in; } }
@Override public String toString() { return method.toString() + ' ' + isSelected; //NOI18N }
public String readDirLink(long pid) { return PathUtils.getCwdPath(pid, exEnv); }
public static boolean isRemote(String hostName) { return !HostInfoUtils.isLocalhost(hostName); }
public String readlink(long pid) { return PathUtils.getExePath(pid, exEnv); }
public String getDisplayName() { return method.getDisplayName(); }
private AuthenticationListModel(Authentication.MethodList methodsList) { if (methodsList == null || methodsList.isEmpty()) { resetModel(Authentication.DEFAULT_METHODS); } else { resetModel(methodsList); } }