Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » [How to] launch browser on url
[How to] launch browser on url [message #2778] Tue, 22 April 2003 15:30 Go to next message
Todd Chambery is currently offline Todd ChamberyFriend
Messages: 31
Registered: July 2009
Member
Hey all,

I need to launch a browser from my plugin on a url of the form:

http://sourceforge.net/forum/forum.php?thread_id=853477& forum_id=265703

I found something in the archive about org.eclipse.swt.program.Program,
but that looks to only launch an associated program for a (html) file.

Is there a way to programmatically do this?

thanks,

Todd
Re: [How to] launch browser on url [message #2795 is a reply to message #2778] Tue, 22 April 2003 15:33 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: genadyb.inter.net.il

I want to do that myself, but apparently it requires to check the
platform and run the appropriate command. I found this technique in
the code of the about dialog box ( I don't remember what class it was )

Todd Chambery wrote:
> Hey all,
>
> I need to launch a browser from my plugin on a url of the form:
>
> http://sourceforge.net/forum/forum.php?thread_id=853477& forum_id=265703
>
> I found something in the archive about org.eclipse.swt.program.Program,
> but that looks to only launch an associated program for a (html) file.
>
> Is there a way to programmatically do this?
>
> thanks,
>
> Todd
>
Re: [How to] launch browser on url [message #2934 is a reply to message #2795] Tue, 22 April 2003 17:21 Go to previous messageGo to next message
Todd Chambery is currently offline Todd ChamberyFriend
Messages: 31
Registered: July 2009
Member
Thanks for the hint. The 3 methods in ProductInfoDialog did what I needed:

openLink(String href)
openWebBrowser(String href)
openWebBrowserError(Display display)

Copied them into my plugin and got it open the browser on my link.

Thanks,

Todd







Genady wrote:


Genady wrote:

> I want to do that myself, but apparently it requires to check the
> platform and run the appropriate command. I found this technique in
> the code of the about dialog box ( I don't remember what class it was )
>
> Todd Chambery wrote:
>
>> Hey all,
>>
>> I need to launch a browser from my plugin on a url of the form:
>>
>> http://sourceforge.net/forum/forum.php?thread_id=853477& forum_id=265703
>>
>> I found something in the archive about
>> org.eclipse.swt.program.Program, but that looks to only launch an
>> associated program for a (html) file.
>>
>> Is there a way to programmatically do this?
>>
>> thanks,
>>
>> Todd
>>
>
> I want to do that myself, but apparently it requires to check the
> platform and run the appropriate command. I found this technique in
> the code of the about dialog box ( I don't remember what class it was )
>
> Todd Chambery wrote:
>
>> Hey all,
>>
>> I need to launch a browser from my plugin on a url of the form:
>>
>> http://sourceforge.net/forum/forum.php?thread_id=853477& forum_id=265703
>>
>> I found something in the archive about
>> org.eclipse.swt.program.Program, but that looks to only launch an
>> associated program for a (html) file.
>>
>> Is there a way to programmatically do this?
>>
>> thanks,
>>
>> Todd
>>
>
Re: [How to] launch browser on url [message #2986 is a reply to message #2934] Tue, 22 April 2003 17:35 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: burner.zclipse.org

On Tue, 22 Apr 2003 13:21:31 -0400, Todd Chambery wrote:

> Thanks for the hint. The 3 methods in ProductInfoDialog did what I needed:
>
> openLink(String href)
> openWebBrowser(String href)
> openWebBrowserError(Display display)

Is there some way to use the browser specified in
Window/Preferences/Help/Current Web Browser Adapter?

Those APIs seem to call up mozilla on my system, whereas, I'd prefer it to
use the "sensible-browser" program that all my other programs use (and
Help/Help Contents uses).

>
> Copied them into my plugin and got it open the browser on my link.
>
> Thanks,
>
> Todd
>
>
Re: [How to] launch browser on url [message #3003 is a reply to message #2986] Tue, 22 April 2003 17:39 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: burner.zclipse.org

On Tue, 22 Apr 2003 13:35:33 -0400, Michael R Head wrote:

> On Tue, 22 Apr 2003 13:21:31 -0400, Todd Chambery wrote:
>
>> Thanks for the hint. The 3 methods in ProductInfoDialog did what I needed:
>>
>> openLink(String href)
>> openWebBrowser(String href)
>> openWebBrowserError(Display display)
>
> Is there some way to use the browser specified in
> Window/Preferences/Help/Current Web Browser Adapter?
>

Check out the browser extension point in org.eclipse.help
Re: [How to] launch browser on url [message #3020 is a reply to message #3003] Tue, 22 April 2003 17:42 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: burner.zclipse.org

On Tue, 22 Apr 2003 13:39:09 -0400, Michael R Head wrote:


>>
>
> Check out the browser extension point in org.eclipse.help

sorry, that's for defining web browsers. But you might be able to get at:

org.eclipse.help.internal.HelpSystem.getHelpBrowser()

(it's public/static for now)
Re: [How to] launch browser on url [message #3037 is a reply to message #3020] Tue, 22 April 2003 18:02 Go to previous messageGo to next message
Todd Chambery is currently offline Todd ChamberyFriend
Messages: 31
Registered: July 2009
Member
This works (and I'm using it), but I'm a little sketchy about using the
internal stuff since the APIs can change...

Michael R Head wrote:
> On Tue, 22 Apr 2003 13:39:09 -0400, Michael R Head wrote:
>
>
>
>>Check out the browser extension point in org.eclipse.help
>
>
> sorry, that's for defining web browsers. But you might be able to get at:
>
> org.eclipse.help.internal.HelpSystem.getHelpBrowser()
>
> (it's public/static for now)
>
Re: [How to] launch browser on url [message #3062 is a reply to message #3037] Tue, 22 April 2003 18:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: burner.zclipse.org

On Tue, 22 Apr 2003 14:02:52 -0400, Todd Chambery wrote:

> This works (and I'm using it), but I'm a little sketchy about using the
> internal stuff since the APIs can change...

Yeah, though the update plugin also uses these internal APIs (in
particular:

org.eclipse.update.internal.ui.views.DetailsView.showURL()


There's also this class, which nobody seems to use yet:

org.eclipse.help.ui.browser.LaunchURL

>
> Michael R Head wrote:
>> On Tue, 22 Apr 2003 13:39:09 -0400, Michael R Head wrote:
>>
>>
>>
>>>Check out the browser extension point in org.eclipse.help
>>
>>
>> sorry, that's for defining web browsers. But you might be able to get at:
>>
>> org.eclipse.help.internal.HelpSystem.getHelpBrowser()
>>
>> (it's public/static for now)
>>
Re: [How to] launch browser on url [message #4440 is a reply to message #3020] Tue, 22 April 2003 19:19 Go to previous message
Konrad Kolosowski is currently offline Konrad KolosowskiFriend
Messages: 243
Registered: July 2009
Senior Member
If you need to use browser support from help plug-in, use
org.eclipse.help.internal.browser.BrowserManager.createBrows er() to get your
IBrowser instance rather than using same instance as help. Also, the
BrowserManager class is less likely to get changed, than HelpSystem class.

Konrad Kolosowski

"Michael R Head" <burner@zclipse.org> wrote in message
news:pan.2003.04.22.17.42.38.353192@zclipse.org...
> On Tue, 22 Apr 2003 13:39:09 -0400, Michael R Head wrote:
>
>
> >>
> >
> > Check out the browser extension point in org.eclipse.help
>
> sorry, that's for defining web browsers. But you might be able to get at:
>
> org.eclipse.help.internal.HelpSystem.getHelpBrowser()
>
> (it's public/static for now)
>
Previous Topic:PDE Help
Next Topic:What's happening after 2.1?
Goto Forum:
  


Current Time: Sat Jul 27 16:42:01 GMT 2024

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

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

Back to the top