コード例 #1
0
ファイル: IOSSimulator.java プロジェクト: JozhAranda/thym
 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();
 }
コード例 #2
0
 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;
 }