|openFile through browser with custom protocol [message #692065]
||Sun, 03 July 2011 11:26
| Robert Gruendler
Registered: June 2011
since version 3.6 eclipse supports the "open with" actions of various operating systems. I'm wondering if it's also possible to do this via a custom url protocol from within a browser.
For example to open the file /Data/foo.txt in eclipse when clicking on a link in the browser in the format eclipse://openFile?file=/Data/foo.txt.
I've managed to register a custom protocol like eclipse:// in firefox and associate eclipse with the protocol.
When i then click on the link eclipse://openFile?file=/Data/foo.txt firefox either opens eclipse if it's not running or brings it to the foreground if it is running.
Inside my plugin, i've added a listener to the SWT.OpenDocument event, which is never being called when the browser sends an event to eclipse.
When opening a file using "open with" from the operating system (OSX), the event handler is called with the event.text field being the Filepath.
Has anyone an idea if it's possible to format such an url-scheme in a way that the a browser passes over the event to eclipse in a way it can recognize it as an SWT.OpenDocument event?
Powered by FUDForum
. Page generated in 0.01930 seconds