diff --git a/netbeans-wrapper.applescript b/netbeans-wrapper.applescript new file mode 100644 index 0000000..cdf6a35 --- /dev/null +++ b/netbeans-wrapper.applescript @@ -0,0 +1,26 @@ +property netBeansBinary : null + +on run + if netBeansBinary is null then + set nbApp to choose file with prompt "Choose NetBeans" default location "/Applications" of type ("public.unix-executable") + set netBeansBinary to POSIX path of nbApp + end if + runNetBeans(netBeansBinary) +end run + +on open theItems + set commandString to netBeansBinary & " " + repeat with thisItem in theItems + tell application "System Events" + set itemProperties to thisItem's properties + set itemPath to POSIX path of itemProperties + end tell + set commandString to commandString & quoted form of itemPath & " " + end repeat + runNetBeans(commandString) +end open + +on runNetBeans(commandString) + set commandString to commandString & " >/dev/null 2>&1 &" + do shell script commandString +end runNetBeans