Source:
<code>static long applicationProc(long id, long sel, long arg0, long arg1) { Display display = getCurrent(); if (display == null && id != applicationDelegate.id) { objc_super super_struct = new objc_super (); super_struct.receiver = id; super_struct.super_class = OS.objc_msgSend (id, OS.sel_superclass); return OS.objc_msgSendSuper (super_struct, sel, arg0, arg1); } if (currAppDelegate != null) { if (currAppDelegate.respondsToSelector(sel)) OS.objc_msgSend(currAppDelegate.id, sel, arg0, arg1); } if (sel == OS.sel_application_openFile_) { String file = new NSString(arg1).getString(); Event event = new Event(); event.text = file; display.sendEvent(SWT.OpenDocument, event); return 1; } else if (sel == OS.sel_application_openFiles_) { NSArray files = new NSArray(arg1); long count = files.count(); for (int i=0; i<count; i++) { String file = new NSString(files.objectAtIndex(i)).getString(); Event event = new Event(); event.text = file; display.sendEvent(SWT.OpenDocument, event); } new NSApplication(arg0).replyToOpenOrPrint(OS.NSApplicationDelegateReplySuccess); <START> } else if (sel == OS.sel_application_openUrls_) { <END> NSArray urls = new NSArray(arg1); int count = urls.count(); for (int i=0; i<count; i++) { String url = new NSString(urls.objectAtIndex(i)).getString(); Event event = new Event(); event.text = url; display.sendEvent(SWT.OpenUrl, event); } } else if (sel == OS.sel_applicationShouldHandleReopen_hasVisibleWindows_) { final Event event = new Event(); display.sendEvent(SWT.Activate, event); return event.doit ? 1 : 0; } return 0; }</code><technical_language>I find this selector in Apple docs. Is a custom selector? if valid usecases for openUrls:, supporting openUrl enough</technical_language>

Target:
static long applicationProc(long id, long sel, long arg0, long arg1) { Display display = getCurrent(); if (display == null && id != applicationDelegate.id) { objc_super super_struct = new objc_super (); super_struct.receiver = id; super_struct.super_class = OS.objc_msgSend (id, OS.sel_superclass); return OS.objc_msgSendSuper (super_struct, sel, arg0, arg1); } if (currAppDelegate != null) { if (currAppDelegate.respondsToSelector(sel)) OS.objc_msgSend(currAppDelegate.id, sel, arg0, arg1); } if (sel == OS.sel_application_openFile_) { String file = new NSString(arg1).getString(); Event event = new Event(); event.text = file; display.sendEvent(SWT.OpenDocument, event); return 1; } else if (sel == OS.sel_application_openFiles_) { NSArray files = new NSArray(arg1); long count = files.count(); for (int i=0; i<count; i++) { String file = new NSString(files.objectAtIndex(i)).getString(); Event event = new Event(); event.text = file; display.sendEvent(SWT.OpenDocument, event); } new NSApplication(arg0).replyToOpenOrPrint(OS.NSApplicationDelegateReplySuccess); } else if (sel == OS.sel_application_openUrls_) { NSArray urls = new NSArray(arg1); long count = urls.count(); for (int i=0; i<count; i++) { String url = new NSString(urls.objectAtIndex(i)).getString(); Event event = new Event(); event.text = url; display.sendEvent(SWT.OpenUrl, event); } } else if (sel == OS.sel_applicationShouldHandleReopen_hasVisibleWindows_) { final Event event = new Event(); display.sendEvent(SWT.Activate, event); return event.doit ? 1 : 0; } return 0; }