Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 10:35 Go to next message
arkadyz  is currently offline arkadyz Friend
Messages: 16
Registered: March 2011
Junior Member
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 14:09 Go to previous messageGo to next message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
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 17:17 Go to previous message
arkadyz  is currently offline arkadyz Friend
Messages: 16
Registered: March 2011
Junior Member
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: Fri Apr 26 11:39:38 GMT 2024

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

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

Back to the top