- Timestamp:
- 2015-12-28T21:25:25+01:00 (9 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/Main.java
r9087 r9205 556 556 main = this; 557 557 isOpenjdk = System.getProperty("java.vm.name").toUpperCase(Locale.ENGLISH).indexOf("OPENJDK") != -1; 558 fileWatcher.start(); 558 559 559 560 new InitializationTask(tr("Executing platform startup hook")) { -
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.