示例#1
0
 public static List<IOSDevice> listDevices(IProgressMonitor monitor) throws CoreException {
   StringBuilder cmdLine = new StringBuilder();
   cmdLine.append("xcrun");
   cmdLine.append(" simctl list ");
   ExternalProcessUtility processUtility = new ExternalProcessUtility();
   DeviceListParser parser = new DeviceListParser();
   processUtility.execSync(cmdLine.toString(), null, parser, parser, monitor, null, null);
   return parser.getDeviceList();
 }
 public List<AndroidDevice> listDevices() throws CoreException {
   initADBServer();
   ExternalProcessUtility processUtility = new ExternalProcessUtility();
   DeviceListParser parser = new DeviceListParser();
   processUtility.execSync(
       getADBCommand() + " devices", null, parser, parser, new NullProgressMonitor(), null, null);
   List<AndroidDevice> devices = parser.getDeviceList();
   if (devices == null) {
     devices = Collections.emptyList();
   }
   return devices;
 }