I want to execute this command as an external tool:
Program: /usr/bin/osascript
Parameters: -e 'tell application "Finder"' -e 'activate' -e 'reveal (POSIX file "$FilePath$")' -e 'end tell'
The double-quotes around Finder and $FilePath$ are important. I checked the parameters using the command line and it works. IntelliJ IDEA writes the following line in the run-log:
---snip--
/usr/bin/osascript -e 'tell application Finder' -e 'activate' -e 'reveal (POSIX file /tmp/foo)' -e 'end tell'
0:1: syntax error: A unknown token can't go here. (-2740)
Process finished with exit code 1
--snap--
It seems like IDEA removes the double-quotes. I tried to quote them with a backslash but that didn't work... it shows up as \" in the log...