protected void edit(final ApplicationQuitCallback quit, final FileWatcherListener listener) throws IOException {
if(!applicationFinder.isInstalled(application)) {
log.warn(String.format("No editor application configured for %s", local));
if(applicationLauncher.open(local)) {
this.watch(local, listener);
}
else {
throw new IOException(String.format("Failed to open default application for %s",
local.getName()));
}
}
else if(applicationLauncher.open(local, application, quit)) {
this.watch(local, listener);
}
else {
throw new IOException(String.format("Failed to open application %s for %s",
application.getName(), local.getName()));
}
}