tags:

views:

102

answers:

3

I'd like to have a link which allows me to open a file in my favorite IDE. Textmate registeres it's own protocol txmt://open/?url=file://%file&line=%line and it works fine, but I can't find out how to open the file in some other application (for example NetBeans).

This probably requires registering some protocols and setting my browser - I'd like to register it on Chrome.

+1  A: 

Try using http://www.rubicode.com/Software/RCDefaultApp/

Blam
Thanks, that is both nice and handy, but as far as I see it can't create new protocols.
Mikulas Dite
… and for some reason, it's does not allow me to register the protocol to console files. This is unfortunate since Netbeans does not support passing arguments via url and therefor does not open the file at all. I need a “proxy“ file to format the arguments for executing IDE (either the shell or C application I can create, but not link to the protocol).
Mikulas Dite
+2  A: 

It doesn't appear to be difficult to register a system-wide URL handler for a protocol you design. In your handler you can send the file on to your IDE. The handler can be Cocoa based or applescript.

For a Cocoa solution, see this post. For a real world Cocoa example, you can look at bwana.

For an applescript solution, see this post or this post for a start.

ergosys