Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » openFile through browser with custom protocol
openFile through browser with custom protocol [message #692065] Sun, 03 July 2011 11:26
Robert Gruendler is currently offline Robert GruendlerFriend
Messages: 66
Registered: June 2011
Member
Hi,

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?


Previous Topic:setActiveEditor not called for opened editors from previous session
Next Topic:How to obtain instances of IProxyService
Goto Forum:
  


Current Time: Sat Aug 15 17:47:40 GMT 2020

Powered by FUDForum. Page generated in 0.01930 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top