Changeset 11995 in josm for trunk/src/org/openstreetmap/josm
- Timestamp:
- 2017-04-24T21:16:45+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/Main.java
r11988 r11995 830 830 * Handle command line instructions after GUI has been initialized. 831 831 * @param args program arguments 832 */ 833 protected static void postConstructorProcessCmdLine(ProgramArguments args) { 832 * @return the list of submitted tasks 833 */ 834 protected static List<Future<?>> postConstructorProcessCmdLine(ProgramArguments args) { 834 835 List<Future<?>> tasks = new ArrayList<>(); 835 836 List<File> fileList = new ArrayList<>(); … … 843 844 tasks.addAll(DownloadParamType.paramType(s).downloadGps(s)); 844 845 } 845 // Make sure all download tasks complete before handling selection arguments 846 for (Future<?> task : tasks) { 847 try { 848 task.get(); 849 } catch (InterruptedException | ExecutionException e) { 850 error(e); 851 } 852 } 853 for (String s : args.get(Option.SELECTION)) { 854 SearchAction.search(s, SearchAction.SearchMode.add); 855 } 846 final Collection<String> selectionArguments = args.get(Option.SELECTION); 847 if (!selectionArguments.isEmpty()) { 848 tasks.add(Main.worker.submit(() -> { 849 for (String s : selectionArguments) { 850 SearchAction.search(s, SearchAction.SearchMode.add); 851 } 852 })); 853 } 854 return tasks; 856 855 } 857 856
Note:
See TracChangeset
for help on using the changeset viewer.