@Test public void testBounce() throws Exception { new WorkspaceApplicationLauncher().bounce(new NullLocal("t")); final NullLocal file = new NullLocal(System.getProperty("java.io.tmpdir"), UUID.randomUUID().toString()); LocalTouchFactory.get().touch(file); new WorkspaceApplicationLauncher().bounce(file); file.delete(); }
@Override public void bounce(final Local file) { synchronized(NSWorkspace.class) { NSDistributedNotificationCenter.defaultCenter().postNotification( NSNotification.notificationWithName("com.apple.DownloadFileFinished", file.getAbsolute()) ); } }
WorkspaceApplicationLauncher implements ApplicationLauncher { @Override public void bounce(final Local file) { synchronized(NSWorkspace.class) { NSDistributedNotificationCenter.defaultCenter().postNotification( NSNotification.notificationWithName("com.apple.DownloadFileFinished", file.getAbsolute()) ); } } }
WorkspaceApplicationLauncher implements ApplicationLauncher { @Override public void bounce(final Local file) { synchronized(NSWorkspace.class) { NSDistributedNotificationCenter.defaultCenter().postNotification( NSNotification.notificationWithName("com.apple.DownloadFileFinished", file.getAbsolute()) ); } }  }
WorkspaceApplicationLauncher implements ApplicationLauncher { @Override public void bounce(final Local file) { synchronized(NSWorkspace.class) { NSDistributedNotificationCenter.defaultCenter().postNotification( NSNotification.notificationWithName("com.apple.DownloadFileFinished", file.getAbsolute()) ); } }  void register(final Application application, final ApplicationQuitCallback callback); @Override boolean open(final Local file); @Override boolean open(final Local file, final Application application, final ApplicationQuitCallback callback); @Override boolean open(final Application application, final String args); @Override void bounce(final Local file); }
WorkspaceApplicationLauncher implements ApplicationLauncher { @Override public void bounce(final Local file) { synchronized(NSWorkspace.class) { NSDistributedNotificationCenter.defaultCenter().postNotification( NSNotification.notificationWithName("com.apple.DownloadFileFinished", file.getAbsolute()) ); } }  void register(final Application application, final ApplicationQuitCallback callback); @Override boolean open(final Local file); @Override boolean open(final Local file, final Application application, final ApplicationQuitCallback callback); @Override boolean open(final Application application, final String args); @Override void bounce(final Local file);  }