Skip to content

Commit 85c7af1

Browse files
committed
1st !
the whole stuff added
1 parent e671f10 commit 85c7af1

File tree

3 files changed

+48
-0
lines changed

3 files changed

+48
-0
lines changed

NetBeans-Open.scpt

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
-- This AppleScript created by John Kramlich of http://www.johnkramlich.com
2+
-- Modify it in anyway you see fit.
3+
-- moded by bunam https://github.com/bunam/NetBeans-Open
4+
return -- not needed, but shows that the script stops here when "run"
5+
6+
on open of finderObjects -- "open" handler triggered by drag'n'drop launches
7+
8+
set netBeansAppName to do shell script "ls -1 /Applications/NetBeans/ | grep -e '^NetBeans' | sort | tail -n 1"
9+
10+
set netBeansAppFullPath to "/Applications/NetBeans/" & netBeansAppName & "/Contents/MacOS/netbeans"
11+
12+
set netBeansAppFullPathQuoted to quoted form of netBeansAppFullPath
13+
14+
repeat with i in (finderObjects) -- in case multiple objects dropped on applet
15+
16+
set mypath to POSIX path of i
17+
18+
do shell script netBeansAppFullPathQuoted & " --open " & quoted form of mypath
19+
20+
end repeat
21+
22+
tell application netBeansAppName
23+
activate
24+
end tell
25+
26+
end open

README.md

+22
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,25 @@ Netbeans-open
22
=============
33

44
AppleScript to open files in NetBeans from the Mac OS X Finder (arff!)
5+
6+
So bad that it's not included :
7+
https://netbeans.org/bugzilla/show_bug.cgi?id=138943
8+
9+
##Install
10+
11+
You have to export as an Application with this AppleScript Editor
12+
13+
Put the Application in you Dock or the Finder Toolbar (Command  + drop on Mac OS X 10.9+)
14+
15+
So the content of the script
16+
17+
```
18+
-- This AppleScript created by John Kramlich of http://www.johnkramlich.com-- Modify it in anyway you see fit.-- moded by bunam https://github.com/bunam/NetBeans-Openreturn -- not needed, but shows that the script stops here when "run"on open of finderObjects -- "open" handler triggered by drag'n'drop launches set netBeansAppName to do shell script "ls -1 /Applications/NetBeans/ | grep -e '^NetBeans' | sort | tail -n 1" set netBeansAppFullPath to "/Applications/NetBeans/" & netBeansAppName & "/Contents/MacOS/netbeans" set netBeansAppFullPathQuoted to quoted form of netBeansAppFullPath repeat with i in (finderObjects) -- in case multiple objects dropped on applet set mypath to POSIX path of i do shell script netBeansAppFullPathQuoted & " --open " & quoted form of mypath end repeat tell application netBeansAppName activate end tell end open
19+
```
20+
21+
## Additional resources
22+
23+
An icon is provided :
24+
25+
- droplet.icns
26+

droplet.icns

66.6 KB
Binary file not shown.

0 commit comments

Comments
 (0)