Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Display URL object into eclipse.swt.Browser
Display URL object into eclipse.swt.Browser [message #665956] Mon, 18 April 2011 06:35 Go to next message
Eclipse UserFriend
Hello,

I would like to display the content of an HTML file into org.eclipse.swt.browser.Browser

Browser has function setUrl(String).

The problem is: my HTML file located in another jar, so I can't get the string representation of URL which points to it. I can get only URL object.

Is the a way to display this URL object ?

May be is there another swt component which can help me ?

P.S. I am not interersting in opening external bowsers (like PlatformUI.getWorkbench().getBrowserSupport().createBrowser( ...).openURL).

Thank you in advance,
Arkady.
Re: Display URL object into eclipse.swt.Browser [message #665997 is a reply to message #665956] Mon, 18 April 2011 10:09 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

There isn't a way to point the Browser at an HTML file contained in a jar.
You need to either extract the file somewhere on the file system and
setUrl() to it there, or read the file's content into a String and set it
into the Browser with setText(). If this is running in the context of an
eclipse plug-in or rcp app then the platform can extract the file to a
temporary location and give you the location for your setUrl() call.

Grant


"arkadyz" <prince_from_north@hotmail.com> wrote in message
news:ioh3n5$h17$1@news.eclipse.org...
> Hello,
>
> I would like to display the content of an HTML file into
> org.eclipse.swt.browser.Browser
>
> Browser has function setUrl(String).
> The problem is: my HTML file located in another jar, so I can't get the
> string representation of URL which points to it. I can get only URL
> object.
>
> Is the a way to display this URL object ?
>
> May be is there another swt component which can help me ?
>
> P.S. I am not interersting in opening external bowsers (like
> PlatformUI.getWorkbench().getBrowserSupport().createBrowser(
> ...).openURL).
>
> Thank you in advance,
> Arkady.
Re: Display URL object into eclipse.swt.Browser [message #666032 is a reply to message #665997] Mon, 18 April 2011 13:17 Go to previous message
Eclipse UserFriend
Grant, thank you for proposal.

Unfortunately, my HTML contains links to images with paths related to location of HTML itself. So, reading content of HTML to String or copy HTML in temporary location will not help me much.

Arkady.
Previous Topic:Decorator Problem
Next Topic:Create Treeviewer inside table
Goto Forum:
  


Current Time: Tue Jul 22 18:44:52 EDT 2025

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

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

Back to the top