Changeset 9205 in josm for trunk/src/org/openstreetmap/josm/io
- Timestamp:
- 2015-12-28T21:25:25+01:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/FileWatcher.java
r8510 r9205 31 31 32 32 private WatchService watcher; 33 private Thread thread; 33 34 34 35 private final Map<Path, StyleSource> styleMap = new HashMap<>(); … … 41 42 try { 42 43 watcher = FileSystems.getDefault().newWatchService(); 43 new Thread(new Runnable() {44 thread = new Thread(new Runnable() { 44 45 @Override 45 46 public void run() { 46 47 processEvents(); 47 48 } 48 }, "File Watcher") .start();49 }, "File Watcher"); 49 50 } catch (IOException e) { 50 51 Main.error(e); 52 } 53 } 54 55 /** 56 * Starts the File Watcher thread. 57 */ 58 public final void start() { 59 if (!thread.isAlive()) { 60 thread.start(); 51 61 } 52 62 }
Note:
See TracChangeset
for help on using the changeset viewer.