@SuppressWarnings("unchecked") @Override protected void doExecute() throws Exception { final ExternalSystemFacadeManager manager = ServiceManager.getService(ExternalSystemFacadeManager.class); ExternalSystemExecutionSettings settings = ExternalSystemApiUtil.getExecutionSettings( getIdeProject(), getExternalProjectPath(), getExternalSystemId()); RemoteExternalSystemFacade facade = manager.getFacade(getIdeProject(), getExternalProjectPath(), getExternalSystemId()); RemoteExternalSystemTaskManager taskManager = facade.getTaskManager(); List<String> taskNames = ContainerUtilRt.map2List(myTasksToExecute, MAPPER); final List<String> vmOptions = parseCmdParameters(myVmOptions); final List<String> scriptParametersList = parseCmdParameters(myScriptParameters); taskManager.executeTasks( getId(), taskNames, getExternalProjectPath(), settings, vmOptions, scriptParametersList, myDebuggerSetup); }
@Override protected boolean doCancel() throws Exception { final ExternalSystemFacadeManager manager = ServiceManager.getService(ExternalSystemFacadeManager.class); RemoteExternalSystemFacade facade = manager.getFacade(getIdeProject(), getExternalProjectPath(), getExternalSystemId()); RemoteExternalSystemTaskManager taskManager = facade.getTaskManager(); return taskManager.cancelTask(getId()); }