private int extractRobot() { repositoryManager.refresh(); int rv = 0; output = new StringWriter(); PrintWriter out = new PrintWriter(output); out.println("Robot Extract"); List<IRobotSpecItem> selectedRobots = getRobotSelectionPanel().getSelectedRobots(); IRobotSpecItem spec = selectedRobots.get(0); try { WindowUtil.setStatusWriter(out); rv = repositoryManager.extractJar(spec); WindowUtil.setStatusWriter(null); WindowUtil.setStatus(""); if (rv == 0) { out.println("Robot extracted successfully."); } else if (rv == -1) { out.println("Cancelled."); } } catch (Exception e) { out.println(e); rv = 8; } return rv; }
private void setSelectedRobots(String selectedRobotsString) { if (selectedRobotsString != null) { for (IRobotSpecItem item : repositoryManager.getSelectedSpecifications(selectedRobotsString)) { this.selectedRobots.add(new AvailableRobotsPanel.ItemWrapper(item)); } } ((SelectedRobotsModel) getSelectedRobotsList().getModel()).changed(); fireStateChanged(); }